diff --git a/micro-ui/web/micro-ui-internals/example/package.json b/micro-ui/web/micro-ui-internals/example/package.json index 7c60f4a1d6c..44a4ac066d9 100644 --- a/micro-ui/web/micro-ui-internals/example/package.json +++ b/micro-ui/web/micro-ui-internals/example/package.json @@ -11,7 +11,7 @@ "devDependencies": { "@egovernments/digit-ui-libraries": "1.8.2-beta.1", "@egovernments/digit-ui-module-workbench": "1.0.2-beta.3", - "@egovernments/digit-ui-components": "0.0.2-beta.1", + "@egovernments/digit-ui-components": "0.0.2-beta.8", "@egovernments/digit-ui-module-core": "1.8.2-beta.2", "@egovernments/digit-ui-module-utilities": "1.0.1-beta.30", "@egovernments/digit-ui-react-components": "1.8.2-beta.6", diff --git a/micro-ui/web/micro-ui-internals/package.json b/micro-ui/web/micro-ui-internals/package.json index 92f1e334d77..7c7bb078678 100644 --- a/micro-ui/web/micro-ui-internals/package.json +++ b/micro-ui/web/micro-ui-internals/package.json @@ -46,7 +46,7 @@ "lodash": "4.17.21", "microbundle-crl": "0.13.11", "@egovernments/digit-ui-react-components": "1.8.2-beta.6", - "@egovernments/digit-ui-components": "0.0.2-beta.1", + "@egovernments/digit-ui-components": "0.0.2-beta.8", "react": "17.0.2", "react-dom": "17.0.2", "react-hook-form": "6.15.8", diff --git a/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/package.json b/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/package.json index 41e43fdb6fd..c647417db12 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/package.json +++ b/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/package.json @@ -19,7 +19,7 @@ }, "dependencies": { "@egovernments/digit-ui-react-components": "1.8.2-beta.6", - "@egovernments/digit-ui-components": "0.0.2-beta.1", + "@egovernments/digit-ui-components": "0.0.2-beta.8", "@rjsf/core": "5.10.0", "@rjsf/utils": "5.10.0", "@rjsf/validator-ajv8": "5.10.0", diff --git a/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/AddProductField.js b/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/AddProductField.js index 94a73fd6b24..9e0c32e5acc 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/AddProductField.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/AddProductField.js @@ -66,7 +66,7 @@ const AddProductField = ({ onSelect }) => { return (
- Product {field?.key} + {t(`ES_ADD_PRODUCT_TITLE`)} {field?.key} {productFieldData?.length > 1 && (
deleteProductField(field.key)} diff --git a/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CycleDataPreview.js b/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CycleDataPreview.js index 9faad7c4c2a..7e3a0314c7a 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CycleDataPreview.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CycleDataPreview.js @@ -100,18 +100,18 @@ const CycleDataPreview = ({ data, items, index, errors, onErrorClick, cardErrors {rules?.attributes?.length > 0 && ( { onClick={() => { downloadTemplate(), setShowPopUp(false); }} + title={t("HCM_CAMPAIGN_DOWNLOAD_TEMPLATE")} />, ]} sortFooterChildren={true} diff --git a/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/SetupCampaign.js b/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/SetupCampaign.js index 0dc19dab4d7..4a1705bb0a2 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/SetupCampaign.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/SetupCampaign.js @@ -74,8 +74,8 @@ function cycleDataRemap(data) { return uniqueCycleObjects.map((i, n) => { return { key: i.cycleNumber, - fromDate: i?.startDate ? new Date(i?.startDate)?.toISOString()?.split("T")?.[0] : null, - toDate: i?.endDate ? new Date(i?.endDate)?.toISOString()?.split("T")?.[0] : null, + fromDate: i?.startDate ? Digit.DateUtils.ConvertEpochToDate(i?.startDate)?.split("/")?.reverse()?.jon("-") : null, + toDate: i?.endDate ? Digit.DateUtils.ConvertEpochToDate(i?.endDate)?.split("/")?.reverse()?.jon("-") : null, }; }); } @@ -351,8 +351,8 @@ const SetupCampaign = ({ hierarchyType }) => { }, HCM_CAMPAIGN_DATE: { campaignDates: { - startDate: draftData?.startDate ? new Date(draftData?.startDate)?.toISOString()?.split("T")?.[0] : "", - endDate: draftData?.endDate ? new Date(draftData?.endDate)?.toISOString()?.split("T")?.[0] : "", + startDate: draftData?.startDate ? Digit.DateUtils.ConvertEpochToDate(draftData?.startDate)?.split("/")?.reverse()?.join("-") : "", + endDate: draftData?.endDate ? Digit.DateUtils.ConvertEpochToDate(draftData?.endDate)?.split("/")?.reverse()?.join("-") : "", }, }, HCM_CAMPAIGN_CYCLE_CONFIGURE: { @@ -379,19 +379,22 @@ const SetupCampaign = ({ hierarchyType }) => { }, }, HCM_CAMPAIGN_UPLOAD_BOUNDARY_DATA: { - uploadBoundary: { uploadedFile: draftData?.resources?.filter((i) => i?.type === "boundaryWithTarget"), - isSuccess : draftData?.resources?.filter((i) => i?.type === "boundaryWithTarget").length>0 + uploadBoundary: { + uploadedFile: draftData?.resources?.filter((i) => i?.type === "boundaryWithTarget"), + isSuccess: draftData?.resources?.filter((i) => i?.type === "boundaryWithTarget").length > 0, }, }, HCM_CAMPAIGN_UPLOAD_FACILITY_DATA: { - uploadFacility: { uploadedFile: draftData?.resources?.filter((i) => i?.type === "facility") , - isSuccess : draftData?.resources?.filter((i) => i?.type === "facility").length>0 - } + uploadFacility: { + uploadedFile: draftData?.resources?.filter((i) => i?.type === "facility"), + isSuccess: draftData?.resources?.filter((i) => i?.type === "facility").length > 0, + }, }, HCM_CAMPAIGN_UPLOAD_USER_DATA: { - uploadUser: { uploadedFile: draftData?.resources?.filter((i) => i?.type === "user") , - isSuccess : draftData?.resources?.filter((i) => i?.type === "user").length>0 - }, + uploadUser: { + uploadedFile: draftData?.resources?.filter((i) => i?.type === "user"), + isSuccess: draftData?.resources?.filter((i) => i?.type === "user").length > 0, + }, }, }; setParams({ ...restructureFormData }); @@ -496,8 +499,8 @@ const SetupCampaign = ({ hierarchyType }) => { cycle.deliveries.forEach((delivery, index) => { delivery.deliveryRules.forEach((rule) => { const restructuredRule = { - startDate: Digit.Utils.date.convertDateToEpoch(dateData?.find((i) => i.key == cycle.cycleIndex)?.fromDate), // Hardcoded for now - endDate: Digit.Utils.date.convertDateToEpoch(dateData?.find((i) => i?.key == cycle?.cycleIndex)?.toDate), // Hardcoded for now + startDate: Digit.Utils.pt.convertDateToEpoch(dateData?.find((i) => i.key == cycle.cycleIndex)?.fromDate, "daystart"), // Hardcoded for now + endDate: Digit.Utils.pt.convertDateToEpoch(dateData?.find((i) => i?.key == cycle?.cycleIndex)?.toDate), // Hardcoded for now cycleNumber: parseInt(cycle.cycleIndex), deliveryNumber: parseInt(delivery.deliveryIndex), deliveryType: rule?.deliveryType, @@ -585,10 +588,10 @@ const SetupCampaign = ({ hierarchyType }) => { let payloadData = { ...draftData }; payloadData.hierarchyType = hierarchyType; payloadData.startDate = totalFormData?.HCM_CAMPAIGN_DATE?.campaignDates?.startDate - ? Digit.Utils.date.convertDateToEpoch(totalFormData?.HCM_CAMPAIGN_DATE?.campaignDates?.startDate) + ? Digit.Utils.pt.convertDateToEpoch(totalFormData?.HCM_CAMPAIGN_DATE?.campaignDates?.startDate, "daystart") : null; payloadData.endDate = totalFormData?.HCM_CAMPAIGN_DATE?.campaignDates?.endDate - ? Digit.Utils.date.convertDateToEpoch(totalFormData?.HCM_CAMPAIGN_DATE?.campaignDates?.endDate) + ? Digit.Utils.pt.convertDateToEpoch(totalFormData?.HCM_CAMPAIGN_DATE?.campaignDates?.endDate) : null; payloadData.tenantId = tenantId; payloadData.action = "create"; @@ -660,12 +663,12 @@ const SetupCampaign = ({ hierarchyType }) => { payloadData.hierarchyType = hierarchyType; if (totalFormData?.HCM_CAMPAIGN_DATE?.campaignDates?.startDate) { payloadData.startDate = totalFormData?.HCM_CAMPAIGN_DATE?.campaignDates?.startDate - ? Digit.Utils.date.convertDateToEpoch(totalFormData?.HCM_CAMPAIGN_DATE?.campaignDates?.startDate) + ? Digit.Utils.pt.convertDateToEpoch(totalFormData?.HCM_CAMPAIGN_DATE?.campaignDates?.startDate, "daystart") : null; } if (totalFormData?.HCM_CAMPAIGN_DATE?.campaignDates?.endDate) { payloadData.endDate = totalFormData?.HCM_CAMPAIGN_DATE?.campaignDates?.endDate - ? Digit.Utils.date.convertDateToEpoch(totalFormData?.HCM_CAMPAIGN_DATE?.campaignDates?.endDate) + ? Digit.Utils.pt.convertDateToEpoch(totalFormData?.HCM_CAMPAIGN_DATE?.campaignDates?.endDate) : null; } payloadData.tenantId = tenantId; @@ -717,12 +720,12 @@ const SetupCampaign = ({ hierarchyType }) => { payloadData.hierarchyType = hierarchyType; if (totalFormData?.HCM_CAMPAIGN_DATE?.campaignDates?.startDate) { payloadData.startDate = totalFormData?.HCM_CAMPAIGN_DATE?.campaignDates?.startDate - ? Digit.Utils.date.convertDateToEpoch(totalFormData?.HCM_CAMPAIGN_DATE?.campaignDates?.startDate) + ? Digit.Utils.pt.convertDateToEpoch(totalFormData?.HCM_CAMPAIGN_DATE?.campaignDates?.startDate, "daystart") : null; } if (totalFormData?.HCM_CAMPAIGN_DATE?.campaignDates?.endDate) { payloadData.endDate = totalFormData?.HCM_CAMPAIGN_DATE?.campaignDates?.endDate - ? Digit.Utils.date.convertDateToEpoch(totalFormData?.HCM_CAMPAIGN_DATE?.campaignDates?.endDate) + ? Digit.Utils.pt.convertDateToEpoch(totalFormData?.HCM_CAMPAIGN_DATE?.campaignDates?.endDate) : null; } payloadData.tenantId = tenantId; @@ -1089,7 +1092,6 @@ const SetupCampaign = ({ hierarchyType }) => { formData?.boundaryType?.selectedData, totalFormData?.HCM_CAMPAIGN_SELECTING_BOUNDARY_DATA?.boundaryType?.selectedData ); - console.log("HSHSHS", checkEqual); setFetchUpload(true); setRefetchGenerate(checkEqual === false ? true : false); return true; @@ -1365,12 +1367,11 @@ const SetupCampaign = ({ hierarchyType }) => { const relatedSteps = campaignConfig?.[0]?.form.filter((step) => nonNullFormDataKeys.includes(step.name)); const highestStep = relatedSteps.reduce((max, step) => Math.max(max, parseInt(step.stepCount)), 0); - if(isDraft == "true"){ + if (isDraft == "true") { const filteredSteps = campaignConfig?.[0]?.form.find((item) => item.key === keyParam)?.stepCount; setActive(filteredSteps); - } - else{ - setActive(highestStep); + } else { + setActive(highestStep); } // setActive(highestStep); diff --git a/micro-ui/web/package.json b/micro-ui/web/package.json index 59ebb7ece05..322577d9bb0 100644 --- a/micro-ui/web/package.json +++ b/micro-ui/web/package.json @@ -19,7 +19,7 @@ "@egovernments/digit-ui-module-core": "1.8.2-beta.2", "@egovernments/digit-ui-module-hrms": "1.8.0-beta.2", "@egovernments/digit-ui-react-components": "1.8.2-beta.6", - "@egovernments/digit-ui-components": "0.0.2-beta.1", + "@egovernments/digit-ui-components": "0.0.2-beta.8", "@egovernments/digit-ui-module-dss": "1.8.0-beta", "@egovernments/digit-ui-module-common": "1.8.0-beta", "@egovernments/digit-ui-module-utilities": "1.0.0-beta", diff --git a/micro-ui/web/workbench/package.json b/micro-ui/web/workbench/package.json index 7cc60ef7bff..f65e2726028 100644 --- a/micro-ui/web/workbench/package.json +++ b/micro-ui/web/workbench/package.json @@ -14,7 +14,7 @@ "dependencies": { "@egovernments/digit-ui-libraries": "1.8.2-beta.1", "@egovernments/digit-ui-module-workbench": "1.0.2-beta.3", - "@egovernments/digit-ui-components": "0.0.2-beta.1", + "@egovernments/digit-ui-components": "0.0.2-beta.8", "@egovernments/digit-ui-module-core": "1.8.2-beta.2", "@egovernments/digit-ui-module-utilities": "1.0.1-beta.30", "@egovernments/digit-ui-react-components": "1.8.2-beta.6",