feat: hotel manager dashboard
This commit is contained in:
@@ -113,6 +113,25 @@ class DispositionRepository extends ServiceEntityRepository
|
||||
;
|
||||
}
|
||||
|
||||
public function getNewByHotelBusProIds(array $hotelBusProIds): array
|
||||
{
|
||||
$qb = $this->createQueryBuilder('disposition');
|
||||
|
||||
return $qb
|
||||
->select('disposition', 'assignment', 'destination')
|
||||
->innerJoin('disposition.assignment', 'assignment')
|
||||
->innerJoin('assignment.destination', 'destination')
|
||||
->where($qb->expr()->andX(
|
||||
$qb->expr()->in('destination.hotelBusProId', ':hotelBusProIds'),
|
||||
$qb->expr()->lt('destination.dateTo', ':dateTo')
|
||||
))
|
||||
->setParameter('hotelBusProIds', $hotelBusProIds)
|
||||
->setParameter('dateTo', new \DateTimeImmutable())
|
||||
->getQuery()
|
||||
->getResult()
|
||||
;
|
||||
}
|
||||
|
||||
public function getPendingFeedbackQuery(array $hotelBusProIds = null): Query
|
||||
{
|
||||
$qb = $this->createQueryBuilder('disposition');
|
||||
@@ -137,4 +156,12 @@ class DispositionRepository extends ServiceEntityRepository
|
||||
|
||||
return $qb->getQuery();
|
||||
}
|
||||
|
||||
public function getPendingFeedbackByHotelBusProIds(array $hotelBusProIds): array
|
||||
{
|
||||
return $this
|
||||
->getPendingFeedbackQuery($hotelBusProIds)
|
||||
->getResult()
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user