Skip to content

Commit

Permalink
#1340 | Ignore locationMapping while storing selectedLocationMappings…
Browse files Browse the repository at this point in the history
… in cache as they result in cyclical structure in JSON object
  • Loading branch information
himeshr committed Mar 11, 2024
1 parent af02ea1 commit f036dbe
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -360,11 +360,19 @@ class MyDashboardActions {
'programExitDateTime = null'
].filter(Boolean).join(" AND ");

const transformedSelectedLocations = (action.selectedLocations && !_.isNil(action.selectedLocations)) ? action.selectedLocations.map(({
uuid,
name,
level,
type,
isSelected,
parentUuid
}) => ({uuid, name, level, type, parentUuid, isSelected})) : [];
const newState = {
...state,
filters: newFilters,
locationSearchCriteria: action.locationSearchCriteria.clone(),
selectedLocations: action.selectedLocations,
selectedLocations: transformedSelectedLocations,
addressLevelState: action.addressLevelState.clone(),
date: {value: action.filterDate},
programs: action.programs,
Expand Down

0 comments on commit f036dbe

Please sign in to comment.