|
62 | 62 | import de.symeda.sormas.backend.contact.Contact; |
63 | 63 | import de.symeda.sormas.backend.contact.ContactService; |
64 | 64 | import de.symeda.sormas.backend.event.EventService; |
| 65 | +import de.symeda.sormas.backend.facility.Facility; |
65 | 66 | import de.symeda.sormas.backend.facility.FacilityFacadeEjb; |
66 | 67 | import de.symeda.sormas.backend.facility.FacilityService; |
67 | 68 | import de.symeda.sormas.backend.infrastructure.PointOfEntryFacadeEjb; |
@@ -219,6 +220,7 @@ public List<UserDto> getIndexList(UserCriteria userCriteria, int first, int max, |
219 | 220 | Root<User> user = cq.from(User.class); |
220 | 221 | Join<User, District> district = user.join(User.DISTRICT, JoinType.LEFT); |
221 | 222 | Join<User, Location> address = user.join(User.ADDRESS, JoinType.LEFT); |
| 223 | + Join<User, Facility> facility = user.join(User.HEALTH_FACILITY, JoinType.LEFT); |
222 | 224 |
|
223 | 225 | // TODO: We'll need a user filter for users at some point, to make sure that users can edit their own details, |
224 | 226 | // but not those of others |
@@ -255,6 +257,9 @@ public List<UserDto> getIndexList(UserCriteria userCriteria, int first, int max, |
255 | 257 | case UserDto.ADDRESS: |
256 | 258 | expression = address.get(Location.REGION); |
257 | 259 | break; |
| 260 | + case UserDto.HEALTH_FACILITY: |
| 261 | + expression = facility.get(Facility.NAME); |
| 262 | + break; |
258 | 263 | default: |
259 | 264 | throw new IllegalArgumentException(sortProperty.propertyName); |
260 | 265 | } |
|
0 commit comments