show "NA" in phone number columns when contact is created without a phone number

This commit is contained in:
Pramod Mahajan 2025-06-02 11:28:34 +05:30
parent 1c8461e72a
commit 426a885629

View File

@ -66,7 +66,8 @@ const ListViewDirectory = ({
<td className="px-2" style={{ width: "20%" }}>
<div className="d-flex flex-column align-items-start text-truncate">
{contact.contactPhones?.map((phone, index) => (
{contact.contactPhones?.length > 0 ? (
contact.contactPhones?.map((phone, index) => (
<span key={phone.id}>
<i
className={getPhoneIcon(phone.label)}
@ -74,7 +75,8 @@ const ListViewDirectory = ({
></i>
<span className="ms-1">{phone.phoneNumber}</span>
</span>
))}
))
):(<span className="text-small m-0 px-2">NA</span>)}
</div>
</td>