feat: soft-delete for teamer accounts

addresses #869dv9br3
This commit is contained in:
Björn Fromme committed 2026-08-11 12:26:13 +02:00
1 parent 388ecf9603
commit d654ce77fb
45 files changed
+1151 -7

No files matched your search

+9 -1
View File
@@ -106,7 +106,14 @@ class TeamerRepository extends ServiceEntityRepository
;
}
if (false === $filterDto->isIncludeInactive()) {
if (false === $filterDto->isIncludeDeleted()) {
$qb->andWhere($qb->expr()->isNull('teamer.deletedAt'));
}
// a deleted teamer never logs in again and would always count as inactive, so
// asking for them has to lift this filter - otherwise they could not be found
// again to be restored
if (false === $filterDto->isIncludeInactive() && false === $filterDto->isIncludeDeleted()) {
$qb
->andWhere($qb->expr()->gte('user.lastLoginAt', ':lastLoginThreshold'))
->setParameter('lastLoginThreshold', new \DateTimeImmutable($this->teamerInactivePeriod))
@@ -125,6 +132,7 @@ class TeamerRepository extends ServiceEntityRepository
$qb->expr()->like('teamer.lastName', ':search'),
$qb->expr()->like('teamer.firstName', ':search'),
))
->andWhere($qb->expr()->isNull('teamer.deletedAt'))
->orderBy('teamer.lastName', 'ASC')
->addOrderBy('teamer.firstName', 'ASC')
->setParameter('search', '%'.$this->escapeLikeWildcards($search).'%')