Feat: Refactor application rejecting process

This commit is contained in:
Björn Fromme
2023-10-19 10:24:53 +02:00
parent 2c49c142b8
commit 21968b833c
12 changed files with 185 additions and 66 deletions
+16
View File
@@ -2,6 +2,8 @@
namespace App\Repository;
use App\Entity\Application;
use App\Entity\Assignment;
use App\Entity\Disposition;
use App\Entity\Teamer;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
@@ -78,4 +80,18 @@ class DispositionRepository extends ServiceEntityRepository
->getQuery()
;
}
public function getCurrentByAssignment(Assignment $assignment): array
{
$qb = $this->createQueryBuilder('disposition');
return $qb
->select('disposition', 'teamer')
->innerJoin('disposition.teamer', 'teamer')
->where($qb->expr()->eq('disposition.assignment', ':assignment'))
->setParameter('assignment', $assignment)
->getQuery()
->getResult()
;
}
}