Skip to content

Commit

Permalink
Merge pull request #276 from amansinghbais/250-expired-record
Browse files Browse the repository at this point in the history
Improved: removed primaryFacilityGroupId filter while fetching facilities, and added filterByDate only if facilityGroup filter is applied(#250)
  • Loading branch information
ravilodhi authored Jun 24, 2024
2 parents 20bbb24 + c137ddd commit a8b3fe9
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 a8b3fe9

Please sign in to comment.