Task: Improve layout
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Repository;
|
||||
|
||||
use App\Entity\Application;
|
||||
use App\Entity\Assignment;
|
||||
use App\Entity\Teamer;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
@@ -37,14 +38,15 @@ class AssignmentRepository extends ServiceEntityRepository
|
||||
|
||||
if (null !== $teamer) {
|
||||
$qb
|
||||
->leftJoin('assignment.applications', 'application', Join::WITH, 'application.teamer = :teamer')
|
||||
->leftJoin('assignment.dispositions', 'disposition', Join::WITH, 'disposition.teamer = :teamer')
|
||||
->leftJoin('assignment.applications', 'application', Join::WITH, $qb->expr()->eq('application.teamer', ':teamer'))
|
||||
->leftJoin('assignment.dispositions', 'disposition', Join::WITH, $qb->expr()->eq('disposition.teamer', ':teamer'))
|
||||
->setParameter('teamer', $teamer)
|
||||
;
|
||||
} else {
|
||||
$qb
|
||||
->leftJoin('assignment.applications', 'application')
|
||||
->leftJoin('assignment.applications', 'application', Join::WITH, $qb->expr()->neq('application.status', ':status'))
|
||||
->leftJoin('assignment.dispositions', 'disposition')
|
||||
->setParameter('status', Application::STATUS_REJECTED)
|
||||
;
|
||||
}
|
||||
|
||||
@@ -59,9 +61,9 @@ class AssignmentRepository extends ServiceEntityRepository
|
||||
->select('assignment', 'destination', 'job_profile', 'application', 'disposition')
|
||||
->innerJoin('assignment.destination', 'destination')
|
||||
->innerJoin('assignment.jobProfile', 'job_profile')
|
||||
->innerJoin('assignment.teamers', 'teamer', Join::WITH, 'teamer = :teamer')
|
||||
->leftJoin('assignment.applications', 'application', Join::WITH, 'application.teamer = :teamer')
|
||||
->leftJoin('assignment.dispositions', 'disposition', Join::WITH, 'disposition.teamer = :teamer')
|
||||
->innerJoin('assignment.teamers', 'teamer', Join::WITH, $qb->expr()->eq('teamer', ':teamer'))
|
||||
->leftJoin('assignment.applications', 'application', Join::WITH, $qb->expr()->eq('application.teamer', ':teamer'))
|
||||
->leftJoin('assignment.dispositions', 'disposition', Join::WITH, $qb->expr()->eq('disposition.teamer', ':teamer'))
|
||||
->where($qb->expr()->isNull('assignment.deletedAt'))
|
||||
->setParameter('teamer', $teamer)
|
||||
;
|
||||
|
||||
Reference in New Issue
Block a user