Feat: Refactor application rejecting process
This commit is contained in:
@@ -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()
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user