feat: order accepted documents by date of creation
This commit is contained in:
@@ -86,21 +86,19 @@ class UploadRepository extends ServiceEntityRepository
|
|||||||
): Query {
|
): Query {
|
||||||
$qb = $this->createQueryBuilder('upload');
|
$qb = $this->createQueryBuilder('upload');
|
||||||
|
|
||||||
$qb
|
return $qb
|
||||||
->select('upload', 'disposition', 'assignment', 'job_profile', 'destination', 'teamer')
|
->select('upload', 'disposition', 'assignment', 'job_profile', 'destination', 'teamer')
|
||||||
->innerJoin('upload.disposition', 'disposition')
|
->innerJoin('upload.disposition', 'disposition')
|
||||||
->innerJoin('disposition.assignment', 'assignment')
|
->innerJoin('disposition.assignment', 'assignment')
|
||||||
->innerJoin('assignment.jobProfile', 'job_profile')
|
->innerJoin('assignment.jobProfile', 'job_profile')
|
||||||
->innerJoin('assignment.destination', 'destination')
|
->innerJoin('assignment.destination', 'destination')
|
||||||
->innerJoin('disposition.teamer', 'teamer')
|
->innerJoin('disposition.teamer', 'teamer')
|
||||||
;
|
->where($qb->expr()->andX(
|
||||||
|
|
||||||
return $qb->where(
|
|
||||||
$qb->expr()->andX(
|
|
||||||
$qb->expr()->eq('upload.type', ':type'),
|
$qb->expr()->eq('upload.type', ':type'),
|
||||||
$qb->expr()->eq('upload.status', ':status'),
|
$qb->expr()->eq('upload.status', ':status'),
|
||||||
$qb->expr()->isNull('upload.downloadedAt'),
|
$qb->expr()->isNull('upload.downloadedAt'),
|
||||||
))
|
))
|
||||||
|
->orderBy('upload.createdAt', 'DESC')
|
||||||
->setParameter('type', $type)
|
->setParameter('type', $type)
|
||||||
->setParameter('status', $status)
|
->setParameter('status', $status)
|
||||||
->getQuery()
|
->getQuery()
|
||||||
|
|||||||
Reference in New Issue
Block a user