added team filter in timesheet search forms (#3590)
* added team filter in export and invoice search form * added teams select to timesheet filter * added team select to report filter * hide user and team filter if count < 2
This commit is contained in:
@@ -9,11 +9,17 @@
|
||||
|
||||
namespace App\Reporting;
|
||||
|
||||
use App\Entity\Team;
|
||||
|
||||
abstract class AbstractUserList
|
||||
{
|
||||
private $date;
|
||||
private $decimal = false;
|
||||
private $sumType = 'duration';
|
||||
/**
|
||||
* @var Team|null
|
||||
*/
|
||||
private $team = null;
|
||||
|
||||
public function getDate(): ?\DateTime
|
||||
{
|
||||
@@ -48,4 +54,14 @@ abstract class AbstractUserList
|
||||
|
||||
$this->sumType = $sumType;
|
||||
}
|
||||
|
||||
public function getTeam(): ?Team
|
||||
{
|
||||
return $this->team;
|
||||
}
|
||||
|
||||
public function setTeam(?Team $team = null): void
|
||||
{
|
||||
$this->team = $team;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace App\Reporting;
|
||||
|
||||
use App\Form\Type\MonthPickerType;
|
||||
use App\Form\Type\ReportSumType;
|
||||
use App\Form\Type\TeamType;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
@@ -37,6 +38,11 @@ class MonthlyUserListForm extends AbstractType
|
||||
'view_timezone' => $options['timezone'],
|
||||
'start_date' => $options['start_date'],
|
||||
]);
|
||||
$builder->add('team', TeamType::class, [
|
||||
'multiple' => false,
|
||||
'required' => false,
|
||||
'width' => false,
|
||||
]);
|
||||
$builder->add('sumType', ReportSumType::class);
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
namespace App\Reporting;
|
||||
|
||||
use App\Form\Type\ReportSumType;
|
||||
use App\Form\Type\TeamType;
|
||||
use App\Form\Type\WeekPickerType;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
@@ -37,6 +38,11 @@ class WeeklyUserListForm extends AbstractType
|
||||
'view_timezone' => $options['timezone'],
|
||||
'start_date' => $options['start_date'],
|
||||
]);
|
||||
$builder->add('team', TeamType::class, [
|
||||
'multiple' => false,
|
||||
'required' => false,
|
||||
'width' => false,
|
||||
]);
|
||||
$builder->add('sumType', ReportSumType::class);
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
namespace App\Reporting;
|
||||
|
||||
use App\Form\Type\ReportSumType;
|
||||
use App\Form\Type\TeamType;
|
||||
use App\Form\Type\YearPickerType;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
@@ -38,6 +39,11 @@ class YearlyUserListForm extends AbstractType
|
||||
'start_date' => $options['start_date'],
|
||||
'show_range' => true,
|
||||
]);
|
||||
$builder->add('team', TeamType::class, [
|
||||
'multiple' => false,
|
||||
'required' => false,
|
||||
'width' => false,
|
||||
]);
|
||||
$builder->add('sumType', ReportSumType::class);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user