added bucket fdisplay field in contact profile

This commit is contained in:
Pramod Mahajan 2025-05-28 12:24:11 +05:30
parent 2d1d32ee16
commit a87d2c9143

View File

@ -6,7 +6,6 @@ import NotesDirectory from "./NotesDirectory";
const ProfileContactDirectory = ({ contact, setOpen_contact, closeModal }) => { const ProfileContactDirectory = ({ contact, setOpen_contact, closeModal }) => {
const { conatProfile, loading } = useContactProfile(contact?.id); const { conatProfile, loading } = useContactProfile(contact?.id);
const [activeTab, setActiveTab] = useState("profile");
const [profileContact, setProfileContact] = useState(); const [profileContact, setProfileContact] = useState();
useEffect(() => { useEffect(() => {
@ -34,9 +33,11 @@ const ProfileContactDirectory = ({ contact, setOpen_contact, closeModal }) => {
<i className="bx bx-building bx-xs"></i>{" "} <i className="bx bx-building bx-xs"></i>{" "}
{conatProfile?.organization} {conatProfile?.organization}
</span> </span>
<span className="small-text">Manager</span>
</div> </div>
</div> </div>
<div className="d-flex flex-column text-start"> <div className="row">
<div className="col-12 col-md-6 d-flex flex-column text-start">
{conatProfile?.contactEmails?.length > 0 && ( {conatProfile?.contactEmails?.length > 0 && (
<div className="d-flex mb-2"> <div className="d-flex mb-2">
<div style={{ width: "100px", minWidth: "100px" }}> <div style={{ width: "100px", minWidth: "100px" }}>
@ -61,7 +62,7 @@ const ProfileContactDirectory = ({ contact, setOpen_contact, closeModal }) => {
</div> </div>
<div> <div>
<ul className="list-inline mb-0"> <ul className="list-inline mb-0">
{conatProfile.contactPhones.map((phone, idx) => ( {conatProfile?.contactPhones.map((phone, idx) => (
<li className="list-inline-item me-3" key={idx}> <li className="list-inline-item me-3" key={idx}>
<i className="bx bx-phone bx-xs me-1"></i> <i className="bx bx-phone bx-xs me-1"></i>
{phone.phoneNumber} {phone.phoneNumber}
@ -87,7 +88,28 @@ const ProfileContactDirectory = ({ contact, setOpen_contact, closeModal }) => {
</div> </div>
</div> </div>
)} )}
</div> </div>
{ conatProfile?.buckets?.length > 0 &&
<div className="col-12 col-md-6 d-flex flex-column text-start">
{conatProfile?.contactEmails?.length > 0 && (
<div className="d-flex mb-2 align-items-center">
<div style={{ width: "100px", minWidth: "100px" }}>
<p className="m-0">Buckets</p>
</div>
<div>
<ul className="list-inline mb-0">
{conatProfile.buckets.map((bucket) => (
<li className="list-inline-item me-2" key={bucket.id}>
<span class="badge bg-label-primary my-1">{ bucket.name}</span>
</li>
))}
</ul>
</div>
</div>
)}
</div>
}
</div>
<hr className="my-1" /> <hr className="my-1" />
<NotesDirectory <NotesDirectory