feat: dashboard for role manager
This commit is contained in:
@@ -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()
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user