Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed assumption form multi save #1781

Merged
merged 1 commit into from
Nov 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ const SetupMicroplan = ({ hierarchyType, hierarchyData }) => {
setLoader(true);
updateResources(propsForMutate, {
onSuccess: (data) => {
setLoader(false);
// Check if there is a redirectTo property in the response
if (data?.redirectTo) {
history.push(data?.redirectTo, data?.state); // Navigate to the specified route
Expand Down Expand Up @@ -199,16 +198,20 @@ const SetupMicroplan = ({ hierarchyType, hierarchyData }) => {
HYPOTHESIS: null,
FORMULA_CONFIGURATION: null,
});

setCurrentKey((prev) => prev + 1);
setCurrentStep((prev) => prev + 1);

//since we are invalidating we need to update this global state
dispatch({
type: "MASTER_DATA",
state: {
allAssumptions:[],
},
});
setCurrentKey((prev) => prev + 1);
setCurrentStep((prev) => prev + 1);
}

setLoader(false);
},
onError: (error, variables) => {
setLoader(false);
Expand Down