Skip to content

Commit

Permalink
Improved: removed primaryFacilityGroupId filter while fetching facili…
Browse files Browse the repository at this point in the history
…ties, and adding filterByDate only if facilityGroup filter is applied(#250)
  • Loading branch information
amansinghbais committed Jun 24, 2024
1 parent 20bbb24 commit c137ddd
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/store/modules/facility/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,8 @@ const actions: ActionTree<FacilityState, RootState> = {

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 = {
Expand All @@ -103,7 +99,6 @@ const actions: ActionTree<FacilityState, RootState> = {
"distinct": "Y",
"fromDateName": "facilityGroupFromDate",
"thruDateName": "facilityGroupThruDate",
"filterByDate": "Y",
"fieldList": ['facilityId', 'facilityName', 'facilityTypeId', 'maximumOrderLimit', 'defaultDaysToShip', 'externalId', 'primaryFacilityGroupId', 'parentFacilityTypeId'],
...payload
}
Expand Down

0 comments on commit c137ddd

Please sign in to comment.