feat: additional filter options for documents
This commit is contained in:
@@ -123,6 +123,27 @@ class UploadRepository extends ServiceEntityRepository
|
||||
;
|
||||
}
|
||||
|
||||
if (null !== $status = $filterDto->getStatus()) {
|
||||
$qb
|
||||
->andWhere($qb->expr()->eq('upload.status', ':status'))
|
||||
->setParameter('status', $status)
|
||||
;
|
||||
}
|
||||
|
||||
if ($jobProfiles = $filterDto->getJobProfiles()) {
|
||||
$qb
|
||||
->andWhere($qb->expr()->in('assignment.jobProfile', ':jobProfiles'))
|
||||
->setParameter('jobProfiles', $jobProfiles)
|
||||
;
|
||||
}
|
||||
|
||||
foreach ($filterDto->getHotels() as $hotel) {
|
||||
$qb
|
||||
->andWhere($qb->expr()->like('destination.hotel', ':hotel'))
|
||||
->setParameter('hotel', '%'.$hotel.'%')
|
||||
;
|
||||
}
|
||||
|
||||
return $qb->getQuery();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user