diff --git a/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/ChooseActivity.js b/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/ChooseActivity.js index 27857ac2b9..92145afe24 100644 --- a/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/ChooseActivity.js +++ b/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/ChooseActivity.js @@ -28,6 +28,7 @@ const ChooseActivity = () => { // // Watch for campaignId or microplanId changes to trigger the fetch useEffect(() => { refetchPlanObject(); + refetchProcessInstance(); }, [microplanId, campaignId]); const { isLoading: isBusinessServiceLoading, data: workflowData, } = Digit.Hooks.useCustomAPIHook({ @@ -47,7 +48,7 @@ const ChooseActivity = () => { }); // fetch the process instance for the current microplan to check if current process is done or not - const { isLoading:isProcessLoading, data: processData, revalidate } = Digit.Hooks.useCustomAPIHook({ + const { isLoading:isProcessLoading, data: processData, revalidate, refetch:refetchProcessInstance } = Digit.Hooks.useCustomAPIHook({ url: "/egov-workflow-v2/egov-wf/process/_search", params: { tenantId: tenantId, diff --git a/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PlanInbox.js b/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PlanInbox.js index a482608b31..679c4e38a6 100644 --- a/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PlanInbox.js +++ b/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PlanInbox.js @@ -852,7 +852,7 @@ const PlanInbox = () => { { - history.push(`/${window.contextPath}/employee/microplan/select-activity?microplanId=${url?.microplanId}&campaignId=${url?.campaignId}`); + history.push(`/${window.contextPath}/employee`); }} type="button" variation="primary" />, ]} className="" diff --git a/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js b/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js index 910c0dd0bc..4973123e48 100644 --- a/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js +++ b/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/PopInbox.js @@ -518,7 +518,7 @@ const PopInbox = () => { }, ]; - if (isPlanEmpSearchLoading || isLoadingCampaignObject || isLoading || isWorkflowLoading || isEmployeeLoading || mutation.isLoading) { + if (isPlanEmpSearchLoading || isLoadingCampaignObject || isLoading || isWorkflowLoading || isEmployeeLoading || mutation.isLoading || isFetching) { return ; } @@ -535,7 +535,6 @@ const PopInbox = () => { } }); - return (
@@ -560,60 +559,59 @@ const PopInbox = () => { onClear={onClear} /> -
- - -
- {showTab && ( - { - setActiveLink(e); - }} - setActiveLink={setActiveLink} - showNav={showTab} - style={{}} - /> - )} - - {villagesSlected !== 0 && ( -
-
- -
{`${villagesSlected} ${t("MICROPLAN_VILLAGES_SELECTED")}`}
-
- -
- {actionsMain?.filter((action) => !actionsToHide.includes(action.action)).length > 1 ? ( - !actionsToHide.includes(action.action)) - ?.map((action, index) => { - - const isPrimary = getButtonState(action.action); - - return ( +
+ + +
+ {showTab && ( + { + setActiveLink(e); + }} + setActiveLink={setActiveLink} + showNav={showTab} + style={{}} + /> + )} + + {villagesSlected !== 0 && ( +
+
+ +
{`${villagesSlected} ${t("MICROPLAN_VILLAGES_SELECTED")}`}
+
+ +
+ {actionsMain?.filter((action) => !actionsToHide.includes(action.action)).length > 1 ? ( + !actionsToHide.includes(action.action)) + ?.map((action, index) => { + + const isPrimary = getButtonState(action.action); + + return (