feat: order accepted documents by date of creation
This commit is contained in:
1 parent
4a0897a2de
commit
225329c1af
1 file changed
+3
-5
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user