From 62be5487580878e147cdf75e2a393544c7dd06eb Mon Sep 17 00:00:00 2001 From: Tulika-eGov <74046137+Tulika-eGov@users.noreply.github.com> Date: Thu, 5 Dec 2024 11:19:19 +0530 Subject: [PATCH] Revert "masked ward in org details" --- .../libraries/src/services/molecules/Attendance/View.js | 6 +++--- .../libraries/src/services/molecules/Organisation/View.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/services/molecules/Attendance/View.js b/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/services/molecules/Attendance/View.js index 56d71f4912..b042143a8f 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/services/molecules/Attendance/View.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/services/molecules/Attendance/View.js @@ -55,9 +55,9 @@ const getAttendanceTableData = async(data, skills, t, expenseCalculations, indRe tableRow.actualWorkingDays = item?.actualTotalAttendance || 0 tableRow.nameOfIndividual = individualdata?.name?.givenName || t("NA") tableRow.guardianName = individualdata?.fatherName || t("NA") - const skill = skills[item?.additionalDetails?.skillCode] + const skill = skills[individualdata?.skills?.[0]?.type] tableRow.skill = skill ? `${t(skill.sorSubType)} - ${skill.description}` : t("NA"); - tableRow.amount = skills[item?.additionalDetails?.skillCode]?.amount * item?.actualTotalAttendance || 0 + tableRow.amount = skills[individualdata?.skills?.[0]?.type]?.amount * item?.actualTotalAttendance || 0 tableRow.modifiedAmount = expenseCalculations?.filter(data=>data?.payee?.identifier === item?.individualId)?.[0]?.lineItems?.[0]?.amount || 0; tableRow.modifiedWorkingDays = item?.modifiedTotalAttendance ? item?.modifiedTotalAttendance : item?.actualTotalAttendance // tableRow.bankAccountDetails = { @@ -66,7 +66,7 @@ const getAttendanceTableData = async(data, skills, t, expenseCalculations, indRe // } // tableRow.aadharNumber = item?.additionalDetails?.aadharNumber || t("NA") tableRow.attendence = getWeekAttendance(item?.attendanceEntries) - tableRow.perDayWage = skills[item?.additionalDetails?.skillCode]?.rates?.rate || 0 + tableRow.perDayWage = skills[individualdata?.skills?.[0]?.type]?.rates?.rate || 0 tableData[item.id] = tableRow }); diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/services/molecules/Organisation/View.js b/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/services/molecules/Organisation/View.js index fac3fafcf1..79a218714e 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/services/molecules/Organisation/View.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/services/molecules/Organisation/View.js @@ -14,7 +14,7 @@ const transformViewDataToApplicationDetails = async (t, data, tenantId) => { const GSTIN = organisation?.identifiers?.find(item => item?.isActive && item?.type === 'GSTIN') const getAddressMasked = (value) => { - return value.replace(/(?<=.{1}).(?=.{1})/g, '*'); + return value.replace(/.(?=.{1,}$)/g, '*'); } const orgDetails = [ { @@ -46,7 +46,7 @@ const transformViewDataToApplicationDetails = async (t, data, tenantId) => { asSectionHeader: true, values: [ { title: "CORE_COMMON_PROFILE_CITY", value: organisation?.orgAddress?.[0]?.tenantId ? Digit.Utils.locale.getCityLocale(organisation?.orgAddress?.[0]?.tenantId) : t("NA")}, - { title: "COMMON_WARD", value: organisation?.orgAddress?.[0]?.boundaryCode ? ( organisation?.orgAddress?.[0]?.geoLocation?.additionalDetails?.isWardMasked ? getAddressMasked(t(Digit.Utils.locale.getMohallaLocale(organisation?.orgAddress?.[0]?.boundaryCode, tenantId))) : Digit.Utils.locale.getMohallaLocale(organisation?.orgAddress?.[0]?.boundaryCode, tenantId)) : t("NA")}, + { title: "COMMON_WARD", value: organisation?.orgAddress?.[0]?.boundaryCode ? Digit.Utils.locale.getMohallaLocale(organisation?.orgAddress?.[0]?.boundaryCode, tenantId) : t("NA")}, { title: "COMMON_LOCALITY", value: organisation?.additionalDetails?.locality ? ( organisation?.additionalDetails?.isLocalityMasked ? getAddressMasked(t(Digit.Utils.locale.getMohallaLocale(organisation?.additionalDetails?.locality, tenantId))) : Digit.Utils.locale.getMohallaLocale(organisation?.additionalDetails?.locality, tenantId)) : t("NA")}, { title: "ES_COMMON_STREET", value: organisation?.orgAddress?.[0]?.street || t("NA")}, { title: "ES_COMMON_DOOR_NO", value: organisation?.orgAddress?.[0]?.doorNo || t("NA")},