feat: show due documents on teamer dashboard
This commit is contained in:
@@ -124,6 +124,29 @@ class DispositionRepository extends ServiceEntityRepository
|
||||
;
|
||||
}
|
||||
|
||||
public function findCurrentDispositionsByTeamer(Teamer $teamer): 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()->eq('disposition.teamer', ':teamer'),
|
||||
$qb->expr()->in('disposition.status', ':status')
|
||||
))
|
||||
->setParameter('teamer', $teamer)
|
||||
->setParameter('status', [
|
||||
Disposition::STATUS_NEW,
|
||||
Disposition::STATUS_CONFIRMED,
|
||||
])
|
||||
->orderBy('destination.dateFrom', 'ASC')
|
||||
->getQuery()
|
||||
->getResult()
|
||||
;
|
||||
}
|
||||
|
||||
public function findNewDispositionsByHotelBusProIds(array $hotelBusProIds): array
|
||||
{
|
||||
$qb = $this->createQueryBuilder('disposition');
|
||||
|
||||
Reference in New Issue
Block a user