Feat: Make some entities soft-deletable
This commit is contained in:
@@ -32,6 +32,7 @@ class AssignmentRepository extends ServiceEntityRepository
|
||||
->select('assignment', 'destination', 'job_profile', 'application', 'disposition')
|
||||
->innerJoin('assignment.destination', 'destination')
|
||||
->innerJoin('assignment.jobProfile', 'job_profile')
|
||||
->where($qb->expr()->isNull('assignment.deletedAt'))
|
||||
;
|
||||
|
||||
if (null !== $teamer) {
|
||||
@@ -61,6 +62,7 @@ class AssignmentRepository extends ServiceEntityRepository
|
||||
->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')
|
||||
->where($qb->expr()->isNull('assignment.deletedAt'))
|
||||
->setParameter('teamer', $teamer)
|
||||
;
|
||||
|
||||
@@ -76,6 +78,7 @@ class AssignmentRepository extends ServiceEntityRepository
|
||||
$result = $qb
|
||||
->select('MIN(destination.dateFrom) minDate', 'MAX(destination.dateTo) maxDate')
|
||||
->innerJoin('assignment.destination', 'destination')
|
||||
->where($qb->expr()->isNull('assignment.deletedAt'))
|
||||
->getQuery()
|
||||
->getSingleResult()
|
||||
;
|
||||
@@ -89,6 +92,7 @@ class AssignmentRepository extends ServiceEntityRepository
|
||||
->select('job_profile.id', 'job_profile.name')
|
||||
->innerJoin('assignment.jobProfile', 'job_profile')
|
||||
->orderBy('job_profile.name', 'ASC')
|
||||
->where($qb->expr()->isNull('assignment.deletedAt'))
|
||||
->getQuery()
|
||||
->getArrayResult()
|
||||
;
|
||||
@@ -102,6 +106,7 @@ class AssignmentRepository extends ServiceEntityRepository
|
||||
$result = $qb
|
||||
->select('destination.id id', 'destination.product product', 'destination.hotel hotel')
|
||||
->innerJoin('assignment.destination', 'destination')
|
||||
->where($qb->expr()->isNull('assignment.deletedAt'))
|
||||
->orderBy('destination.product', 'ASC')
|
||||
->groupBy('destination.id')
|
||||
->getQuery()
|
||||
|
||||
Reference in New Issue
Block a user