From 483b53d5d2a7ddebfa1c4264721d5991032c257e Mon Sep 17 00:00:00 2001
From: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com>
Date: Tue, 5 Nov 2024 16:28:19 +0530
Subject: [PATCH 1/6] Update MapView.js
---
.../modules/campaign-manager/src/components/MapView.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/MapView.js b/health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/MapView.js
index 92a1f86a4a6..b074135e53e 100644
--- a/health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/MapView.js
+++ b/health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/MapView.js
@@ -29,9 +29,9 @@ const MapView = ({ fileData }) => {
zoom: 6,
zoomControl: true,
layers: [
- L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", {
- attribution: '© OpenStreetMap contributors',
- }),
+ // L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", {
+ // attribution: '© OpenStreetMap contributors',
+ // }),
],
});
}
From f5a3c0645d05ba0d7fb19999d310bc1c7f747c44 Mon Sep 17 00:00:00 2001
From: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com>
Date: Tue, 5 Nov 2024 16:39:37 +0530
Subject: [PATCH 2/6] Revert "Update MapView.js"
This reverts commit 483b53d5d2a7ddebfa1c4264721d5991032c257e.
---
.../modules/campaign-manager/src/components/MapView.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/MapView.js b/health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/MapView.js
index b074135e53e..92a1f86a4a6 100644
--- a/health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/MapView.js
+++ b/health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/MapView.js
@@ -29,9 +29,9 @@ const MapView = ({ fileData }) => {
zoom: 6,
zoomControl: true,
layers: [
- // L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", {
- // attribution: '© OpenStreetMap contributors',
- // }),
+ L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", {
+ attribution: '© OpenStreetMap contributors',
+ }),
],
});
}
From 308155445f9bcd94d5c3958a1c6cdf0164ad10c9 Mon Sep 17 00:00:00 2001
From: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com>
Date: Tue, 5 Nov 2024 16:39:47 +0530
Subject: [PATCH 3/6] fixed build issue
---
health/micro-ui/web/workbench/package.json | 16 +++++++++-------
health/micro-ui/web/workbench/webpack.config.js | 10 +++++++++-
2 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/health/micro-ui/web/workbench/package.json b/health/micro-ui/web/workbench/package.json
index af416d47021..3d157df0544 100644
--- a/health/micro-ui/web/workbench/package.json
+++ b/health/micro-ui/web/workbench/package.json
@@ -20,8 +20,6 @@
"@egovernments/digit-ui-react-components": "1.8.2-beta.17",
"@egovernments/digit-ui-module-hcmworkbench":"0.0.44",
"@egovernments/digit-ui-module-campaign-manager": "0.2.1",
- "babel-loader": "8.1.0",
- "clean-webpack-plugin": "4.0.0",
"react": "17.0.2",
"react-dom": "17.0.2",
"jsonpath": "^1.1.1",
@@ -31,10 +29,7 @@
"terser-brunch": "^4.1.0",
"react-hook-form": "6.15.8",
"react-i18next": "11.16.2",
- "react-query": "3.6.1",
- "css-loader": "5.2.6",
- "style-loader": "2.0.0",
- "webpack-cli": "4.10.0"
+ "react-query": "3.6.1"
},
"devDependencies": {
"@babel/plugin-proposal-private-property-in-object": "7.21.0",
@@ -50,7 +45,14 @@
"husky": "7.0.4",
"lint-staged": "12.3.7",
"npm-run-all": "4.1.5",
- "prettier": "2.1.2"
+ "prettier": "2.1.2",
+ "file-loader": "6.2.0",
+ "css-loader": "5.2.6",
+ "style-loader": "2.0.0",
+ "babel-loader": "8.1.0",
+ "webpack-cli": "4.10.0",
+ "clean-webpack-plugin": "4.0.0"
+
},
"resolutions": {
"**/babel-loader": "8.2.2",
diff --git a/health/micro-ui/web/workbench/webpack.config.js b/health/micro-ui/web/workbench/webpack.config.js
index c19e631fe01..316801cea1a 100644
--- a/health/micro-ui/web/workbench/webpack.config.js
+++ b/health/micro-ui/web/workbench/webpack.config.js
@@ -17,7 +17,15 @@ module.exports = {
{
test: /\.css$/i,
use: ["style-loader", "css-loader"],
- }
+ },
+ {
+ test: /\.(png|jpe?g|gif)$/i,
+ use: [
+ {
+ loader: 'file-loader',
+ },
+ ],
+ },
],
},
output: {
From b1d4e7e0ac566a80d35c5855c99c9cdd759c1d61 Mon Sep 17 00:00:00 2001
From: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com>
Date: Tue, 5 Nov 2024 16:44:19 +0530
Subject: [PATCH 4/6] updated css verwsion
---
.../web/micro-ui-internals/example/public/index.html | 2 +-
.../web/micro-ui-internals/packages/css/CHANGELOG.md | 8 ++++++++
.../web/micro-ui-internals/packages/css/package.json | 2 +-
health/micro-ui/web/public/index.html | 2 +-
4 files changed, 11 insertions(+), 3 deletions(-)
create mode 100644 health/micro-ui/web/micro-ui-internals/packages/css/CHANGELOG.md
diff --git a/health/micro-ui/web/micro-ui-internals/example/public/index.html b/health/micro-ui/web/micro-ui-internals/example/public/index.html
index 01a16128ae3..acded992ea2 100644
--- a/health/micro-ui/web/micro-ui-internals/example/public/index.html
+++ b/health/micro-ui/web/micro-ui-internals/example/public/index.html
@@ -12,7 +12,7 @@
DIGIT
-
+
diff --git a/health/micro-ui/web/micro-ui-internals/packages/css/CHANGELOG.md b/health/micro-ui/web/micro-ui-internals/packages/css/CHANGELOG.md
new file mode 100644
index 00000000000..f771d4bc700
--- /dev/null
+++ b/health/micro-ui/web/micro-ui-internals/packages/css/CHANGELOG.md
@@ -0,0 +1,8 @@
+# Changelog
+
+## [0.1.20]
+- Updated Loader with text styles
+
+
+## [0.1.1]
+- Base CSS
diff --git a/health/micro-ui/web/micro-ui-internals/packages/css/package.json b/health/micro-ui/web/micro-ui-internals/packages/css/package.json
index 170c6b3467f..c6763bdc594 100644
--- a/health/micro-ui/web/micro-ui-internals/packages/css/package.json
+++ b/health/micro-ui/web/micro-ui-internals/packages/css/package.json
@@ -1,6 +1,6 @@
{
"name": "@egovernments/digit-ui-health-css",
- "version": "0.1.19",
+ "version": "0.1.20",
"license": "MIT",
"main": "dist/index.css",
"author": "Jagankumar ",
diff --git a/health/micro-ui/web/public/index.html b/health/micro-ui/web/public/index.html
index 655e8e71d55..feb3347e7f2 100644
--- a/health/micro-ui/web/public/index.html
+++ b/health/micro-ui/web/public/index.html
@@ -10,7 +10,7 @@
-
+
DIGIT HCM
From 04ce3ff44e82932bd2dc7026edf166e31a7b17a9 Mon Sep 17 00:00:00 2001
From: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com>
Date: Tue, 5 Nov 2024 17:57:50 +0530
Subject: [PATCH 5/6] Fixed some of the module level issues in console settings
module
---
.../micro-ui-internals/example/package.json | 2 +-
.../modules/workbench-hcm/package.json | 2 +-
.../modules/workbench-hcm/src/Module.js | 4 +++-
.../src/components/FacilityComponent.js | 2 +-
.../components/ProjectBeneficiaryComponent.js | 5 +----
.../src/components/ProjectStaffComponent.js | 20 +++++++++++------
.../src/configs/ProjectStaffConfig.js | 4 +++-
.../src/configs/ViewProjectConfig.js | 22 +++++++++----------
health/micro-ui/web/workbench/package.json | 2 +-
9 files changed, 35 insertions(+), 28 deletions(-)
diff --git a/health/micro-ui/web/micro-ui-internals/example/package.json b/health/micro-ui/web/micro-ui-internals/example/package.json
index 79777555a74..0d14fc013cd 100644
--- a/health/micro-ui/web/micro-ui-internals/example/package.json
+++ b/health/micro-ui/web/micro-ui-internals/example/package.json
@@ -15,7 +15,7 @@
"@egovernments/digit-ui-module-core": "1.8.2-beta.13",
"@egovernments/digit-ui-module-utilities": "1.0.1-beta.30",
"@egovernments/digit-ui-react-components": "1.8.2-beta.17",
- "@egovernments/digit-ui-module-hcmworkbench":"0.0.44",
+ "@egovernments/digit-ui-module-hcmworkbench":"0.0.45",
"@egovernments/digit-ui-module-campaign-manager": "0.2.1",
"@egovernments/digit-ui-module-microplan":"0.0.1",
"http-proxy-middleware": "^1.0.5",
diff --git a/health/micro-ui/web/micro-ui-internals/packages/modules/workbench-hcm/package.json b/health/micro-ui/web/micro-ui-internals/packages/modules/workbench-hcm/package.json
index a22988446ec..81a59214d77 100644
--- a/health/micro-ui/web/micro-ui-internals/packages/modules/workbench-hcm/package.json
+++ b/health/micro-ui/web/micro-ui-internals/packages/modules/workbench-hcm/package.json
@@ -1,6 +1,6 @@
{
"name": "@egovernments/digit-ui-module-hcmworkbench",
- "version": "0.0.44",
+ "version": "0.0.45",
"description": "Workbench-HCM",
"main": "dist/index.js",
"module": "dist/index.modern.js",
diff --git a/health/micro-ui/web/micro-ui-internals/packages/modules/workbench-hcm/src/Module.js b/health/micro-ui/web/micro-ui-internals/packages/modules/workbench-hcm/src/Module.js
index e3b226b0b67..ea9b078e1ad 100644
--- a/health/micro-ui/web/micro-ui-internals/packages/modules/workbench-hcm/src/Module.js
+++ b/health/micro-ui/web/micro-ui-internals/packages/modules/workbench-hcm/src/Module.js
@@ -14,13 +14,15 @@ import RowDetails from "./components/RowDetails";
import TargetComponent from "./components/TargetComponent";
const HCMWORKBENCHModule = ({ stateCode, userType, tenants }) => {
- const moduleCode = ["workbench-hcm"];
+ const modulePrefix = "hcm";
+ const moduleCode = ["campaign-settings"];
const { path, url } = useRouteMatch();
const language = Digit.StoreData.getCurrentLanguage();
const { isLoading, data: store } = Digit.Services.useStore({
stateCode,
moduleCode,
language,
+ modulePrefix,
});
if (isLoading) {
diff --git a/health/micro-ui/web/micro-ui-internals/packages/modules/workbench-hcm/src/components/FacilityComponent.js b/health/micro-ui/web/micro-ui-internals/packages/modules/workbench-hcm/src/components/FacilityComponent.js
index 9eea829d322..af0fa1130df 100644
--- a/health/micro-ui/web/micro-ui-internals/packages/modules/workbench-hcm/src/components/FacilityComponent.js
+++ b/health/micro-ui/web/micro-ui-internals/packages/modules/workbench-hcm/src/components/FacilityComponent.js
@@ -39,7 +39,7 @@ const FacilityComponent = (props) => {
},
body: {
Facility: {
- "id": [projectFacility?.ProjectFacilities?.[0]?.facilityId]
+ "id": projectFacility?.ProjectFacilities?.map(mapping=>mapping?.facilityId)
},
},
config:{
diff --git a/health/micro-ui/web/micro-ui-internals/packages/modules/workbench-hcm/src/components/ProjectBeneficiaryComponent.js b/health/micro-ui/web/micro-ui-internals/packages/modules/workbench-hcm/src/components/ProjectBeneficiaryComponent.js
index 3c739b116cd..f483381c3be 100644
--- a/health/micro-ui/web/micro-ui-internals/packages/modules/workbench-hcm/src/components/ProjectBeneficiaryComponent.js
+++ b/health/micro-ui/web/micro-ui-internals/packages/modules/workbench-hcm/src/components/ProjectBeneficiaryComponent.js
@@ -82,7 +82,7 @@ const ProjectBeneficiaryComponent = (props) => {
},
},
config:{
- enabled: productIds.length>0 ? true: false
+ enabled: productIds?.length>0 ? true: false
}
};
@@ -136,10 +136,7 @@ const ProjectBeneficiaryComponent = (props) => {
{ label: t("PRODUCT_ID"), key: "productVariant.productId" },
{ label: t("SKU"), key: "productVariant.sku" },
{ label: t("PRODUCT_VARIATION"), key: "productVariant.variation" },
- { label: t("START_DATE"), key: "formattedStartDate" },
- { label: t("END_DATE"), key: "formattedEndDate" },
{ label: t("RESOURCE_TYPE"), key: "resource.type" },
- // { label: t("IS_BASE_UNIT_VARIANT"), key: "resource.isBaseUnitVariant" },
{ label: t("NAME"), key: "productVariant.product.name" },
{ label: t("MANUFACTURER"), key: "productVariant.product.manufacturer" },
{ label: t("PRODUCT_TYPE"), key: "productVariant.product.type" }
diff --git a/health/micro-ui/web/micro-ui-internals/packages/modules/workbench-hcm/src/components/ProjectStaffComponent.js b/health/micro-ui/web/micro-ui-internals/packages/modules/workbench-hcm/src/components/ProjectStaffComponent.js
index 8e4c51d2029..977ba1dccb1 100644
--- a/health/micro-ui/web/micro-ui-internals/packages/modules/workbench-hcm/src/components/ProjectStaffComponent.js
+++ b/health/micro-ui/web/micro-ui-internals/packages/modules/workbench-hcm/src/components/ProjectStaffComponent.js
@@ -15,7 +15,7 @@ const ProjectStaffComponent = (props) => {
const [showModal, setShowModal] = useState(false);
const [userName, setUserName] = useState("");
const [showToast, setShowToast] = useState(false);
- const [showResult, setShowResult] = useState("");
+ const [showResult, setShowResult] = useState(null);
const [deletionDetails, setDeletionDetails] = useState({
projectId: null,
userId: null,
@@ -36,7 +36,7 @@ const ProjectStaffComponent = (props) => {
limit: 10,
},
config: {
- enable: data?.horizontalNav?.configNavItems[0].code === "Project Resource" ? true : false,
+ enable: props.projectId && data?.horizontalNav?.configNavItems[0].code === "HCM_STAFF_MAPPED" ? true : false,
},
body: {
ProjectStaff: {
@@ -69,7 +69,10 @@ const ProjectStaffComponent = (props) => {
body: {
"tenantId": "mz",
"uuid": userIds
- }
+ },
+ config: {
+ enable: userIds?.length>0 ? true : false,
+ },
};
const { isLoading: isUserSearchLoading, data: userInfo } = Digit.Hooks.useCustomAPIHook(userRequestCriteria);
@@ -99,6 +102,8 @@ const ProjectStaffComponent = (props) => {
const columns = [
{ label: t("PROJECT_STAFF_ID"), key: "id" },
{ label: t("USERNAME"), key: "userInfo.userName" },
+ { label: t("NAME"), key: "userInfo.name" },
+ { label: t("MOBILENUMBER"), key: "userInfo.mobileNumber" },
{ label: t("ROLES"), key: "userInfo.roles" },
{ label: t("IS_DELETED"), key: "isDeleted" },
{ label: t("START_DATE"), key: "formattedStartDate" },
@@ -134,8 +139,9 @@ const ProjectStaffComponent = (props) => {
{
onSuccess: async (data) => {
if (data?.Employees && data?.Employees?.length > 0) {
- setShowResult(data?.Employees[0]?.code);
+ setShowResult(data?.Employees[0]);
} else {
+ setShowResult(null);
setShowToast({ label: "WBH_USER_NOT_FOUND", isError: true });
setTimeout(() => setShowToast(null), 5000);
}
@@ -168,7 +174,7 @@ const ProjectStaffComponent = (props) => {
setShowModal(false);
setShowPopup(false);
setUserName("");
- setShowResult("");
+ setShowResult(null);
};
const closeToast = () => {
@@ -195,7 +201,7 @@ const ProjectStaffComponent = (props) => {
ProjectStaff: {
tenantId,
userId: userId,
- projectId: projectId,
+ projectId: props?.Project[0]?.id || projectId,
startDate: props?.Project[0]?.startDate,
endDate: props?.Project[0]?.endDate,
},
@@ -270,7 +276,7 @@ const ProjectStaffComponent = (props) => {
onSubmit={handleProjectStaffSubmit}
onClose={closeModal}
heading={"WBH_ASSIGN_PROJECT_STAFF"}
- isDisabled={!showResult || showResult.length === 0} // Set isDisabled based on the condition
+ isDisabled={showResult==null} // Set isDisabled based on the condition
/>
)}
{showPopup && (
diff --git a/health/micro-ui/web/micro-ui-internals/packages/modules/workbench-hcm/src/configs/ProjectStaffConfig.js b/health/micro-ui/web/micro-ui-internals/packages/modules/workbench-hcm/src/configs/ProjectStaffConfig.js
index 26505b775d9..b7fcb7ccaeb 100644
--- a/health/micro-ui/web/micro-ui-internals/packages/modules/workbench-hcm/src/configs/ProjectStaffConfig.js
+++ b/health/micro-ui/web/micro-ui-internals/packages/modules/workbench-hcm/src/configs/ProjectStaffConfig.js
@@ -1,5 +1,5 @@
export const projectStaffData = (searchResult) => {
- const getRoles = searchResult?.user?.roles ? searchResult.user.roles.map((role) => `WBH_${role.name}`).join(",") : "NA";
+ const getRoles = searchResult?.user?.roles ? searchResult.user.roles.map((role) => `ACCESSCONTROL_ROLES_ROLES_${role?.code}`).join(",") : "NA";
return {
cards: [
@@ -9,6 +9,8 @@ export const projectStaffData = (searchResult) => {
type: "DATA",
values: [
{ key: "WBH_USERNAME", value: searchResult?.code || "NA" },
+ { key: "WBH_NAME", value: searchResult?.user?.name || "NA" },
+ { key: "WBH_MOBILENO", value: searchResult?.user?.mobileNumber || "NA" },
{ key: "WBH_BOUNDARY", value: searchResult?.jurisdictions?.[0]?.boundary || "NA" },
{ key: "WBH_BOUNDARY_TYPE", value: searchResult?.jurisdictions?.[0]?.boundaryType || "NA" },
{ key: "WBH_ROLES", value: getRoles },
diff --git a/health/micro-ui/web/micro-ui-internals/packages/modules/workbench-hcm/src/configs/ViewProjectConfig.js b/health/micro-ui/web/micro-ui-internals/packages/modules/workbench-hcm/src/configs/ViewProjectConfig.js
index 01b168e20d3..0736d828697 100644
--- a/health/micro-ui/web/micro-ui-internals/packages/modules/workbench-hcm/src/configs/ViewProjectConfig.js
+++ b/health/micro-ui/web/micro-ui-internals/packages/modules/workbench-hcm/src/configs/ViewProjectConfig.js
@@ -65,10 +65,10 @@ export const data = (project) => {
],
},
{
- navigationKey: "card5",
+ navigationKey: "card1",
sections: [
{
- navigationKey: "card5",
+ navigationKey: "card1",
type: "COMPONENT",
component: "TargetComponent",
@@ -100,10 +100,10 @@ export const data = (project) => {
],
},
{
- navigationKey: "card1",
+ navigationKey: "card5",
sections: [
{
- navigationKey: "card1",
+ navigationKey: "card5",
type: "COMPONENT",
component: "ProjectStaffComponent",
@@ -132,30 +132,30 @@ export const data = (project) => {
showNav: true,
configNavItems: [
{
- name: "card5",
+ name: "card1",
active: true,
- code: "Targets",
+ code: "HCM_TARGET_MAPPED",
},
{
name: "card3",
active: true,
- code: "Children",
+ code: "HCM_CHILDREN_MAPPED",
},
{
name: "card2",
active: true,
- code: "Project Resource",
+ code: "HCM_RESOURCE_MAPPED",
},
{
- name: "card1",
+ name: "card5",
active: true,
- code: "Project Staff",
+ code: "HCM_STAFF_MAPPED",
},
{
name: "card4",
active: true,
- code: "Facility",
+ code: "HCM_FACILITY_MAPPED",
},
],
diff --git a/health/micro-ui/web/workbench/package.json b/health/micro-ui/web/workbench/package.json
index 3d157df0544..6e5ea5f460f 100644
--- a/health/micro-ui/web/workbench/package.json
+++ b/health/micro-ui/web/workbench/package.json
@@ -18,7 +18,7 @@
"@egovernments/digit-ui-module-core": "1.8.2-beta.25",
"@egovernments/digit-ui-module-utilities": "1.0.1-beta.35",
"@egovernments/digit-ui-react-components": "1.8.2-beta.17",
- "@egovernments/digit-ui-module-hcmworkbench":"0.0.44",
+ "@egovernments/digit-ui-module-hcmworkbench":"0.0.45",
"@egovernments/digit-ui-module-campaign-manager": "0.2.1",
"react": "17.0.2",
"react-dom": "17.0.2",
From bcbf1969fb2d0e2c9acb98b120244d0146e2656d Mon Sep 17 00:00:00 2001
From: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com>
Date: Wed, 6 Nov 2024 10:47:01 +0530
Subject: [PATCH 6/6] Update
health/micro-ui/web/micro-ui-internals/packages/modules/workbench-hcm/src/components/ProjectBeneficiaryComponent.js
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
---
.../workbench-hcm/src/components/ProjectBeneficiaryComponent.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/health/micro-ui/web/micro-ui-internals/packages/modules/workbench-hcm/src/components/ProjectBeneficiaryComponent.js b/health/micro-ui/web/micro-ui-internals/packages/modules/workbench-hcm/src/components/ProjectBeneficiaryComponent.js
index f483381c3be..61803f51fce 100644
--- a/health/micro-ui/web/micro-ui-internals/packages/modules/workbench-hcm/src/components/ProjectBeneficiaryComponent.js
+++ b/health/micro-ui/web/micro-ui-internals/packages/modules/workbench-hcm/src/components/ProjectBeneficiaryComponent.js
@@ -82,7 +82,7 @@ const ProjectBeneficiaryComponent = (props) => {
},
},
config:{
- enabled: productIds?.length>0 ? true: false
+ enabled: Boolean(productIds?.length)
}
};