From 24877f51af1cef6e3e87df3b7780936174ab3855 Mon Sep 17 00:00:00 2001 From: Ryan Prather Date: Tue, 3 Dec 2024 00:00:34 -0500 Subject: [PATCH] Updated repository --- src/Repository/UserRepository.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Repository/UserRepository.php b/src/Repository/UserRepository.php index 06c01a0..752422d 100644 --- a/src/Repository/UserRepository.php +++ b/src/Repository/UserRepository.php @@ -37,9 +37,9 @@ class UserRepository extends ServiceEntityRepository implements PasswordUpgrader public function getCaseManagers(Company $company): array { return $this->createQueryBuilder('u') - ->andWhere('u.job != :job') + ->andWhere('u.caseManager = :case_manager') ->andWhere('u.company = :company') - ->setParameter('job', 'CASE_WORKER') + ->setParameter('case_manager', true) ->setParameter('company', $company->getId()->toBinary()) ->getQuery() ->getResult() @@ -49,9 +49,9 @@ class UserRepository extends ServiceEntityRepository implements PasswordUpgrader public function getTherapists(Company $company): array { return $this->createQueryBuilder('u') - ->andWhere('u.job = :job') + ->andWhere('u.therapist = :therapist') ->andWhere('u.company = :company') - ->setParameter('job', 'THERAPIST') + ->setParameter('therapist', true) ->setParameter('company', $company->getId()->toBinary()) ->getQuery() ->getResult() @@ -61,9 +61,9 @@ class UserRepository extends ServiceEntityRepository implements PasswordUpgrader public function getAdmins(Company $company): array { return $this->createQueryBuilder('u') - ->andWhere('u.job = :job') + ->andWhere('u.su = :su') ->andWhere('u.company = :company') - ->setParameter('job', 'ADMIN') + ->setParameter('su', true) ->setParameter('company', $company->getId()->toBinary()) ->getQuery() ->getResult()