upadating directory filter in design.

This commit is contained in:
Kartik sharma 2025-06-27 16:57:57 +05:30
parent 92ad8485f6
commit c7cd96f509
2 changed files with 53 additions and 32 deletions

View File

@ -115,7 +115,7 @@ const NoteCardDirectoryEditable = ({
</GlobalModel> </GlobalModel>
)} )}
<div <div
className="card p-1 shadow-sm border-1 mb-4 rounded" className="card p-1 shadow-sm border-1 mb-4 p-4 rounded"
style={{ style={{
width: "100%", width: "100%",
background: noteItem.isActive ? "#fff" : "#f8f6f6", background: noteItem.isActive ? "#fff" : "#f8f6f6",

View File

@ -299,7 +299,19 @@ const DirectoryPageHeader = ({
{/* Removed the numerical badge for notes filter */} {/* Removed the numerical badge for notes filter */}
</a> </a>
<div className="dropdown-menu p-3" style={{ width: "300px", maxHeight: "400px", overflowY: "auto" }}> <div
className="dropdown-menu p-3"
style={{
minWidth: "600px",
maxHeight: "400px",
overflowY: "auto",
overflowX: "hidden",
whiteSpace: "normal"
}}
>
<div className="d-flex">
{/* Created By */}
<div className="pe-3" style={{ flex: 1 }}>
<p className="text-muted mb-1">Created By</p> <p className="text-muted mb-1">Created By</p>
{allCreators.map((name, idx) => ( {allCreators.map((name, idx) => (
<div className="form-check mb-1" key={`creator-${idx}`}> <div className="form-check mb-1" key={`creator-${idx}`}>
@ -310,13 +322,19 @@ const DirectoryPageHeader = ({
checked={selectedCreators.includes(name)} checked={selectedCreators.includes(name)}
onChange={() => handleToggleCreator(name)} onChange={() => handleToggleCreator(name)}
/> />
<label className="form-check-label" htmlFor={`creator-${idx}`}> <label className="form-check-label text-nowrap" htmlFor={`creator-${idx}`}>
{name} {name}
</label> </label>
</div> </div>
))} ))}
</div>
<p className="text-muted mt-3 mb-1">Organization</p> {/* Divider */}
<div style={{ width: "1px", backgroundColor: "#dee2e6", margin: "0 12px" }}></div>
{/* Organization */}
<div className="ps-3" style={{ flex: 1 }}>
<p className="text-muted mb-1">Organization</p>
{filteredOrganizations.map((org, idx) => ( {filteredOrganizations.map((org, idx) => (
<div className="form-check mb-1" key={`org-${idx}`}> <div className="form-check mb-1" key={`org-${idx}`}>
<input <input
@ -326,13 +344,16 @@ const DirectoryPageHeader = ({
checked={selectedOrgs.includes(org)} checked={selectedOrgs.includes(org)}
onChange={() => handleToggleOrg(org)} onChange={() => handleToggleOrg(org)}
/> />
<label className="form-check-label" htmlFor={`org-${idx}`}> <label className="form-check-label text-nowrap" htmlFor={`org-${idx}`}>
{org} {org}
</label> </label>
</div> </div>
))} ))}
</div>
</div>
<div className="d-flex justify-content-between mt-2"> {/* Buttons */}
<div className="d-flex justify-content-between mt-3">
<button <button
className="btn btn-sm btn-outline-danger" className="btn btn-sm btn-outline-danger"
onClick={() => { onClick={() => {
@ -340,7 +361,6 @@ const DirectoryPageHeader = ({
setSelectedOrgs([]); setSelectedOrgs([]);
setFilteredOrganizations(allOrganizations); setFilteredOrganizations(allOrganizations);
setFilterAppliedNotes(notesForFilter); setFilterAppliedNotes(notesForFilter);
}} }}
> >
Clear Clear
@ -350,6 +370,7 @@ const DirectoryPageHeader = ({
</button> </button>
</div> </div>
</div> </div>
</div> </div>
)} )}