feat: order accepted documents by date of creation
This commit is contained in:
@@ -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