Compare commits
7 Commits
3109f577b0
...
111325968d
| Author | SHA1 | Date | |
|---|---|---|---|
| 111325968d | |||
| baf6a4cf54 | |||
| a1b45c341a | |||
| da69ae6fec | |||
| 48d1592b8c | |||
| 4700ba38cd | |||
| 67b694c697 |
@ -129,41 +129,46 @@ const NotesCardViewDirectory = ({ notes, setNotesForFilter, searchText, filterAp
|
|||||||
|
|
||||||
{/* Pagination */}
|
{/* Pagination */}
|
||||||
{totalPages > 1 && (
|
{totalPages > 1 && (
|
||||||
<div className="d-flex justify-content-end mt-3 me-3">
|
<div className="d-flex justify-content-end mt-2 align-items-center gap-2"
|
||||||
<div className="d-flex align-items-center gap-2">
|
style={{ marginBottom: '70px' }}>
|
||||||
<button
|
{/* Previous Button */}
|
||||||
className="btn btn-sm rounded-circle border"
|
<button
|
||||||
onClick={() => handlePageClick(Math.max(1, currentPage - 1))}
|
className="btn btn-sm rounded-circle border text-secondary" // Added text-secondary for lighter color, kept btn-sm for smaller size like in image
|
||||||
disabled={currentPage === 1}
|
onClick={() => handlePageClick(Math.max(1, currentPage - 1))}
|
||||||
title="Previous"
|
disabled={currentPage === 1}
|
||||||
>
|
title="Previous"
|
||||||
«
|
style={{ width: "38px", height: "38px", padding: 0 }} // Ensure consistent size
|
||||||
</button>
|
>
|
||||||
|
«
|
||||||
|
</button>
|
||||||
|
|
||||||
{[...Array(totalPages)].map((_, i) => {
|
{/* Page Number Buttons */}
|
||||||
const page = i + 1;
|
{[...Array(totalPages)].map((_, i) => {
|
||||||
return (
|
const page = i + 1;
|
||||||
<button
|
return (
|
||||||
key={page}
|
<button
|
||||||
className={`btn btn-sm rounded-circle border ${page === currentPage ? "btn-primary text-white" : "btn-outline-primary"
|
key={page}
|
||||||
}`}
|
// Changed btn-sm to just btn, adjusted class for active/inactive state backgrounds and text colors
|
||||||
style={{ width: "32px", height: "32px", padding: 0 }}
|
className={`btn rounded-circle border ${page === currentPage ? "btn-primary text-white" : "btn-light text-secondary"
|
||||||
onClick={() => handlePageClick(page)}
|
}`}
|
||||||
>
|
style={{ width: "38px", height: "38px", padding: 0, fontSize: "1rem", lineHeight: "1" }} // Adjusted size and font for better fit
|
||||||
{page}
|
onClick={() => handlePageClick(page)}
|
||||||
</button>
|
>
|
||||||
);
|
{page}
|
||||||
})}
|
</button>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
|
||||||
<button
|
{/* Next Button */}
|
||||||
className="btn btn-sm rounded-circle border"
|
<button
|
||||||
onClick={() => handlePageClick(Math.min(totalPages, currentPage + 1))}
|
className="btn btn-sm rounded-circle border text-secondary" // Added text-secondary for lighter color, kept btn-sm
|
||||||
disabled={currentPage === totalPages}
|
onClick={() => handlePageClick(Math.min(totalPages, currentPage + 1))}
|
||||||
title="Next"
|
disabled={currentPage === totalPages}
|
||||||
>
|
title="Next"
|
||||||
»
|
style={{ width: "38px", height: "38px", padding: 0 }} // Ensure consistent size
|
||||||
</button>
|
>
|
||||||
</div>
|
»
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -284,19 +284,18 @@ const DirectoryPageHeader = ({
|
|||||||
placeholder={viewType === "notes" ? "Search Notes..." : "Search Contact..."}
|
placeholder={viewType === "notes" ? "Search Notes..." : "Search Contact..."}
|
||||||
value={searchText}
|
value={searchText}
|
||||||
onChange={(e) => setSearchText(e.target.value)}
|
onChange={(e) => setSearchText(e.target.value)}
|
||||||
style={{ width: "200px" }}
|
style={{ width: "200px",height: "30px" }}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Filter by funnel icon for Notes view */}
|
{/* Filter by funnel icon for Notes view */}
|
||||||
{viewType === "notes" && (
|
{viewType === "notes" && (
|
||||||
<div className="dropdown" style={{ width: "fit-content", minWidth: "400px" }}> {/* Added minWidth here */}
|
<div className="dropdown" style={{ width: "fit-content", minWidth: "400px" }}>
|
||||||
<a
|
<a
|
||||||
className="dropdown-toggle hide-arrow cursor-pointer d-flex align-items-center position-relative"
|
className="dropdown-toggle hide-arrow cursor-pointer d-flex align-items-center position-relative"
|
||||||
data-bs-toggle="dropdown"
|
data-bs-toggle="dropdown"
|
||||||
aria-expanded="false"
|
aria-expanded="false"
|
||||||
>
|
>
|
||||||
<i className={`fa-solid fa-filter ms-1 fs-5 ${selectedCreators.length > 0 || selectedOrgs.length > 0 ? "text-primary" : "text-muted"}`}></i>
|
<i className={`fa-solid fa-filter ms-1 fs-5 ${selectedCreators.length > 0 || selectedOrgs.length > 0 ? "text-primary" : "text-muted"}`}></i>
|
||||||
{/* Removed the numerical badge for notes filter */}
|
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
@ -329,9 +328,6 @@ const DirectoryPageHeader = ({
|
|||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Divider */}
|
|
||||||
{/* <div style={{ width: "1px", backgroundColor: "#dee2e6", margin: "0 12px" }}></div> */}
|
|
||||||
|
|
||||||
{/* Organization */}
|
{/* Organization */}
|
||||||
<div className="ps-3" style={{ flex: 1 }}>
|
<div className="ps-3" style={{ flex: 1 }}>
|
||||||
<p className="text-muted mb-1">Organization</p>
|
<p className="text-muted mb-1">Organization</p>
|
||||||
@ -353,10 +349,11 @@ const DirectoryPageHeader = ({
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Buttons */}
|
{/* Buttons */}
|
||||||
<div className="d-flex justify-content-between mt-3">
|
<div className="d-flex justify-content-end gap-2 mt-1">
|
||||||
<button
|
<button
|
||||||
className="btn btn-sm btn-outline-danger"
|
className="btn btn-xs btn-secondary"
|
||||||
onClick={() => {
|
onClick={(e) => {
|
||||||
|
// e.stopPropagation();
|
||||||
setSelectedCreators([]);
|
setSelectedCreators([]);
|
||||||
setSelectedOrgs([]);
|
setSelectedOrgs([]);
|
||||||
setFilteredOrganizations(allOrganizations);
|
setFilteredOrganizations(allOrganizations);
|
||||||
@ -365,7 +362,12 @@ const DirectoryPageHeader = ({
|
|||||||
>
|
>
|
||||||
Clear
|
Clear
|
||||||
</button>
|
</button>
|
||||||
<button className="btn btn-sm btn-primary" onClick={applyCombinedFilter}>
|
<button
|
||||||
|
className="btn btn-xs btn-primary"
|
||||||
|
onClick={(e) => {
|
||||||
|
applyCombinedFilter();
|
||||||
|
}}
|
||||||
|
>
|
||||||
Apply Filter
|
Apply Filter
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -457,13 +459,27 @@ const DirectoryPageHeader = ({
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="d-flex justify-content-end gap-2 mt-1">
|
<div className="d-flex justify-content-end gap-2 mt-1">
|
||||||
<button className="btn btn-xs btn-secondary" onClick={clearFilter}>Clear</button>
|
<button
|
||||||
<button className="btn btn-xs btn-primary" onClick={applyFilter}>Apply Filter</button>
|
className="btn btn-xs btn-secondary"
|
||||||
|
onClick={(e) => {
|
||||||
|
// e.stopPropagation();
|
||||||
|
clearFilter();
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Clear
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
className="btn btn-xs btn-primary"
|
||||||
|
onClick={(e) => {
|
||||||
|
applyFilter();
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Apply Filter
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="col-12 col-md-6 mb-2 px-5 d-flex justify-content-end align-items-center gap-2">
|
<div className="col-12 col-md-6 mb-2 px-5 d-flex justify-content-end align-items-center gap-2">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user