WIP: Implement role house manager and feedback providing
This commit is contained in:
@@ -109,4 +109,29 @@ class DispositionRepository extends ServiceEntityRepository
|
||||
->getResult()
|
||||
;
|
||||
}
|
||||
|
||||
public function getPendingFeedbackQuery(array $hotelBusProIds = null): Query
|
||||
{
|
||||
$qb = $this->createQueryBuilder('disposition');
|
||||
|
||||
$qb
|
||||
->select('disposition', 'assignment', 'destination')
|
||||
->innerJoin('disposition.assignment', 'assignment')
|
||||
->innerJoin('assignment.destination', 'destination')
|
||||
->where($qb->expr()->andX(
|
||||
$qb->expr()->isNull('disposition.feedback'),
|
||||
$qb->expr()->lt('destination.dateTo', ':dateTo')
|
||||
))
|
||||
->setParameter('dateTo', new \DateTimeImmutable())
|
||||
;
|
||||
|
||||
if (null !== $hotelBusProIds) {
|
||||
$qb
|
||||
->andWhere($qb->expr()->in('destination.hotelBusProId', ':hotelBusProIds'))
|
||||
->setParameter('hotelBusProIds', $hotelBusProIds)
|
||||
;
|
||||
}
|
||||
|
||||
return $qb->getQuery();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user