From b6d90da08ad07aa14438b7f6c9eb0a719daab55d Mon Sep 17 00:00:00 2001 From: himeshr Date: Thu, 5 Sep 2024 14:22:55 +0530 Subject: [PATCH] #1483 | params.myUserGroups returns only those UserGroups that are associated with current user --- .../openchs-android/src/service/RuleEvaluationService.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/openchs-android/src/service/RuleEvaluationService.js b/packages/openchs-android/src/service/RuleEvaluationService.js index d4ead055f..94cac1dc5 100644 --- a/packages/openchs-android/src/service/RuleEvaluationService.js +++ b/packages/openchs-android/src/service/RuleEvaluationService.js @@ -36,16 +36,16 @@ import IndividualService from "./IndividualService"; import EncounterService from "./EncounterService"; import EntityService from "./EntityService"; import * as rulesConfig from "rules-config"; +import {EditFormRuleResponse} from "rules-config"; import moment from "moment"; import GroupSubjectService from "./GroupSubjectService"; import ProgramService from "./program/ProgramService"; import individualServiceFacade from "./facade/IndividualServiceFacade"; import addressLevelServiceFacade from "./facade/AddressLevelServiceFacade"; import MessageService from './MessageService'; -import {Groups} from "openchs-models"; import {JSONStringify} from "../utility/JsonStringify"; import UserInfoService from "./UserInfoService"; -import {EditFormRuleResponse} from "rules-config"; +import PrivilegeService from './PrivilegeService'; function getImports() { return {rulesConfig, common, lodash, moment, motherCalculations, log: console.log}; @@ -875,7 +875,7 @@ class RuleEvaluationService extends BaseService { getCommonParams() { const user = this.getService(UserInfoService).getUserInfo(); - const myUserGroups = this.getService(EntityService).loadAll(Groups.schema.name); + const myUserGroups = this.getService(PrivilegeService).ownedGroups(); return { user, myUserGroups }; }