Feat: Add teamer info popup

This commit is contained in:
Björn Fromme
2023-10-20 11:08:23 +02:00
parent 67cc7bf4ed
commit 2d657611fa
9 changed files with 137 additions and 34 deletions
+16 -1
View File
@@ -2,7 +2,6 @@
namespace App\Repository;
use App\Entity\Application;
use App\Entity\Assignment;
use App\Entity\Disposition;
use App\Entity\Teamer;
@@ -94,4 +93,20 @@ class DispositionRepository extends ServiceEntityRepository
->getResult()
;
}
public function getRecentByTeamer(Teamer $teamer, int $limit = 5): array
{
$qb = $this->createQueryBuilder('disposition');
return $qb
->select('disposition', 'assignment', 'destination')
->innerJoin('disposition.assignment', 'assignment')
->innerJoin('assignment.destination', 'destination')
->where($qb->expr()->eq('disposition.teamer', ':teamer'))
->setParameter('teamer', $teamer)
->orderBy('destination.dateFrom', 'DESC')
->getQuery()
->getResult()
;
}
}