added project filter in user-list reports (#4615)
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
|
||||
namespace App\Reporting;
|
||||
|
||||
use App\Entity\Project;
|
||||
use App\Entity\Team;
|
||||
|
||||
abstract class AbstractUserList
|
||||
@@ -17,6 +18,7 @@ abstract class AbstractUserList
|
||||
private bool $decimal = false;
|
||||
private string $sumType = 'duration';
|
||||
private ?Team $team = null;
|
||||
private ?Project $project = null;
|
||||
|
||||
public function getDate(): ?\DateTimeInterface
|
||||
{
|
||||
@@ -61,4 +63,14 @@ abstract class AbstractUserList
|
||||
{
|
||||
$this->team = $team;
|
||||
}
|
||||
|
||||
public function getProject(): ?Project
|
||||
{
|
||||
return $this->project;
|
||||
}
|
||||
|
||||
public function setProject(?Project $project): void
|
||||
{
|
||||
$this->project = $project;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
namespace App\Reporting\MonthlyUserList;
|
||||
|
||||
use App\Form\Type\MonthPickerType;
|
||||
use App\Form\Type\ProjectType;
|
||||
use App\Form\Type\ReportSumType;
|
||||
use App\Form\Type\TeamType;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
@@ -33,6 +34,11 @@ final class MonthlyUserListForm extends AbstractType
|
||||
'required' => false,
|
||||
'width' => false,
|
||||
]);
|
||||
$builder->add('project', ProjectType::class, [
|
||||
'multiple' => false,
|
||||
'required' => false,
|
||||
'width' => false,
|
||||
]);
|
||||
$builder->add('sumType', ReportSumType::class);
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
namespace App\Reporting\WeeklyUserList;
|
||||
|
||||
use App\Form\Type\ProjectType;
|
||||
use App\Form\Type\ReportSumType;
|
||||
use App\Form\Type\TeamType;
|
||||
use App\Form\Type\WeekPickerType;
|
||||
@@ -33,6 +34,11 @@ final class WeeklyUserListForm extends AbstractType
|
||||
'required' => false,
|
||||
'width' => false,
|
||||
]);
|
||||
$builder->add('project', ProjectType::class, [
|
||||
'multiple' => false,
|
||||
'required' => false,
|
||||
'width' => false,
|
||||
]);
|
||||
$builder->add('sumType', ReportSumType::class);
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
namespace App\Reporting\YearlyUserList;
|
||||
|
||||
use App\Form\Type\ProjectType;
|
||||
use App\Form\Type\ReportSumType;
|
||||
use App\Form\Type\TeamType;
|
||||
use App\Form\Type\YearPickerType;
|
||||
@@ -34,6 +35,11 @@ final class YearlyUserListForm extends AbstractType
|
||||
'required' => false,
|
||||
'width' => false,
|
||||
]);
|
||||
$builder->add('project', ProjectType::class, [
|
||||
'multiple' => false,
|
||||
'required' => false,
|
||||
'width' => false,
|
||||
]);
|
||||
$builder->add('sumType', ReportSumType::class);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user