WIP: Implement admin dashboard
This commit is contained in:
@@ -121,4 +121,20 @@ class AssignmentRepository extends ServiceEntityRepository
|
||||
|
||||
return $options;
|
||||
}
|
||||
|
||||
public function getNew(int $limit = 5): array
|
||||
{
|
||||
$qb = $this->createQueryBuilder('assignment');
|
||||
|
||||
return $qb
|
||||
->select('assignment', 'destination', 'job_profile', 'owner')
|
||||
->innerJoin('assignment.destination', 'destination')
|
||||
->innerJoin('assignment.jobProfile', 'job_profile')
|
||||
->innerJoin('assignment.owner', 'owner')
|
||||
->orderBy('assignment.createdAt', 'DESC')
|
||||
->setMaxResults($limit)
|
||||
->getQuery()
|
||||
->getResult()
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user