From 3d8247a27b822eae79a893f62cef1a46ced4b06a Mon Sep 17 00:00:00 2001 From: Kartik sharma Date: Tue, 8 Jul 2025 12:38:08 +0530 Subject: [PATCH 1/3] UI Misaligned on Toggling 'Show Inactive Contact' When No Inactive Contacts Exist in Directory at projects. --- src/pages/Directory/Directory.jsx | 115 +++++++++++++++++------------- 1 file changed, 64 insertions(+), 51 deletions(-) diff --git a/src/pages/Directory/Directory.jsx b/src/pages/Directory/Directory.jsx index ca95181f..d83e6328 100644 --- a/src/pages/Directory/Directory.jsx +++ b/src/pages/Directory/Directory.jsx @@ -38,7 +38,7 @@ const Directory = ({ IsPage = true, prefernceContacts }) => { const [IsDeleting, setDeleting] = useState(false); const [openBucketModal, setOpenBucketModal] = useState(false); const [notes, setNotes] = useState([]); - const [filterAppliedNotes, setFilterAppliedNotes] = useState([]); + const [filterAppliedNotes, setFilterAppliedNotes] = useState([]); // const [selectedOrgs, setSelectedOrgs] = useState([]); // ✅ Changed to an array for multiple selections @@ -353,7 +353,7 @@ const Directory = ({ IsPage = true, prefernceContacts }) => { setOpenBucketModal={setOpenBucketModal} contactsToExport={contacts} notesToExport={notes} - selectedNoteNames={selectedNoteNames} + selectedNoteNames={selectedNoteNames} setSelectedNoteNames={setSelectedNoteNames} notesForFilter={notes} setFilterAppliedNotes={setFilterAppliedNotes} @@ -361,52 +361,35 @@ const Directory = ({ IsPage = true, prefernceContacts }) => {
- {(viewType === "card" || viewType === "list" || viewType === "notes") && ( -
- {!loading && (viewType === "card" || viewType === "list") && contacts?.length === 0 && ( -

No contact found

- )} - {!loading && - (viewType === "card" || viewType === "list") && - contacts?.length > 0 && - currentItems.length === 0 && ( -

No matching contact found

- )} -
- )} - - {viewType === "list" && ( -
-
- - {!loading && - currentItems.map((contact) => ( - - ))} - + {/* Loader when switching between Active/Pending or filtering */} + {loading && ( +
+
+ Loading...
)} - {viewType === "card" && ( -
- {!loading && - currentItems.map((contact) => ( -
- + {contacts?.length === 0 && ( +

No contact found

+ )} + {contacts?.length > 0 && currentItems.length === 0 && ( +

No matching contact found

+ )} +
+ )} + + {/* List View */} + {!loading && viewType === "list" && currentItems.length > 0 && ( +
+
+ + {currentItems.map((contact) => ( + { IsDeleted={setDeleteContact} restore={handleDeleteContact} /> -
- ))} + ))} + +
)} - {viewType === "notes" && ( + {/* Card View */} + {!loading && viewType === "card" && currentItems.length > 0 && ( +
+ {currentItems.map((contact) => ( +
+ +
+ ))} +
+ )} + + {/* Notes View */} + {!loading && viewType === "notes" && (
)} @@ -437,7 +445,7 @@ const Directory = ({ IsPage = true, prefernceContacts }) => { {!loading && viewType !== "notes" && contacts?.length > 0 && - currentItems.length > ITEMS_PER_PAGE && ( + filteredContacts.length > ITEMS_PER_PAGE && ( )}
+
); }; -export default Directory; \ No newline at end of file +export default Directory; + From e3417287d350eac366f01e2a34ee605d56fdb78c Mon Sep 17 00:00:00 2001 From: Kartik sharma Date: Wed, 9 Jul 2025 10:20:32 +0530 Subject: [PATCH 2/3] Sizing for the projects directory has been corrected. --- public/assets/vendor/css/core.css | 2 +- src/pages/project/ProjectDetails.jsx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/public/assets/vendor/css/core.css b/public/assets/vendor/css/core.css index d7f7cfcb..12040459 100644 --- a/public/assets/vendor/css/core.css +++ b/public/assets/vendor/css/core.css @@ -836,7 +836,7 @@ progress { } .row { - --bs-gutter-x: 1.625rem; + --bs-gutter-x: 3.625rem; --bs-gutter-y: 0; display: flex; flex-wrap: wrap; diff --git a/src/pages/project/ProjectDetails.jsx b/src/pages/project/ProjectDetails.jsx index b52f6836..3d6b28d5 100644 --- a/src/pages/project/ProjectDetails.jsx +++ b/src/pages/project/ProjectDetails.jsx @@ -81,7 +81,7 @@ const ProjectDetails = () => { case "profile": { return ( <> -
+
{/* About User */} @@ -139,7 +139,7 @@ const ProjectDetails = () => { } case "directory": { return ( -
+
); @@ -193,7 +193,7 @@ const ProjectDetails = () => { ]} > -
+
{projectLoading &&

Loading....

} {/* {!projectLoading && project && ( From bae48be2b55e3280e837b0391b6a3b0cfbd7c2e4 Mon Sep 17 00:00:00 2001 From: Kartik sharma Date: Wed, 9 Jul 2025 16:06:30 +0530 Subject: [PATCH 3/3] Increase the size of table in Projects Directory and show text in center and add 200 px height. --- src/pages/Directory/Directory.jsx | 145 +++++++++++++++++------------- 1 file changed, 83 insertions(+), 62 deletions(-) diff --git a/src/pages/Directory/Directory.jsx b/src/pages/Directory/Directory.jsx index d83e6328..3b3f4671 100644 --- a/src/pages/Directory/Directory.jsx +++ b/src/pages/Directory/Directory.jsx @@ -361,75 +361,97 @@ const Directory = ({ IsPage = true, prefernceContacts }) => {
- {/* Loader when switching between Active/Pending or filtering */} - {loading && ( -
-
- Loading... -
-
- )} - - {/* Empty state messages */} - {!loading && (viewType === "card" || viewType === "list") && ( -
- {contacts?.length === 0 && ( -

No contact found

- )} - {contacts?.length > 0 && currentItems.length === 0 && ( -

No matching contact found

- )} -
- )} - - {/* List View */} - {!loading && viewType === "list" && currentItems.length > 0 && ( -
-
+ {/* LIST VIEW */} + {viewType === "list" && ( +
+
- {currentItems.map((contact) => ( - - ))} + {!loading && contacts?.length === 0 ? ( + + +
+

No contact found

+
+ + + ) : !loading && contacts?.length > 0 && currentItems.length === 0 ? ( + + +
+

No matching contact found

+
+ + + ) : ( + !loading && + currentItems.map((contact) => ( + + )) + )}
)} - {/* Card View */} - {!loading && viewType === "card" && currentItems.length > 0 && ( -
- {currentItems.map((contact) => ( + {/* CARD VIEW */} + {viewType === "card" && ( + <> + {contacts?.length === 0 && !loading ? (
- +

No contact found

- ))} -
+ ) : currentItems.length === 0 && !loading ? ( +
+

No matching contact found

+
+ ) : ( +
+ {currentItems.map((contact) => ( +
+ +
+ ))} +
+ )} + )} - {/* Notes View */} - {!loading && viewType === "notes" && ( + {/* NOTES VIEW */} + {viewType === "notes" && (
{
)} - {/* Pagination */} + {/* PAGINATION */} {!loading && viewType !== "notes" && contacts?.length > 0 && - filteredContacts.length > ITEMS_PER_PAGE && ( + currentItems.length > ITEMS_PER_PAGE && (