Updated repository
This commit is contained in:
parent
bbfce2b424
commit
24877f51af
@ -37,9 +37,9 @@ class UserRepository extends ServiceEntityRepository implements PasswordUpgrader
|
|||||||
public function getCaseManagers(Company $company): array
|
public function getCaseManagers(Company $company): array
|
||||||
{
|
{
|
||||||
return $this->createQueryBuilder('u')
|
return $this->createQueryBuilder('u')
|
||||||
->andWhere('u.job != :job')
|
->andWhere('u.caseManager = :case_manager')
|
||||||
->andWhere('u.company = :company')
|
->andWhere('u.company = :company')
|
||||||
->setParameter('job', 'CASE_WORKER')
|
->setParameter('case_manager', true)
|
||||||
->setParameter('company', $company->getId()->toBinary())
|
->setParameter('company', $company->getId()->toBinary())
|
||||||
->getQuery()
|
->getQuery()
|
||||||
->getResult()
|
->getResult()
|
||||||
@ -49,9 +49,9 @@ class UserRepository extends ServiceEntityRepository implements PasswordUpgrader
|
|||||||
public function getTherapists(Company $company): array
|
public function getTherapists(Company $company): array
|
||||||
{
|
{
|
||||||
return $this->createQueryBuilder('u')
|
return $this->createQueryBuilder('u')
|
||||||
->andWhere('u.job = :job')
|
->andWhere('u.therapist = :therapist')
|
||||||
->andWhere('u.company = :company')
|
->andWhere('u.company = :company')
|
||||||
->setParameter('job', 'THERAPIST')
|
->setParameter('therapist', true)
|
||||||
->setParameter('company', $company->getId()->toBinary())
|
->setParameter('company', $company->getId()->toBinary())
|
||||||
->getQuery()
|
->getQuery()
|
||||||
->getResult()
|
->getResult()
|
||||||
@ -61,9 +61,9 @@ class UserRepository extends ServiceEntityRepository implements PasswordUpgrader
|
|||||||
public function getAdmins(Company $company): array
|
public function getAdmins(Company $company): array
|
||||||
{
|
{
|
||||||
return $this->createQueryBuilder('u')
|
return $this->createQueryBuilder('u')
|
||||||
->andWhere('u.job = :job')
|
->andWhere('u.su = :su')
|
||||||
->andWhere('u.company = :company')
|
->andWhere('u.company = :company')
|
||||||
->setParameter('job', 'ADMIN')
|
->setParameter('su', true)
|
||||||
->setParameter('company', $company->getId()->toBinary())
|
->setParameter('company', $company->getId()->toBinary())
|
||||||
->getQuery()
|
->getQuery()
|
||||||
->getResult()
|
->getResult()
|
||||||
|
Loading…
Reference in New Issue
Block a user