From 4b5c3cd73778c266c1c52b63ffb3379aca96844f Mon Sep 17 00:00:00 2001 From: Pramod Mahajan Date: Mon, 2 Jun 2025 11:37:19 +0530 Subject: [PATCH 1/2] show "NA" for missing email in contact list view --- src/components/Directory/ListViewDirectory.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Directory/ListViewDirectory.jsx b/src/components/Directory/ListViewDirectory.jsx index e2e3d18e..ff50dfc7 100644 --- a/src/components/Directory/ListViewDirectory.jsx +++ b/src/components/Directory/ListViewDirectory.jsx @@ -47,7 +47,7 @@ const ListViewDirectory = ({
- {contact.contactEmails?.map((email, index) => ( + {contact.contactEmails.length > 0 ? (contact.contactEmails?.map((email, index) => ( - ))} + ))):(NA)}
-- 2.43.0 From 75ff06e1e4e59d157ebc426cd39f2f28b354efe7 Mon Sep 17 00:00:00 2001 From: Pramod Mahajan Date: Mon, 2 Jun 2025 13:19:13 +0530 Subject: [PATCH 2/2] handled error , if does'nt have category --- .../Directory/CardViewDirectory.jsx | 69 ++++++++++--------- 1 file changed, 38 insertions(+), 31 deletions(-) diff --git a/src/components/Directory/CardViewDirectory.jsx b/src/components/Directory/CardViewDirectory.jsx index 9ac982c6..e7583a9d 100644 --- a/src/components/Directory/CardViewDirectory.jsx +++ b/src/components/Directory/CardViewDirectory.jsx @@ -33,7 +33,7 @@ const CardViewDirectory = ({ (contact?.name || "").trim().split(" ")[1]?.charAt(0) || "" } />{" "} - {contact.name} + {contact?.name}
{IsActive && ( @@ -68,7 +68,7 @@ const CardViewDirectory = ({
  • IsDeleted(contact.id)} + onClick={() => IsDeleted(contact?.id)} > Delete @@ -95,17 +95,16 @@ const CardViewDirectory = ({
    • -
    • - -
    • -
    • - {contact.organization} -
    • -
    - +
  • + +
  • +
  • + {contact.organization} +
  • +
    { if (IsActive) { setIsOpenModalNote(true); @@ -114,17 +113,16 @@ const CardViewDirectory = ({ }} >
    - {contact.contactEmails[0] && ( -
      -
    • - -
    • -
    • - {contact.contactEmails[0].emailAddress} -
    • -
    -)} - + {contact.contactEmails[0] && ( +
      +
    • + +
    • +
    • + {contact.contactEmails[0].emailAddress} +
    • +
    + )} {contact.contactPhones[0] && (
      @@ -141,17 +139,26 @@ const CardViewDirectory = ({
    )} -
      -
    • - -
    • -
    • - {contact.contactCategory.name} -
    • -
    + {contact?.contactCategory?.name ? ( +
      +
    • + +
    • +
    • + {contact?.contactCategory?.name} +
    • +
    + ) : ( +
      +
    • + +
    • +
    • Other
    • +
    + )}
      - {contact.bucketIds?.map((bucketId) => ( + {contact?.bucketIds?.map((bucketId) => (