Skip to content

Commit bcb3a79

Browse files
nipunarora-eGovjagankumar-egovSwathi-eGovabishekTa-egov
authored
RELEASE/HCMPRE-1923 : Microplanning 0.2 release (#2134)
* BUGFIX/HCMPRE-1634: fix for versions (#2024) * Revert "Bugfix/hcmpre 1583 (#2021)" This reverts commit 201a0ce. * BUGFIX/HCMPRE-1634 Revert ing"updated core version (#2020)" * BUGFIX/HCMPRE-1583 fixes --------- Co-authored-by: Swathi-eGov <[email protected]> * FEATURE/HCMPRE-1634:Fixed all the version updates (#2026) FEATURE/HCMPRE-1634: Fixed all the version updates * BUGFIX/HCMPRE-1505 : Updated Core Version To Fix Validation Issue on … (#2047) BUGFIX/HCMPRE-1505 : Updated Core Version To Fix Validation Issue on Profile Update * BUGFIX/HCMPRE-15830 : Fixed checkbox click area (#2064) Css changes * FEATURE/HCMPRE-1789 : Draft Flow (#2093) * changes to createUpdatePlan * Changes to UI, createUpdatePlan * Putting the Hierarchy near the name * Loc change * Resolved comments * Null check for Hierarchy level * Changes * Indirectly Mutating planObject * changes * changes --------- Co-authored-by: Abishek <[email protected]> * FEATURE/HCMPRE-1787 : Untagging all the current users if boundary is (#2092) * FEATURE/HCMPRE-1787 : Untagging all the current users if boundary is changed during setup * FEATUTE/HCMPRE-1787 : Added different error cases * FEATURE/HCMPRE-1710: Accessibility dropdown for planInbox with plan integration and apply filter (#2091) * Adding filters * Working Filter Search * InboxFilter Changes * removing console.log * Css package update * changes * changes * changes * changes * changes * A lot of changes * changes * changes * changes * uniform payload structure * FEATURE/HCMPRE-1712: Facility Dropdown for plan Inbox (#2096) * Adding filters * Working Filter Search * InboxFilter Changes * removing console.log * Css package update * changes * changes * changes * changes * changes * A lot of changes * changes * changes * changes * uniform payload structure * Adding Facility Dropdown * code replacing name attribute * Loader changes * comments resolved * Loader change * Id to id * BUGFIX/HCMPRE-1810: Fix issue for next page in user tagging (#2104) * for clickng on save and next * remove console * FEATURE/HCMPRE-1706: Plan Inbox updates and draft flow changes (#2109) * updated plan inbox * Update createUpdatePlanProject.js * formatted createupdateplanproject * FEATURE/HCMPRE-1681: Handled the case where capacity is 0 and tested full flow (#2111) handled the case where capacity is 0 and tested full flow * FEATURE/HCMPRE-1713: PopInbox and filtering integration (#2108) * PopInbox and facilityId search in planInbox * Localization * Chages to CSS and removing filter * Changes to facility filter and security Question * css package update * facilityId removed * Resolved comments, made payload to facilityId * component package update * FEATURE/HCMPRE-1704 : Removing current validation from assumptions an… (#2122) * FEATURE/HCMPRE-1704 : Removing current validation from assumptions and making sure the flow works as expected( for mixed strat, regis and dist can be same) * FEATURE/HCMPRE-1704 : Review updates * BUGFIX/HCMPRE-1584: Disable planSearch for popInbox and CSS for dropdown (#2123) * BUGFIX/HCMPRE-1866 : Updated versions (#2128) * FEATURE/HCMPRE-0000 : Fix for serach query in user tagging screen (#2132) * BUGFIX/HCMPRE-1944: TotalCount UI issue in planIbox (#2138) * useEffect updated * CountAssignToAll issue in planInbox * BUGFIX/HCMPRE-2212 : Updated Facility Filter as a Multiselect dropdown * Fixed facility filter issue * FEATURE/HCMPRE-0000 : Fixed Css Issue (#2178) --------- Co-authored-by: Jagankumar <[email protected]> Co-authored-by: Swathi-eGov <[email protected]> Co-authored-by: Swathi-eGov <[email protected]> Co-authored-by: abishekTa-egov <[email protected]>
1 parent d42d12e commit bcb3a79

File tree

20 files changed

+715
-331
lines changed

20 files changed

+715
-331
lines changed

health/micro-ui/web/micro-ui-internals/example/public/index.html

+2-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@
1111
<meta name="theme-color" content="#00bcd1" />
1212
<title>DIGIT</title>
1313
<link rel="stylesheet" href="https://unpkg.com/@egovernments/[email protected]/dist/index.css" />
14-
<link rel="stylesheet" href="https://unpkg.com/@egovernments/[email protected]/dist/index.css" />
15-
<link rel="stylesheet" href="https://unpkg.com/@egovernments/[email protected]/dist/index.css" />
16-
14+
<link rel="stylesheet" href="https://unpkg.com/@egovernments/[email protected]/dist/index.css" />
15+
<link rel="stylesheet" href="https://unpkg.com/@egovernments/[email protected]/dist/index.css" />
1716

1817
<!-- added below css for hcm-workbench module inclusion-->
1918
<!-- <link rel="stylesheet" href="https://unpkg.com/@egovernments/[email protected]/dist/index.css" /> -->

health/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js

+170-164
Original file line numberDiff line numberDiff line change
@@ -765,176 +765,177 @@ export const UICustomizations = {
765765
}
766766
},
767767
},
768-
MicroplanSearchConfig: {
769-
preProcess: (data, additionalDetails) => {
770-
const { name, status } = data?.state?.searchForm || {};
771-
data.body.PlanConfigurationSearchCriteria = {};
772-
data.body.PlanConfigurationSearchCriteria.limit = data?.state?.tableForm?.limit;
773-
// data.body.PlanConfigurationSearchCriteria.limit = 10
774-
data.body.PlanConfigurationSearchCriteria.offset = data?.state?.tableForm?.offset;
775-
data.body.PlanConfigurationSearchCriteria.name = name;
776-
data.body.PlanConfigurationSearchCriteria.tenantId = Digit.ULBService.getCurrentTenantId();
777-
data.body.PlanConfigurationSearchCriteria.userUuid = Digit.UserService.getUser().info.uuid;
778-
// delete data.body.PlanConfigurationSearchCriteria.pagination
779-
data.body.PlanConfigurationSearchCriteria.status = status?.status;
780-
data.body.PlanConfigurationSearchCriteria.name = data?.state?.searchForm?.microplanName;
781-
cleanObject(data.body.PlanConfigurationSearchCriteria);
782-
783-
const dic = {
784-
0: null,
785-
1: ["DRAFT"],
786-
2: ["EXECUTION_TO_BE_DONE"],
787-
3: ["CENSUS_DATA_APPROVAL_IN_PROGRESS", "CENSUS_DATA_APPROVED", "RESOURCE_ESTIMATION_IN_PROGRESS"],
788-
4: ["RESOURCE_ESTIMATIONS_APPROVED"],
789-
};
790-
const url = Digit.Hooks.useQueryParams();
791-
792-
const tabId = url.tabId || "0"; // Default to '0' if tabId is undefined
793-
data.body.PlanConfigurationSearchCriteria.status = dic[String(tabId)];
794-
cleanObject(data.body.PlanConfigurationSearchCriteria);
795-
return data;
796-
},
797-
additionalCustomizations: (row, key, column, value, t, searchResult) => {
798-
799-
switch (key) {
800-
case "ACTIONS":
801-
// TODO : Replace dummy file id with real file id when API is ready
802-
const dummyFile = "c22a7676-d5d7-49b6-bcdb-83e9519f58df"
803-
const microplanFileId = row?.campaignDetails?.additionalDetails?.microplanFileId || dummyFile;
804-
let options = [];
805-
806-
if (row?.status == "DRAFT") {
807-
options = [{ code: "1", name: "MP_ACTIONS_EDIT_SETUP" }];
808-
} else {
809-
options = [{ code: "1", name: "MP_ACTIONS_VIEW_SUMMARY" }];
810-
}
811-
812-
const handleDownload = () => {
813-
const files = row?.files;
814-
const file = files.find((item) => item.templateIdentifier === "Population");
815-
const fileId = file?.filestoreId;
816-
const campaignName = row?.name || "";
817-
if (!fileId) {
818-
console.error("Population template file not found");
819-
return;
820-
}
821-
Digit.Utils.campaign.downloadExcelWithCustomName({
822-
fileStoreId: fileId,
823-
customName: campaignName
824-
});
825-
};
826-
827-
const onActionSelect = (e) => {
828-
if (e.name == "MP_ACTIONS_EDIT_SETUP") {
829-
window.location.href = `/${window.contextPath}/employee/microplan/setup-microplan?key=${1}&microplanId=${row.id}&campaignId=${
830-
row.campaignDetails.id
831-
}`;
832-
}
833-
if (e.name == "MP_ACTIONS_VIEW_SUMMARY") {
834-
window.location.href = `/${window.contextPath}/employee/microplan/setup-microplan?key=${10}&microplanId=${row.id}&campaignId=${
835-
row.campaignDetails.id
836-
}&setup-completed=true`;
768+
MicroplanSearchConfig: {
769+
preProcess: (data, additionalDetails) => {
770+
const { name, status } = data?.state?.searchForm || {};
771+
data.body.PlanConfigurationSearchCriteria = {};
772+
data.body.PlanConfigurationSearchCriteria.limit = data?.state?.tableForm?.limit;
773+
// data.body.PlanConfigurationSearchCriteria.limit = 10
774+
data.body.PlanConfigurationSearchCriteria.offset = data?.state?.tableForm?.offset;
775+
data.body.PlanConfigurationSearchCriteria.name = name;
776+
data.body.PlanConfigurationSearchCriteria.tenantId = Digit.ULBService.getCurrentTenantId();
777+
data.body.PlanConfigurationSearchCriteria.userUuid = Digit.UserService.getUser().info.uuid;
778+
// delete data.body.PlanConfigurationSearchCriteria.pagination
779+
data.body.PlanConfigurationSearchCriteria.status = status?.status;
780+
data.body.PlanConfigurationSearchCriteria.name = data?.state?.searchForm?.microplanName;
781+
cleanObject(data.body.PlanConfigurationSearchCriteria);
782+
783+
const dic = {
784+
0: null,
785+
1: ["DRAFT"],
786+
2: ["EXECUTION_TO_BE_DONE"],
787+
3: ["CENSUS_DATA_APPROVAL_IN_PROGRESS", "CENSUS_DATA_APPROVED", "RESOURCE_ESTIMATION_IN_PROGRESS"],
788+
4: ["RESOURCE_ESTIMATIONS_APPROVED"],
789+
};
790+
const url = Digit.Hooks.useQueryParams();
791+
792+
const tabId = url.tabId || "0"; // Default to '0' if tabId is undefined
793+
data.body.PlanConfigurationSearchCriteria.status = dic[String(tabId)];
794+
cleanObject(data.body.PlanConfigurationSearchCriteria);
795+
return data;
796+
},
797+
additionalCustomizations: (row, key, column, value, t, searchResult) => {
798+
799+
switch (key) {
800+
case "ACTIONS":
801+
// TODO : Replace dummy file id with real file id when API is ready
802+
const dummyFile = "c22a7676-d5d7-49b6-bcdb-83e9519f58df"
803+
const microplanFileId = row?.campaignDetails?.additionalDetails?.microplanFileId || dummyFile;
804+
let options = [];
805+
806+
if (row?.status == "DRAFT") {
807+
options = [{ code: "1", name: "MP_ACTIONS_EDIT_SETUP" }];
808+
} else {
809+
options = [{ code: "1", name: "MP_ACTIONS_VIEW_SUMMARY" }];
837810
}
838-
};
839-
840-
return (
841-
<div>
842-
{microplanFileId && row?.status == "RESOURCE_ESTIMATIONS_APPROVED" ? (
843-
<div>
844-
<ButtonNew style={{ width: "20rem" }} onClick={handleDownload} icon="DownloadIcon" label={t("WBH_DOWNLOAD_MICROPLAN")} title={t("WBH_DOWNLOAD_MICROPLAN")} />
845-
</div>
846-
) : (
847-
<div className={"action-button-open-microplan"}>
848-
<div style={{ position: "relative" }}>
849-
<ButtonNew
850-
type="actionButton"
851-
variation="secondary"
852-
label={t("MP_ACTIONS_FOR_MICROPLAN_SEARCH")}
853-
title={t("MP_ACTIONS_FOR_MICROPLAN_SEARCH")}
854-
options={options}
855-
style={{ width: "20rem" }}
856-
optionsKey="name"
857-
showBottom={true}
858-
isSearchable={false}
859-
onOptionSelect={(item) => onActionSelect(item)}
860-
/>
861-
</div>
862-
</div>
863-
)}
864-
</div>
865-
);
866-
867-
case "NAME_OF_MICROPLAN":
868-
if (value && value !== "NA") {
869-
return (
870-
<div
871-
style={{
872-
maxWidth: "15rem", // Set the desired maximum width
873-
wordWrap: "break-word", // Allows breaking within words
874-
whiteSpace: "normal", // Ensures text wraps normally
875-
overflowWrap: "break-word", // Break long words at the edge
876-
}}
877-
>
878-
<p>{t(value)}</p>
879-
</div>
880-
);
881-
} else {
811+
812+
const handleDownload = () => {
813+
const files = row?.files;
814+
const file = files.find((item) => item.templateIdentifier === "Population");
815+
const fileId = file?.filestoreId;
816+
if (!fileId) {
817+
console.error("Population template file not found");
818+
return;
819+
}
820+
const campaignName = row?.name || "";
821+
Digit.Utils.campaign.downloadExcelWithCustomName({
822+
fileStoreId: fileId,
823+
customName: campaignName
824+
});
825+
};
826+
827+
const onActionSelect = (e) => {
828+
if (e.name === "MP_ACTIONS_EDIT_SETUP") {
829+
const key = parseInt(row?.additionalDetails?.key);
830+
const resolvedKey = key === 8 ? 7 : key === 9 ? 10 : key || 2;
831+
const url = `/${window.contextPath}/employee/microplan/setup-microplan?key=${resolvedKey}&microplanId=${row.id}&campaignId=${row.campaignDetails.id}`;
832+
window.location.href = url;
833+
}
834+
if (e.name == "MP_ACTIONS_VIEW_SUMMARY") {
835+
window.location.href = `/${window.contextPath}/employee/microplan/setup-microplan?key=${10}&microplanId=${row.id}&campaignId=${
836+
row.campaignDetails.id
837+
}&setup-completed=true`;
838+
}
839+
};
840+
882841
return (
883842
<div>
884-
<p>{t("NA")}</p>
885-
</div>
886-
);
887-
}
888-
889-
case "MICROPLAN_STATUS":
890-
if (value && value != "NA") {
891-
return <p>{t(Digit.Utils.locale.getTransformedLocale("MICROPLAN_STATUS_" + value))}</p>;
892-
} else {
893-
return (
894-
<div>
895-
<p>{t("NA")}</p>
896-
</div>
897-
);
898-
}
899-
900-
case "CAMPAIGN_DISEASE":
901-
if (value && value != "NA") {
902-
return <p>{t(Digit.Utils.locale.getTransformedLocale("MICROPLAN_DISEASE_" + value))}</p>;
903-
} else {
904-
return (
905-
<div>
906-
<p>{t("NA")}</p>
907-
</div>
908-
);
909-
}
910-
911-
case "CAMPAIGN_TYPE":
912-
if (value && value != "NA") {
913-
return <p>{t(Digit.Utils.locale.getTransformedLocale("MICROPLAN_TYPE_" + value))}</p>;
914-
} else {
915-
return (
916-
<div>
917-
<p>{t("NA")}</p>
918-
</div>
919-
);
920-
}
921-
922-
case "DISTIRBUTION_STRATEGY":
923-
if (value && value != "NA") {
924-
return <p>{t(Digit.Utils.locale.getTransformedLocale("MICROPLAN_DISTRIBUTION_" + value))}</p>;
925-
} else {
926-
return (
927-
<div>
928-
<p>{t("NA")}</p>
843+
{microplanFileId && row?.status == "RESOURCE_ESTIMATIONS_APPROVED" ? (
844+
<div>
845+
<ButtonNew style={{ width: "20rem" }} icon="DownloadIcon" onClick={handleDownload} label={t("WBH_DOWNLOAD_MICROPLAN")} title={t("WBH_DOWNLOAD_MICROPLAN")} />
846+
</div>
847+
) : (
848+
<div className={"action-button-open-microplan"}>
849+
<div style={{ position: "relative" }}>
850+
<ButtonNew
851+
type="actionButton"
852+
variation="secondary"
853+
label={t("MP_ACTIONS_FOR_MICROPLAN_SEARCH")}
854+
title={t("MP_ACTIONS_FOR_MICROPLAN_SEARCH")}
855+
options={options}
856+
style={{ width: "20rem" }}
857+
optionsKey="name"
858+
showBottom={true}
859+
isSearchable={false}
860+
onOptionSelect={(item) => onActionSelect(item)}
861+
/>
862+
</div>
863+
</div>
864+
)}
929865
</div>
930866
);
931-
}
932-
933-
default:
934-
return null; // Handle any unexpected keys here if needed
935-
}
867+
868+
case "NAME_OF_MICROPLAN":
869+
if (value && value !== "NA") {
870+
return (
871+
<div
872+
style={{
873+
maxWidth: "15rem", // Set the desired maximum width
874+
wordWrap: "break-word", // Allows breaking within words
875+
whiteSpace: "normal", // Ensures text wraps normally
876+
overflowWrap: "break-word", // Break long words at the edge
877+
}}
878+
>
879+
<p>{t(value)}</p>
880+
</div>
881+
);
882+
} else {
883+
return (
884+
<div>
885+
<p>{t("NA")}</p>
886+
</div>
887+
);
888+
}
889+
890+
case "MICROPLAN_STATUS":
891+
if (value && value != "NA") {
892+
return <p>{t(Digit.Utils.locale.getTransformedLocale("MICROPLAN_STATUS_" + value))}</p>;
893+
} else {
894+
return (
895+
<div>
896+
<p>{t("NA")}</p>
897+
</div>
898+
);
899+
}
900+
901+
case "CAMPAIGN_DISEASE":
902+
if (value && value != "NA") {
903+
return <p>{t(Digit.Utils.locale.getTransformedLocale("MICROPLAN_DISEASE_" + value))}</p>;
904+
} else {
905+
return (
906+
<div>
907+
<p>{t("NA")}</p>
908+
</div>
909+
);
910+
}
911+
912+
case "CAMPAIGN_TYPE":
913+
if (value && value != "NA") {
914+
return <p>{t(Digit.Utils.locale.getTransformedLocale("MICROPLAN_TYPE_" + value))}</p>;
915+
} else {
916+
return (
917+
<div>
918+
<p>{t("NA")}</p>
919+
</div>
920+
);
921+
}
922+
923+
case "DISTIRBUTION_STRATEGY":
924+
if (value && value != "NA") {
925+
return <p>{t(Digit.Utils.locale.getTransformedLocale("MICROPLAN_DISTRIBUTION_" + value))}</p>;
926+
} else {
927+
return (
928+
<div>
929+
<p>{t("NA")}</p>
930+
</div>
931+
);
932+
}
933+
934+
default:
935+
return null; // Handle any unexpected keys here if needed
936+
}
937+
},
936938
},
937-
},
938939
MyMicroplanSearchConfig: {
939940
preProcess: (data, additionalDetails) => {
940941
const { name, status } = data?.state?.searchForm || {};
@@ -1299,6 +1300,11 @@ export const UICustomizations = {
12991300
const VillageHierarchyTooltipWrapper = Digit.ComponentRegistryService.getComponent("VillageHierarchyTooltipWrapper");
13001301

13011302
switch (key) {
1303+
case `MICROPLAN_FACILITY_${column?.projectType}_CAPACITY`:
1304+
if (row?.additionalDetails?.capacity || row?.additionalDetails?.capacity === 0) {
1305+
return row?.additionalDetails?.capacity;
1306+
}
1307+
return t("NA");
13021308
case "MICROPLAN_FACILITY_SERVINGPOPULATION":
13031309
return row?.additionalDetails?.servingPopulation;
13041310
case "MICROPLAN_FACILITY_RESIDINGVILLAGE":

health/micro-ui/web/micro-ui-internals/packages/css/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@egovernments/digit-ui-health-css",
3-
"version": "0.2.6",
3+
"version": "0.2.44",
44
"license": "MIT",
55
"main": "dist/index.css",
66
"author": "Jagankumar <[email protected]>",

0 commit comments

Comments
 (0)