feat: soft-delete for teamer accounts
addresses #869dv9br3
This commit is contained in:
1 parent
388ecf9603
commit
d654ce77fb
45 files changed
+1151
-7
No files matched your search
@@ -41,7 +41,12 @@ class AvailabilityRepository extends ServiceEntityRepository
|
||||
if (false === $custom) {
|
||||
$qb->andWhere($qb->expr()->isNull('availability.owner'));
|
||||
} else {
|
||||
$qb->andWhere($qb->expr()->isNotNull('availability.owner'));
|
||||
$qb
|
||||
->andWhere($qb->expr()->isNotNull('availability.owner'))
|
||||
// a deleted teamer takes no further assignments, so their own
|
||||
// availabilities must no longer be offered for disposition
|
||||
->andWhere($qb->expr()->isNull('teamer.deletedAt'))
|
||||
;
|
||||
}
|
||||
|
||||
return $qb->getQuery();
|
||||
@@ -49,6 +54,10 @@ class AvailabilityRepository extends ServiceEntityRepository
|
||||
|
||||
public function getSelectableForTeamer(Teamer $teamer): array
|
||||
{
|
||||
if (true === $teamer->isDeleted()) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$qb = $this->createQueryBuilder('availability');
|
||||
|
||||
return $qb
|
||||
|
||||
Reference in new issue
Block a user