Project date-range report: allow budget-type independent project-listing (#3430)
This commit is contained in:
@@ -56,6 +56,7 @@ class ProjectDateRangeForm extends AbstractType
|
||||
'multiple' => false,
|
||||
'expanded' => true,
|
||||
'choices' => [
|
||||
'label.budgetIndependent' => null,
|
||||
'label.includeNoBudget' => 'none',
|
||||
'label.includeBudgetType_full' => 'full',
|
||||
'label.includeBudgetType_month' => 'month',
|
||||
|
||||
@@ -26,9 +26,14 @@ final class ProjectDateRangeQuery
|
||||
* @var Customer|null
|
||||
*/
|
||||
private $customer;
|
||||
|
||||
private $includeNoWork = true;
|
||||
private $budgetType = 'month';
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private $includeNoWork = false;
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $budgetType = null;
|
||||
|
||||
public function __construct(\DateTime $month, User $user)
|
||||
{
|
||||
@@ -36,6 +41,11 @@ final class ProjectDateRangeQuery
|
||||
$this->user = $user;
|
||||
}
|
||||
|
||||
public function isBudgetIndependent(): bool
|
||||
{
|
||||
return $this->budgetType === null;
|
||||
}
|
||||
|
||||
public function isIncludeNoBudget(): bool
|
||||
{
|
||||
return $this->budgetType === 'none';
|
||||
|
||||
Reference in New Issue
Block a user