Skip to content

Commit

Permalink
Trimmed microplan name. Open Saved microplan with navigation for all …
Browse files Browse the repository at this point in the history
…steps unlocked
  • Loading branch information
siddhant-nawale-egov committed Jun 27, 2024
1 parent c29df69 commit 402d4ea
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const MicroplanDetails = ({
setMicroplanData((previous) => ({
...previous,
microplanDetails: {
name: microplan,
name: microplan?.trim(),
},
}));
}, [microplan]);
Expand Down Expand Up @@ -129,7 +129,7 @@ const MicroplanDetails = ({
setLoader("LOADING");
const body = {
PlanConfigurationSearchCriteria: {
name: microplan,
name: microplan?.trim(),
tenantId: Digit.ULBService.getCurrentTenantId(),
},
};
Expand Down Expand Up @@ -171,7 +171,7 @@ const MicroplanDetails = ({
setMicroplanData((previous) => ({
...previous,
microplanDetails: {
name: microplan,
name: microplan?.trim(),
},
}));
if (!["", null, undefined].includes(microplan)) {
Expand Down Expand Up @@ -292,4 +292,4 @@ const MicroplanDetails = ({
);
};

export default MicroplanDetails;
export default MicroplanDetails;
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Header, InboxSearchComposerV2, Loader } from "@egovernments/digit-ui-re
import { useHistory } from "react-router-dom";
import { updateSessionUtils } from "../../utils/updateSessionUtils";
import { useMyContext } from "../../utils/context";
import { timeLineOptions } from "../../configs/timeLineOptions.json";

const configs = {
label: "SAVED_MICROPLANS",
Expand Down Expand Up @@ -165,6 +166,10 @@ const SavedMicroplans = () => {
// Compute the session object based on the row?.original data and then re-route
const computedSession = await updateSessionUtils.computeSessionObject(row.original, state, additionalProps);
Digit.SessionStorage.set("microplanData", computedSession);
Digit.SessionStorage.set("microplanHelperData", {
...Digit.SessionStorage.set("microplanHelperData"),
activeSteps: timeLineOptions.length - 1,
});

setShowLoader(false);
history.push(`/${window.contextPath}/employee/microplanning/edit-saved-microplan?id=${row?.original?.executionPlanId}`);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ export const updateSessionUtils = {
MICROPLAN_DETAILS: true,
UPLOAD_DATA: true,
HYPOTHESIS: true,
MAPPING: true,
FORMULA_CONFIGURATION: true,
};
};
Expand Down

0 comments on commit 402d4ea

Please sign in to comment.