",
diff --git a/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/BoundaryKpi.js b/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/BoundaryKpi.js
index ea9677c7571..10103dca364 100644
--- a/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/BoundaryKpi.js
+++ b/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/BoundaryKpi.js
@@ -1,16 +1,20 @@
import React from 'react';
import { Card } from '@egovernments/digit-ui-components';
import { useMyContext } from '../utils/context';
+import { useTranslation } from 'react-i18next';
const BoundaryKpi = ({ data }) => {
- const {state:{boundaryHierarchy}} = useMyContext()
+ const { state: { boundaryHierarchy } } = useMyContext()
+ const { t } = useTranslation();
return (
- {Object.keys(data).map((key) => (
-
-
{String(data[key]).padStart(2, '0')}
-
{key}
-
- ))}
+ {Object.keys(data).map((key) => {
+ return (
+
+
{String(data[key]).padStart(2, '0')}
+
{t(`MICROPLAN_${key.toUpperCase()}`)}
{/* Correct use of t with template literal */}
+
+ );
+ })}
);
};
diff --git a/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/MicroplanCard.js b/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/MicroplanCard.js
index 1d33ca39010..679c77fe3f8 100644
--- a/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/MicroplanCard.js
+++ b/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/MicroplanCard.js
@@ -2,10 +2,22 @@ import { EmployeeModuleCard, WorksMgmtIcon } from "@egovernments/digit-ui-react-
import React from "react";
import { useTranslation } from "react-i18next";
+
const ROLES = {
MICROPLAN: ["MICROPLAN_ADMIN"],
+ SUPERVISOR:[
+ "PLAN_ESTIMATION_APPROVER",
+ "ROOT_PLAN_ESTIMATION_APPROVER",
+ "POPULATION_DATA_APPROVER",
+ "ROOT_POPULATION_DATA_APPROVER",
+ "FACILITY_CATCHMENT_MAPPER",
+ "ROOT_FACILITY_CATCHMENT_MAPPER",
+ "MICROPLAN_VIEWER"
+ ]
};
+
+
const MicroplanCard = () => {
const { t } = useTranslation();
const tenantId = Digit.ULBService.getCurrentTenantId();
@@ -18,7 +30,20 @@ const MicroplanCard = () => {
};
};
- let links = [generateLink("SETUP_MICROPLAN","setup-microplan"),generateLink("SEARCH_MICROPLANS","microplan-search"),generateLink("USER_MANAGEMENT","user-management")];
+ const generateOtherLink = (labelKey, pathSuffix) => {
+ return {
+ label: t(labelKey),
+ link: `/${window?.contextPath}/employee/microplan/${pathSuffix}`,
+ roles: ROLES.SUPERVISOR,
+ };
+ };
+
+ let links = [
+ generateLink("SETUP_MICROPLAN","setup-microplan"),
+ generateLink("SEARCH_MICROPLANS","microplan-search"),
+ generateLink("USER_MANAGEMENT","user-management"),
+ generateOtherLink("MY_MICROPLANS","my-microplans")
+ ];
links = links.filter((link) => (link?.roles && link?.roles?.length > 0 ? Digit.Utils.didEmployeeHasAtleastOneRole(link?.roles) : true));
@@ -31,4 +56,4 @@ const MicroplanCard = () => {
return ;
};
-export default MicroplanCard;
+export default MicroplanCard;
\ No newline at end of file
diff --git a/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/configs/MicroplanSearchConfig.js b/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/configs/MicroplanSearchConfig.js
index 176de7bbf5a..da7da31bdd5 100644
--- a/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/configs/MicroplanSearchConfig.js
+++ b/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/configs/MicroplanSearchConfig.js
@@ -2,126 +2,125 @@
// default values of search input component
const defaultSearchValues = {
- microplanName: "",
+ microplanName: "",
+
+};
+
- };
+ //config for tab search sceeen
+ export const TabSearchconfig = {
+ // moduleName: "commonCampaignUiConfig",
+ showTab: true, // setting true will enable tab screen
+ TabSearchconfig: [ // all tab config should be added in json array
+ {
+ label: "MY_MICROPLANS",
+ type: "search",
+ apiDetails: {
+ serviceName: "/plan-service/config/_search", //! Note
+ requestParam: {},
+ requestBody: {},
+ masterName: "commonUiConfig",
+ moduleName: "MicroplanSearchConfig",
+ minParametersForSearchForm: 0,
+ tableFormJsonPath: "requestBody.PlanConfigurationSearchCriteria.pagination",
+ // filterFormJsonPath: "requestBody.MdmsCriteria.customs",
+ searchFormJsonPath: "requestBody.PlanConfigurationSearchCriteria",
+ },
+
+ sections: {
+ search: {
+ uiConfig: {
+ formClassName: "custom-both-clear-search",
+ primaryLabel: "ES_COMMON_SEARCH",
+ secondaryLabel: "ES_COMMON_CLEAR_SEARCH",
+ minReqFields: 0,
+ defaultValues: defaultSearchValues, // Set default values for search fields
+ fields: [
+ {
+ label: "Name of the microplan",
+ isMandatory: false,
+ key: "microplanName",
+ type: "text",
+ populators: {
+ name: "microplanName",
+ error: "Required",
+ validation: { pattern: /^[A-Za-z]+$/i },
+ },
+ },
+ // {
+ // label: "Phone number",
+ // isMandatory: false,
+ // key: "Phone number",
+ // type: "number",
+ // disable: false,
+ // populators: { name: "mobileNumber", error: "sample error message", validation: { min: 0, max: 999999999 } },
+ // },
+ // {
+ // label: "Individual Id ",
+ // isMandatory: false,
+ // type: "text",
+ // disable: false,
+ // populators: {
+ // name: "individualId",
+ // },
+ // },
+ ],
+ },
-
- //config for tab search sceeen
- export const TabSearchconfig = {
- // moduleName: "commonCampaignUiConfig",
- showTab: true, // setting true will enable tab screen
- TabSearchconfig: [ // all tab config should be added in json array
- {
- label: "ALL",
- type: "search",
- apiDetails: {
- serviceName: "/plan-service/config/_search", //! Note
- requestParam: {},
- requestBody: {},
- masterName: "commonUiConfig",
- moduleName: "MicroplanSearchConfig",
- minParametersForSearchForm: 0,
- tableFormJsonPath: "requestBody.PlanConfigurationSearchCriteria.pagination",
- // filterFormJsonPath: "requestBody.MdmsCriteria.customs",
- searchFormJsonPath: "requestBody.PlanConfigurationSearchCriteria",
+ show: true,
},
+ searchResult: {
+ uiConfig: {
+ columns: [
+ {
+ label: "Name of the Microplan",
+ jsonPath: "name",
+ additionalCustomization:true
+ },
- sections: {
- search: {
- uiConfig: {
- formClassName: "custom-both-clear-search",
- primaryLabel: "ES_COMMON_SEARCH",
- secondaryLabel: "ES_COMMON_CLEAR_SEARCH",
- minReqFields: 0,
- defaultValues: defaultSearchValues, // Set default values for search fields
- fields: [
- {
- label: "Name of the microplan",
- isMandatory: false,
- key: "microplanName",
- type: "text",
- populators: {
- name: "microplanName",
- error: "Required",
- validation: { pattern: /^[A-Za-z]+$/i },
- },
- },
- // {
- // label: "Phone number",
- // isMandatory: false,
- // key: "Phone number",
- // type: "number",
- // disable: false,
- // populators: { name: "mobileNumber", error: "sample error message", validation: { min: 0, max: 999999999 } },
- // },
- // {
- // label: "Individual Id ",
- // isMandatory: false,
- // type: "text",
- // disable: false,
- // populators: {
- // name: "individualId",
- // },
- // },
- ],
- },
-
- show: true,
- },
- searchResult: {
- uiConfig: {
- columns: [
- {
- label: "Name of the Microplan",
- jsonPath: "name",
- additionalCustomization:true
- },
-
- {
- label: "Microplan Status",
- jsonPath: "status",
- },
- {
- label: "Campaign Disease",
- jsonPath: "CampaignDetails.campaignName",
- },
- {
- label:"Camapaign Type",
- jsonPath:"CampaignDetails.startDate"
- },
- {
- label:"Distribution Strategy",
- jsonPath:" proposalDate"
- },
- {
- label:"Actions",
- jsonPath:"",
- additionalCustomization:true
- }
- ],
- resultsJsonPath: "PlanConfiguration",
-
- enableColumnSort: true,
- // resultsJsonPath: "mdms",
- },
- show: true,
+ {
+ label: "Microplan Status",
+ jsonPath: "status",
+ },
+ {
+ label: "Campaign Disease",
+ jsonPath: "additionalDetails.disease",
+ },
+ {
+ label:"Camapaign Type",
+ jsonPath:"additionalDetails.campaignType"
+ },
+ {
+ label:"Distribution Strategy",
+ jsonPath:"additionalDetails.resourceDistributionStrategyCode"
+ },
+ {
+ label:"Actions",
+ jsonPath:"",
+ additionalCustomization:true
+ }
+ ],
+ resultsJsonPath: "PlanConfiguration",
+
+ enableColumnSort: true,
+ // resultsJsonPath: "mdms",
},
- // customHookName: "microplanv1.useSavedMicroplans", //! Note
-
+ show: true,
},
- customHookName:"microplanv1.useSavedMicroplans"
+ // customHookName: "microplanv1.useSavedMicroplans", //! Note
+
},
+ customHookName:"microplanv1.useSavedMicroplans"
+ },
+
+
+ {label: "DRAFTED_SETUP"},
+ {label: "EXECUTION_TO_BE_DONE",},
+ {label:"EXECUTION_IN_PROGRESS"},
+ {label:"MICROPLAN_EXECUTED"},
+
+
+ ],
+ };
-
- {label: "DRAFTED_SETUP"},
- {label: "EXECUTION_TO_BE_DONE",},
- {label:"EXECUTION_IN_PROGRESS"},
- {label:"MICROPLAN_EXECUTED"},
-
-
- ],
- };
-
-
-
\ No newline at end of file
+
diff --git a/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/configs/MyMicroplanSearchConfig.js b/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/configs/MyMicroplanSearchConfig.js
new file mode 100644
index 00000000000..f30837bae79
--- /dev/null
+++ b/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/configs/MyMicroplanSearchConfig.js
@@ -0,0 +1,124 @@
+
+
+// default values of search input component
+const defaultSearchValues = {
+ microplanName: "",
+
+ };
+
+
+ //config for tab search sceeen
+ export const TabSearchconfig = {
+ // moduleName: "commonCampaignUiConfig",
+ showTab: true, // setting true will enable tab screen
+ TabSearchconfig: [ // all tab config should be added in json array
+ {
+ label: "ALL",
+ type: "search",
+ apiDetails: {
+ serviceName: "/plan-service/config/_search", // Note
+ requestParam: {},
+ requestBody: {},
+ masterName: "commonUiConfig",
+ moduleName: "MyMicroplanSearchConfig", //uses same as microplan search
+ minParametersForSearchForm: 0,
+ tableFormJsonPath: "requestBody.PlanConfigurationSearchCriteria.pagination",
+ // filterFormJsonPath: "requestBody.MdmsCriteria.customs",
+ searchFormJsonPath: "requestBody.PlanConfigurationSearchCriteria",
+ },
+
+ sections: {
+ search: {
+ uiConfig: {
+ formClassName: "custom-both-clear-search",
+ primaryLabel: "ES_COMMON_SEARCH",
+ secondaryLabel: "ES_COMMON_CLEAR_SEARCH",
+ minReqFields: 0,
+ defaultValues: defaultSearchValues, // Set default values for search fields
+ fields: [
+ {
+ label: "Name of the microplan",
+ isMandatory: false,
+ key: "microplanName",
+ type: "text",
+ populators: {
+ name: "microplanName",
+ error: "Required",
+ validation: { pattern: /^[A-Za-z]+$/i },
+ },
+ },
+ // {
+ // label: "Phone number",
+ // isMandatory: false,
+ // key: "Phone number",
+ // type: "number",
+ // disable: false,
+ // populators: { name: "mobileNumber", error: "sample error message", validation: { min: 0, max: 999999999 } },
+ // },
+ // {
+ // label: "Individual Id ",
+ // isMandatory: false,
+ // type: "text",
+ // disable: false,
+ // populators: {
+ // name: "individualId",
+ // },
+ // },
+ ],
+ },
+
+ show: true,
+ },
+ searchResult: {
+ uiConfig: {
+ columns: [
+ {
+ label: "Name of the Microplan",
+ jsonPath: "name",
+ additionalCustomization:true
+ },
+
+ {
+ label: "Microplan Status",
+ jsonPath: "status",
+ },
+ {
+ label: "Campaign Disease",
+ jsonPath: "additionalDetails.disease",
+ },
+ {
+ label:"Camapaign Type",
+ jsonPath:"additionalDetails.campaignType"
+ },
+ {
+ label:"Distribution Strategy",
+ jsonPath:"additionalDetails.resourceDistributionStrategyCode"
+ },
+ {
+ label:"Actions",
+ jsonPath:"",
+ additionalCustomization:true
+ }
+ ],
+ resultsJsonPath: "PlanConfiguration",
+
+ enableColumnSort: true,
+ // resultsJsonPath: "mdms",
+ },
+ show: true,
+ },
+ // customHookName: "microplanv1.useSavedMicroplans", //! Note
+
+ },
+ customHookName:"microplanv1.useSavedMicroplans"
+ },
+ {label: "EXECUTION_TO_BE_DONE",},
+ {label:"EXECUTION_IN_PROGRESS"},
+ {label:"MICROPLAN_EXECUTED"},
+
+
+ ],
+ };
+
+
+
\ No newline at end of file
diff --git a/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/configs/UICustomizations.js b/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/configs/UICustomizations.js
index cd27afcada2..6635a616954 100644
--- a/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/configs/UICustomizations.js
+++ b/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/configs/UICustomizations.js
@@ -2,7 +2,9 @@ import { Link, useLocation, useHistory, useParams } from "react-router-dom";
import _ from "lodash";
import React from "react";
import { Dropdown } from "@egovernments/digit-ui-components";
-
+import { DeleteIconv2, DownloadIcon, FileIcon, Button, Card, CardSubHeader } from "@egovernments/digit-ui-react-components";
+import { EditIcon } from "@egovernments/digit-ui-react-components";
+import { ArrowForward } from "@egovernments/digit-ui-react-components";
//create functions here based on module name set in mdms(eg->SearchProjectConfig)
//how to call these -> Digit?.Customizations?.[masterName]?.[moduleName]
// these functions will act as middlewares
@@ -50,21 +52,37 @@ export const UICustomizations = {
data.body.PlanConfigurationSearchCriteria.status = status?.status;
cleanObject(data.body.PlanConfigurationSearchCriteria);
+ const dic = { '0': null, '1': ["DRAFT"], '2': ["EXECUTION_TO_BE_DONE"], '3': ["CENSUS_DATA_APPROVAL_IN_PROGRESS", "CENSUS_DATA_APPROVED", "RESOURCE_ESTIMATION_IN_PROGRESS"], "4": ["RESOURCE_ESTIMATIONS_APPROVED"] }
+ const url = Digit.Hooks.useQueryParams();
+
+ const tabId = url.tabId ?? '0'; // Default to '0' if tabId is undefined
+ data.body.PlanConfigurationSearchCriteria.status = dic[String(tabId)];
+ cleanObject(data.body.PlanConfigurationSearchCriteria)
return data;
},
additionalCustomizations: (row, key, column, value, t, searchResult) => {
if (key === "Actions") {
+ // `/${window.contextPath}/employee/microplan/setup-microplan?key=${9}&preview=${true}&action=${false}`
return (
{ console.log(e, "event") }}
+ select={(e) => {
+ console.log(e, "event"); // e contains the selected option
+ if (e.code === "1") {
+ // Use window.location.href to navigate
+ window.location.href = `/${window.contextPath}/employee/microplan/setup-microplan?key=${1}&preview=${true}&action=${false}µplanId=${row.id}&campaignId=${row.CampaignDetails.id}`;
+ }
+ if (e.code === "2") {
+ // Use window.location.href to navigate
+ window.location.href = `/${window.contextPath}/employee/microplan/setup-microplan?key=${9}&preview=${true}&action=${false}µplanId=${row.id}&campaignId=${row.CampaignDetails.id}`;
+ }
+ }}
optionKey={"name"}
selected={{ code: "1", name: "Actions" }}
- >
+ />
// $${value}
);
@@ -97,6 +115,98 @@ export const UICustomizations = {
},
},
+ MyMicroplanSearchConfig: {
+ preProcess: (data, additionalDetails) => {
+ const { name, status } = data?.state?.searchForm || {};
+
+ data.body.PlanConfigurationSearchCriteria = {};
+ data.body.PlanConfigurationSearchCriteria.limit = data?.state?.tableForm?.limit;
+ // data.body.PlanConfigurationSearchCriteria.limit = 10
+ data.body.PlanConfigurationSearchCriteria.offset = data?.state?.tableForm?.offset;
+ data.body.PlanConfigurationSearchCriteria.name = name;
+ data.body.PlanConfigurationSearchCriteria.tenantId = Digit.ULBService.getCurrentTenantId();
+ data.body.PlanConfigurationSearchCriteria.userUuid = Digit.UserService.getUser().info.uuid;
+ // delete data.body.PlanConfigurationSearchCriteria.pagination
+ data.body.PlanConfigurationSearchCriteria.status = status?.status;
+ cleanObject(data.body.PlanConfigurationSearchCriteria);
+
+ const dic = { '0': null, '1': ["DRAFT"], '2': ["EXECUTION_TO_BE_DONE"], '3': ["CENSUS_DATA_APPROVAL_IN_PROGRESS", "CENSUS_DATA_APPROVED", "RESOURCE_ESTIMATION_IN_PROGRESS"], "4": ["RESOURCE_ESTIMATIONS_APPROVED"] }
+ const url = Digit.Hooks.useQueryParams();
+
+ const tabId = url.tabId ?? '0'; // Default to '0' if tabId is undefined
+ data.body.PlanConfigurationSearchCriteria.status = dic[String(tabId)];
+ cleanObject(data.body.PlanConfigurationSearchCriteria)
+ return data;
+ },
+ additionalCustomizations: (row, key, column, value, t, searchResult) => {
+ if (key === "Actions") {
+ // `/${window.contextPath}/employee/microplan/setup-microplan?key=${9}&preview=${true}&action=${false}`
+ return (
+
+ row.status === "DRAFT" ? (}
+ type="button"
+ className="dm-workbench-download-template-btn dm-hover"
+ onButtonClick={(e) => {
+
+ }}
+ />) : (row.status === "EXECUTION_TO_BE_DONE") ? (
+ }
+ type="button"
+ className="dm-workbench-download-template-btn dm-hover"
+ onButtonClick={(e) => {
+
+ }}
+ />
+ ) : (row.status === "RESOURCE_ESTIMATIONS_APPROVED") ? (
+ }
+ type="button"
+ className="dm-workbench-download-template-btn dm-hover"
+ onButtonClick={(e) => {
+
+ }}
+ />
+ ) : null
+
+
+ );
+ }
+
+ if (key === "Name of the Microplan") {
+ if (value && value !== "NA") {
+
+ return (
+
+ )
+ } else {
+ return (
+
+ )
+ }
+
+ }
+
+ },
+ },
UserManagementConfig: {
@@ -106,7 +216,7 @@ export const UICustomizations = {
// Allow empty mobile number
if (!phone || phone.trim() === "") {
- return false;
+ return false;
}
// Check if phone matches the regex
@@ -114,7 +224,7 @@ export const UICustomizations = {
return { error: true, label: "INVALID_MOBILE_NUMBER" }; // Return an error message if invalid
}
- return false;
+ return false;
},
@@ -122,7 +232,7 @@ export const UICustomizations = {
const { phone, name } = data?.state?.searchForm || {}
const { sortOrder } = data?.state?.filterForm || {}
let { roleschosen } = data?.state?.filterForm || []
-
+
if (!roleschosen) {
roleschosen = {}
}
@@ -138,12 +248,12 @@ export const UICustomizations = {
if (roleschosen) {
rolesString = Object.keys(roleschosen).filter(role => roleschosen[role] === true).join(',');
}
-
+
data.params.names = name;
data.params.phone = phone;
-
+
data.params.roles = rolesString;
data.params.tenantId = Digit.ULBService.getCurrentTenantId();
cleanObject(data.params);
@@ -162,7 +272,7 @@ export const UICustomizations = {
body: {
MdmsCriteria: {
- tenantId: Digit.ULBService.getCurrentTenantId(),
+ tenantId: Digit.ULBService.getCurrentTenantId(),
filters: {},
schemaCode: "hcm-microplanning.rolesForMicroplan",
limit: 10,
@@ -185,7 +295,7 @@ export const UICustomizations = {
}
)
})
-
+
return roles
},
},
@@ -195,15 +305,15 @@ export const UICustomizations = {
additionalCustomizations: (row, key, column, value, t, searchResult) => {
if (key === "Role") {
- return(
-
- {value.map((item, index) => (
-
- {t(`MP_ROLE_${item.code}`)}
- {index < value.length - 1 && ", "}
-
- ))}
-
+ return (
+
+ {value.map((item, index) => (
+
+ {t(`MP_ROLE_${item.code}`)}
+ {index < value.length - 1 && ", "}
+
+ ))}
+
);
diff --git a/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/hooks/services/createUpdatePlanProject.js b/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/hooks/services/createUpdatePlanProject.js
index 4840cde3751..064bbb59710 100644
--- a/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/hooks/services/createUpdatePlanProject.js
+++ b/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/hooks/services/createUpdatePlanProject.js
@@ -66,6 +66,7 @@ const CreateResource = async (req) => {
additionalDetails: {
resourceDistributionStrategy: totalFormData?.CAMPAIGN_DETAILS?.campaignDetails?.distributionStrat?.resourceDistributionStrategyCode,
source: "microplan",
+ disease:totalFormData?.CAMPAIGN_DETAILS?.campaignDetails?.disease?.code
},
};
const campaignRes = await Digit.CustomService.getResponse({
diff --git a/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/MyMicroplans.js b/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/MyMicroplans.js
new file mode 100644
index 00000000000..4693d8af7ef
--- /dev/null
+++ b/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/MyMicroplans.js
@@ -0,0 +1,50 @@
+import { Header, InboxSearchComposer } from "@egovernments/digit-ui-react-components";
+import React, { useState, useEffect } from "react";
+import { useTranslation } from "react-i18next";
+import { TabSearchconfig } from "../../configs/MyMicroplanSearchConfig";
+
+
+
+const defaultSearchValues = {
+
+};
+
+const MyMicroplans = () => {
+ const { t } = useTranslation();
+ const [defaultValues, setDefaultValues] = useState(defaultSearchValues); // State to hold default values for search fields
+ const [config, setConfig] = useState(TabSearchconfig?.TabSearchconfig?.[0]); // initially setting first index config as default from jsonarray
+ const [tabData, setTabData] = useState(
+ TabSearchconfig?.TabSearchconfig?.map((configItem, index) => ({ key: index, label: configItem.label, active: index === 0 ? true : false }))
+ ); // setting number of tab component and making first index enable as default
+ useEffect(() => {
+ // Set default values when component mounts
+ setDefaultValues(defaultSearchValues);
+ }, []);
+
+ const onTabChange = (n) => {
+
+ setTabData((prev) => prev.map((i, c) => ({ ...i, active: c === n ? true : false }))); //setting tab enable which is being clicked
+ // setConfig(TabSearchconfig?.TabSearchconfig?.[n]);// as per tab number filtering the config
+ const url = new URL(window.location.href);
+ url.searchParams.set("tabId", `${n}`);
+ window.history.replaceState({}, "", url);
+
+ };
+ return (
+
+
+
+
+ {/* Pass defaultValues as props to InboxSearchComposer */}
+
+
+
+ );
+};
+export default MyMicroplans;
\ No newline at end of file
diff --git a/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/index.js b/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/index.js
index 161fdfbdd84..d539120264e 100644
--- a/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/index.js
+++ b/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/index.js
@@ -13,6 +13,7 @@ import TableNew from "./TablePage";
import PopInbox from "./PopInbox";
import UserUpload from "../../components/UserUpload";
import UserDownload from "./UserDownload";
+import MyMicroplans from "./MyMicroplans";
import ChooseActivity from "./ChooseActivity";
@@ -177,6 +178,10 @@ const App = ({ path, stateCode, userType, tenants,BOUNDARY_HIERARCHY_TYPE, hiera
} />
} />
} />
+ } />
+
+ {/* my-microplans */}
+
);
diff --git a/health/micro-ui/web/public/index.html b/health/micro-ui/web/public/index.html
index b563bcfa8c3..dd7e1e39637 100644
--- a/health/micro-ui/web/public/index.html
+++ b/health/micro-ui/web/public/index.html
@@ -12,7 +12,7 @@
-
+