WIP: Implement admin dashboard

This commit is contained in:
Björn Fromme
2023-10-22 17:05:43 +02:00
parent 38d6fafcb2
commit 91f0f76ccc
15 changed files with 280 additions and 4 deletions
+16
View File
@@ -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()
;
}
}