From eb30e379552e6b3e846414e5a9b842608088fd4b Mon Sep 17 00:00:00 2001 From: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Date: Tue, 28 May 2024 19:12:35 +0530 Subject: [PATCH] ISTE-144: Added benchmark result --- .../modules/tqm/src/hooks/services/searchTestResultData.js | 5 ++++- .../tqm/src/pages/employee/test-results/ViewTestResults.js | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/tqm/src/hooks/services/searchTestResultData.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/tqm/src/hooks/services/searchTestResultData.js index 2d93fc5333..d78a9607fb 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/tqm/src/hooks/services/searchTestResultData.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/tqm/src/hooks/services/searchTestResultData.js @@ -34,12 +34,14 @@ export const searchTestResultData = async ({ t, id, type, tenantId }) => { testcriteraData?.forEach((testItem) => { const matchingMdmsItem = mdmsCriteriaData?.mdms?.find((mdmsItem) => mdmsItem.uniqueIdentifier === testItem.criteriaCode); + if (matchingMdmsItem) { + const combineResults = `${t(Digit.Utils.locale.getTransformedLocale(`ES_TQM_${matchingMdmsItem.data.benchmarkRule}`))} ${matchingMdmsItem.data.benchmarkValues.join(' - ')}`; const mergedData = { criteriaCode: testItem.criteriaCode, qparameter: matchingMdmsItem.data.parameter, uom: matchingMdmsItem.data.unit, - benchmarkValues: matchingMdmsItem.data.benchmarkValues?.[0], + benchmarkValues: combineResults, results: testItem.resultValue, status: testItem.resultStatus, }; @@ -241,6 +243,7 @@ export const searchTestResultData = async ({ t, id, type, tenantId }) => { "", "", "", + // "", t("ES_TQM_LABEL_RESULT_SUMMARY"), testResponse.status === "PASS" ? t("ES_TQM_LABEL_RESULT_PASS") : testResponse.status === "FAIL" ? t("ES_TQM_LABEL_RESULT_FAIL") : t("TQM_TEST_STATUS_PENDING"), ] diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/tqm/src/pages/employee/test-results/ViewTestResults.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/tqm/src/pages/employee/test-results/ViewTestResults.js index 781912a303..3ea896b21d 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/tqm/src/pages/employee/test-results/ViewTestResults.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/tqm/src/pages/employee/test-results/ViewTestResults.js @@ -101,6 +101,7 @@ function ViewTestResults() { }, }); + const handleDownloadPdf = async () => { try { const respo = await Digit.CustomService.getResponse({