feat: hide past assignments by default, include via filtersetting
This commit is contained in:
1 parent
dcaf338da8
commit
5a0c998d2b
5 files changed
+30
No files matched your search
@@ -110,6 +110,13 @@ class AssignmentRepository extends ServiceEntityRepository
|
||||
|
||||
private function applyFilterSettings(AssignmentFilterDto $filterDto, QueryBuilder $qb): void
|
||||
{
|
||||
if (false === $filterDto->isIncludePast()) {
|
||||
$qb
|
||||
->andWhere($qb->expr()->gte('destination.dateFrom', ':now'))
|
||||
->setParameter('now', new \DateTimeImmutable())
|
||||
;
|
||||
}
|
||||
|
||||
if (null !== $status = $filterDto->getStatus()) {
|
||||
switch ($status) {
|
||||
case Assignment::STATUS_STAFFED:
|
||||
|
||||
Reference in new issue
Block a user