fix: remind house managers of their own pending list at the teamer reminder pace
This commit is contained in:
1 parent
ab6ffd4eda
commit
77d7000df3
11 files changed
+515
-73
No files matched your search
@@ -121,6 +121,28 @@ class UserRepository extends ServiceEntityRepository
|
||||
;
|
||||
}
|
||||
|
||||
/**
|
||||
* The house managers the nightly reminder may write to: not deleted and not blocked - a blocked
|
||||
* account cannot log in to do what it is reminded of. Hotel codes and muted notifications are
|
||||
* the caller's to check.
|
||||
*
|
||||
* @return User[]
|
||||
*/
|
||||
public function findHouseManagersToRemind(): array
|
||||
{
|
||||
$qb = $this->createQueryBuilder('user');
|
||||
|
||||
return $qb
|
||||
->where('JSON_CONTAINS(user.roles, :role) = 1')
|
||||
->andWhere($qb->expr()->isNull('user.deletedAt'))
|
||||
->andWhere($qb->expr()->isNull('user.disabledAt'))
|
||||
->setParameter('role', json_encode('ROLE_HOUSE_MANAGER'))
|
||||
->orderBy('user.id')
|
||||
->getQuery()
|
||||
->getResult()
|
||||
;
|
||||
}
|
||||
|
||||
public function getAutocompletionData(string $search, string $role): array
|
||||
{
|
||||
$qb = $this->createQueryBuilder('user');
|
||||
|
||||
Reference in new issue
Block a user