From c137ddd71a444702cccaeb82921bb8d6d1aef1d6 Mon Sep 17 00:00:00 2001 From: amansinghbais Date: Mon, 24 Jun 2024 15:06:49 +0530 Subject: [PATCH] Improved: removed primaryFacilityGroupId filter while fetching facilities, and adding filterByDate only if facilityGroup filter is applied(#250) --- src/store/modules/facility/actions.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/store/modules/facility/actions.ts b/src/store/modules/facility/actions.ts index 4c419970..6d7e7613 100644 --- a/src/store/modules/facility/actions.ts +++ b/src/store/modules/facility/actions.ts @@ -85,12 +85,8 @@ const actions: ActionTree = { if (state.facilityQuery.facilityGroupId) { filters['facilityGroupId'] = state.facilityQuery.facilityGroupId - filters['facilityGroupId_op'] = 'equals' - filters['facilityGroupId_grp'] = '2' - filters['primaryFacilityGroupId'] = state.facilityQuery.facilityGroupId - filters['primaryFacilityGroupId_op'] = 'equals' - filters['primaryFacilityGroupId_grp'] = '2' - filters['grp_op_2'] = 'OR' + filters['facilityGroupId_op'] = 'equals', + filters['filterByDate'] = 'Y' } const params = { @@ -103,7 +99,6 @@ const actions: ActionTree = { "distinct": "Y", "fromDateName": "facilityGroupFromDate", "thruDateName": "facilityGroupThruDate", - "filterByDate": "Y", "fieldList": ['facilityId', 'facilityName', 'facilityTypeId', 'maximumOrderLimit', 'defaultDaysToShip', 'externalId', 'primaryFacilityGroupId', 'parentFacilityTypeId'], ...payload }