feat: order accepted documents by date of creation

This commit is contained in:
Björn Fromme
2025-02-05 14:21:02 +01:00
parent 4a0897a2de
commit 225329c1af
+3 -5
View File
@@ -86,21 +86,19 @@ class UploadRepository extends ServiceEntityRepository
): Query {
$qb = $this->createQueryBuilder('upload');
$qb
return $qb
->select('upload', 'disposition', 'assignment', 'job_profile', 'destination', 'teamer')
->innerJoin('upload.disposition', 'disposition')
->innerJoin('disposition.assignment', 'assignment')
->innerJoin('assignment.jobProfile', 'job_profile')
->innerJoin('assignment.destination', 'destination')
->innerJoin('disposition.teamer', 'teamer')
;
return $qb->where(
$qb->expr()->andX(
->where($qb->expr()->andX(
$qb->expr()->eq('upload.type', ':type'),
$qb->expr()->eq('upload.status', ':status'),
$qb->expr()->isNull('upload.downloadedAt'),
))
->orderBy('upload.createdAt', 'DESC')
->setParameter('type', $type)
->setParameter('status', $status)
->getQuery()