Issues_Aug_1W #355
@ -361,23 +361,9 @@ const Directory = ({ IsPage = true, prefernceContacts }) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="card-minHeight mt-0">
|
<div className="card-minHeight mt-0">
|
||||||
{(viewType === "card" || viewType === "list" || viewType === "notes") && (
|
|
||||||
<div className="d-flex flex-column justify-content-center align-items-center text-center">
|
|
||||||
{!loading && (viewType === "card" || viewType === "list") && contacts?.length === 0 && (
|
|
||||||
<p className="mt-10">No contact found</p>
|
|
||||||
)}
|
|
||||||
{!loading &&
|
|
||||||
(viewType === "card" || viewType === "list") &&
|
|
||||||
contacts?.length > 0 &&
|
|
||||||
currentItems.length === 0 && (
|
|
||||||
<p className="mt-10">No matching contact found</p>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{viewType === "list" && (
|
{viewType === "list" && (
|
||||||
<div className="card cursor-pointer mt-5">
|
<div className="card cursor-pointer mt-5">
|
||||||
<div className="card-body p-2 pb-1">
|
<div className="card-body p-2 pb-1" style={{ minHeight: "200px" }}>
|
||||||
<DirectoryListTableHeader>
|
<DirectoryListTableHeader>
|
||||||
{!loading &&
|
{!loading &&
|
||||||
currentItems.map((contact) => (
|
currentItems.map((contact) => (
|
||||||
@ -394,12 +380,22 @@ const Directory = ({ IsPage = true, prefernceContacts }) => {
|
|||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
</DirectoryListTableHeader>
|
</DirectoryListTableHeader>
|
||||||
|
|
||||||
|
{/* Empty state AFTER list */}
|
||||||
|
{!loading && contacts?.length === 0 && (
|
||||||
|
<p className="mt-3 ms-3 text-muted" >No contact found</p>
|
||||||
|
)}
|
||||||
|
{!loading &&
|
||||||
|
contacts?.length > 0 &&
|
||||||
|
currentItems.length === 0 && (
|
||||||
|
<p className="mt-3 ms-3 text-muted">No matching contact found</p>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{viewType === "card" && (
|
{viewType === "card" && (
|
||||||
<div className="row mt-4">
|
<div className="row mt-10">
|
||||||
{!loading &&
|
{!loading &&
|
||||||
currentItems.map((contact) => (
|
currentItems.map((contact) => (
|
||||||
<div
|
<div
|
||||||
@ -418,6 +414,16 @@ const Directory = ({ IsPage = true, prefernceContacts }) => {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
|
|
||||||
|
{/* Empty state for card view */}
|
||||||
|
{!loading && contacts?.length === 0 && (
|
||||||
|
<p className="mt-3 ms-3 text-muted">No contact found</p>
|
||||||
|
)}
|
||||||
|
{!loading &&
|
||||||
|
contacts?.length > 0 &&
|
||||||
|
currentItems.length === 0 && (
|
||||||
|
<p className="mt-3 ms-3 text-muted">No matching contact found</p>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
@ -464,7 +470,10 @@ const Directory = ({ IsPage = true, prefernceContacts }) => {
|
|||||||
</li>
|
</li>
|
||||||
))}
|
))}
|
||||||
|
|
||||||
<li className={`page-item ${currentPage === totalPages ? "disabled" : ""}`}>
|
<li
|
||||||
|
className={`page-item ${currentPage === totalPages ? "disabled" : ""
|
||||||
|
}`}
|
||||||
|
>
|
||||||
<button
|
<button
|
||||||
className="page-link"
|
className="page-link"
|
||||||
onClick={() => paginate(currentPage + 1)}
|
onClick={() => paginate(currentPage + 1)}
|
||||||
|
@ -3,7 +3,7 @@ import IconButton from "../../components/common/IconButton";
|
|||||||
|
|
||||||
const DirectoryListTableHeader = ({ children }) => {
|
const DirectoryListTableHeader = ({ children }) => {
|
||||||
return (
|
return (
|
||||||
<div className="table-responsive text-nowrap py-2">
|
<div className="table-responsive text-nowrap py-2" style={{ minHeight: "80px"}}>
|
||||||
<table className="table px-2">
|
<table className="table px-2">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user