Skip to content

Commit

Permalink
Merge pull request #819 from odisha-muktasoft/UCEM-1054-2
Browse files Browse the repository at this point in the history
Added additional validations for individual object
  • Loading branch information
Tulika-eGov authored Dec 6, 2024
2 parents 48fa7b2 + 8be8eb7 commit 6bc4a7c
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ const transformViewDataToApplicationDetails = async (t, data, tenantId) => {
thumbnails = individual?.photo && await getThumbnails([individual?.photo], tenantId)
} catch (error) {}

const socialCategory = individual?.additionalFields?.fields?.find(item => item?.key === "SOCIAL_CATEGORY")
const adhaar = individual?.identifiers?.find(item => item?.identifierType === 'AADHAAR')
const socialCategory = (individual?.additionalFields?.fields && Array.isArray(individual?.additionalFields?.fields)) ? individual?.additionalFields?.fields?.find(item => item?.key === "SOCIAL_CATEGORY") : undefined;
const adhaar = (individual?.identifiers && Array.isArray(individual.identifiers)) ? individual?.identifiers?.find(item => item?.identifierType === 'AADHAAR') : undefined;

const headerDetails = {
title: " ",
Expand All @@ -32,7 +32,7 @@ const transformViewDataToApplicationDetails = async (t, data, tenantId) => {
{ title: "ES_COMMON_BIRTHDATE", value: individual?.dateOfBirth || t("NA")},
{ title: "CORE_COMMON_PROFILE_GENDER", value: individual?.gender ?(individual?.gender?.includes("UNDISCLOSED") ? t(individual?.gender) : `COMMON_MASTERS_GENDER_${individual?.gender}`) : t("NA")},
{ title: "CORE_COMMON_PROFILE_MOBILE_NUMBER", value: individual?.mobileNumber || t("NA")},
{ title: "MASTERS_SOCIAL_CATEGORY", value: socialCategory ? (socialCategory?.value?.includes("UNDISCLOSED")? t(socialCategory?.value): `COMMON_MASTERS_SOCIAL_${socialCategory?.value}`) : t("NA")}
{ title: "MASTERS_SOCIAL_CATEGORY", value: socialCategory ? (socialCategory?.value?.includes("UNDISCLOSED")? t(socialCategory?.value): `COMMON_MASTERS_SOCIAL_${socialCategory?.value}`) : t("CS_COMMON_UNDISCLOSED")}
],
additionalDetails: {
skills: {
Expand Down

0 comments on commit 6bc4a7c

Please sign in to comment.