From d06d974f04d8337465010d0184f7d211466645b0 Mon Sep 17 00:00:00 2001 From: Bhavya-egov Date: Tue, 25 Jun 2024 14:11:16 +0530 Subject: [PATCH 1/2] changed maximum target message --- micro-ui/web/micro-ui-internals/example/public/index.html | 2 +- .../modules/campaign-manager/src/components/UploadData.js | 5 ++++- micro-ui/web/public/index.html | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/micro-ui/web/micro-ui-internals/example/public/index.html b/micro-ui/web/micro-ui-internals/example/public/index.html index d42798fc275..11ada80e116 100644 --- a/micro-ui/web/micro-ui-internals/example/public/index.html +++ b/micro-ui/web/micro-ui-internals/example/public/index.html @@ -15,7 +15,7 @@ href="https://unpkg.com/@egovernments/digit-ui-css@1.8.0-alpha.6/dist/index.css" /> --> - + diff --git a/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/UploadData.js b/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/UploadData.js index ad5bf7dfd5f..946f50a49e8 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/UploadData.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/UploadData.js @@ -419,6 +419,7 @@ const UploadData = ({ formData, onSelect, ...props }) => { .map(({ index, errors }) => { const formattedErrors = errors .map((error) => { + console.log("error" , error); let instancePath = error.instancePath || ""; // Assign an empty string if dataPath is not available if (instancePath.startsWith("/")) { instancePath = instancePath.slice(1); @@ -430,6 +431,9 @@ const UploadData = ({ formData, onSelect, ...props }) => { if(error.keyword === "type" && error.message === "must be string"){ return `${t("HCM_DATA_AT_ROW")} ${index} ${t("HCM_IN_COLUMN")} ${instancePath} ${t("HCM_IS_INVALID")} at ${sheetName}` } + if(error.keyword === "maximum"){ + return `${t("HCM_DATA_AT_ROW")} ${index} ${t("HCM_IN_COLUMN")} ${instancePath} ${t("HCM_IS_MAXIMUM_VALUE")} at ${sheetName}` + } let formattedError = `${t("HCM_IN_COLUMN")} '${instancePath}' ${error.message}`; if (error.keyword === "enum" && error.params && error.params.allowedValues) { formattedError += `${t("HCM_DATA_ALLOWED_VALUES_ARE")} ${error.params.allowedValues.join("/ ")}`; @@ -1137,7 +1141,6 @@ const UploadData = ({ formData, onSelect, ...props }) => { onClick={() => { downloadTemplate(), setShowPopUp(false); }} - title={t("HCM_CAMPAIGN_DOWNLOAD_TEMPLATE")} />, ]} sortFooterChildren={true} diff --git a/micro-ui/web/public/index.html b/micro-ui/web/public/index.html index 9da00f7e1de..8b999f1042e 100644 --- a/micro-ui/web/public/index.html +++ b/micro-ui/web/public/index.html @@ -9,7 +9,7 @@ rel="stylesheet" type="text/css" /> - + From b278de7e7a2294e55f4bcfcdd3d33895b698114f Mon Sep 17 00:00:00 2001 From: Bhavya-egov <137176879+Bhavya-egov@users.noreply.github.com> Date: Tue, 25 Jun 2024 14:12:23 +0530 Subject: [PATCH 2/2] Update UploadData.js --- .../modules/campaign-manager/src/components/UploadData.js | 1 - 1 file changed, 1 deletion(-) diff --git a/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/UploadData.js b/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/UploadData.js index 946f50a49e8..82106dd3111 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/UploadData.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/UploadData.js @@ -419,7 +419,6 @@ const UploadData = ({ formData, onSelect, ...props }) => { .map(({ index, errors }) => { const formattedErrors = errors .map((error) => { - console.log("error" , error); let instancePath = error.instancePath || ""; // Assign an empty string if dataPath is not available if (instancePath.startsWith("/")) { instancePath = instancePath.slice(1);