feat: dashboard for role manager

This commit is contained in:
Björn Fromme
2024-04-19 17:26:38 +02:00
parent c7084b92dd
commit 57e1082f2f
4 changed files with 94 additions and 162 deletions
+18
View File
@@ -245,4 +245,22 @@ class DispositionRepository extends ServiceEntityRepository
->getResult()
;
}
public function getNew(int $limit = 5): array
{
$qb = $this->createQueryBuilder('disposition');
return $qb
->select('disposition', 'assignment', 'destination', 'job_profile')
->innerJoin('disposition.assignment', 'assignment')
->innerJoin('assignment.destination', 'destination')
->innerJoin('assignment.jobProfile', 'job_profile')
->where($qb->expr()->gt('destination.dateFrom', ':dateFrom'))
->orderBy('disposition.createdAt', 'DESC')
->setParameter('dateFrom', new \DateTimeImmutable())
->setMaxResults($limit)
->getQuery()
->getResult()
;
}
}