Feat: Show icon representing application or disposition status
This commit is contained in:
@@ -6,6 +6,7 @@ use App\Entity\Assignment;
|
||||
use App\Entity\Teamer;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\ORM\Query;
|
||||
use Doctrine\ORM\Query\Expr\Join;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
|
||||
/**
|
||||
@@ -31,15 +32,19 @@ class AssignmentRepository extends ServiceEntityRepository
|
||||
->select('assignment', 'destination', 'job_profile', 'application', 'disposition')
|
||||
->innerJoin('assignment.destination', 'destination')
|
||||
->innerJoin('assignment.jobProfile', 'job_profile')
|
||||
->leftJoin('assignment.applications', 'application')
|
||||
->leftJoin('assignment.dispositions', 'disposition')
|
||||
;
|
||||
|
||||
if (null !== $teamer) {
|
||||
$qb
|
||||
->where($qb->expr()->eq('application.teamer', ':teamer'))
|
||||
->leftJoin('assignment.applications', 'application', Join::WITH, 'application.teamer = :teamer')
|
||||
->leftJoin('assignment.dispositions', 'disposition', Join::WITH, 'disposition.teamer = :teamer')
|
||||
->setParameter('teamer', $teamer)
|
||||
;
|
||||
} else {
|
||||
$qb
|
||||
->leftJoin('assignment.applications', 'application')
|
||||
->leftJoin('assignment.dispositions', 'disposition')
|
||||
;
|
||||
}
|
||||
|
||||
return $qb->getQuery();
|
||||
@@ -51,7 +56,7 @@ class AssignmentRepository extends ServiceEntityRepository
|
||||
|
||||
$qb
|
||||
->select('assignment', 'destination', 'job_profile')
|
||||
->innerJoin('assignment.teamers', 'teamer', 'WITH', 'teamer = :teamer')
|
||||
->innerJoin('assignment.teamers', 'teamer', Join::WITH, 'teamer = :teamer')
|
||||
->innerJoin('assignment.destination', 'destination')
|
||||
->innerJoin('assignment.jobProfile', 'job_profile')
|
||||
->leftJoin('assignment.applications', 'application')
|
||||
|
||||
Reference in New Issue
Block a user