Issues_Aug_1W #355

Merged
pramod.mahajan merged 66 commits from Issues_Aug_1W into main 2025-08-23 11:09:24 +00:00
Showing only changes of commit ef06c69a3b - Show all commits

View File

@ -318,54 +318,60 @@ const DirectoryPageHeader = ({
whiteSpace: "normal" whiteSpace: "normal"
}} }}
> >
<div className="d-flex gap-3"> {allCreators.length === 0 && filteredOrganizations.length === 0 ? (
{/* Created By */} <div className="text-center text-muted py-5">
<div style={{ flexBasis: "30%", maxHeight: "260px", overflowY: "auto" }}> No filter found
<div style={{ position: "sticky", top: 0, background: "#fff", zIndex: 1 }}>
<p className="text-muted mb-2 pt-2">Created By</p>
</div>
{allCreators.map((name, idx) => (
<div className="form-check mb-1" key={`creator-${idx}`}>
<input
className="form-check-input form-check-input-sm"
type="checkbox"
id={`creator-${idx}`}
checked={selectedCreators.includes(name)}
onChange={() => handleToggleCreator(name)}
style={{ width: "1rem", height: "1rem" }}
/>
<label className="form-check-label text-nowrap" htmlFor={`creator-${idx}`}>
{name}
</label>
</div>
))}
</div> </div>
) : (
{/* Organization */} <div className="d-flex gap-3">
<div style={{ maxHeight: "260px", overflowY: "auto", overflowX: "hidden", }}> {/* Created By */}
<div style={{ position: "sticky", top: 0, background: "#fff", zIndex: 1 }}> <div style={{ flexBasis: "30%", maxHeight: "260px", overflowY: "auto" }}>
<p className="text-muted mb-2 pt-2">Organization</p> <div style={{ position: "sticky", top: 0, background: "#fff", zIndex: 1 }}>
</div> <p className="text-muted mb-2 pt-2">Created By</p>
{filteredOrganizations.map((org, idx) => (
<div className="form-check mb-1" key={`org-${idx}`}>
<input
className="form-check-input form-check-input-sm"
type="checkbox"
id={`org-${idx}`}
checked={selectedOrgs.includes(org)}
onChange={() => handleToggleOrg(org)}
style={{ width: "1rem", height: "1rem" }}
/>
<label className="form-check-label text-nowrap" htmlFor={`org-${idx}`}>
{org}
</label>
</div> </div>
))} {allCreators.map((name, idx) => (
</div> <div className="form-check mb-1" key={`creator-${idx}`}>
</div> <input
className="form-check-input form-check-input-sm"
type="checkbox"
id={`creator-${idx}`}
checked={selectedCreators.includes(name)}
onChange={() => handleToggleCreator(name)}
style={{ width: "1rem", height: "1rem" }}
/>
<label className="form-check-label text-nowrap" htmlFor={`creator-${idx}`}>
{name}
</label>
</div>
))}
</div>
{/* Organization */}
<div style={{ maxHeight: "260px", overflowY: "auto", overflowX: "hidden" }}>
<div style={{ position: "sticky", top: 0, background: "#fff", zIndex: 1 }}>
<p className="text-muted mb-2 pt-2">Organization</p>
</div>
{filteredOrganizations.map((org, idx) => (
<div className="form-check mb-1" key={`org-${idx}`}>
<input
className="form-check-input form-check-input-sm"
type="checkbox"
id={`org-${idx}`}
checked={selectedOrgs.includes(org)}
onChange={() => handleToggleOrg(org)}
style={{ width: "1rem", height: "1rem" }}
/>
<label className="form-check-label text-nowrap" htmlFor={`org-${idx}`}>
{org}
</label>
</div>
))}
</div>
</div>
)}
</div> </div>
{/* Sticky Footer Buttons */} {/* Sticky Footer Buttons */}
<div <div
className="d-flex justify-content-end gap-2 p-2 " className="d-flex justify-content-end gap-2 p-2 "
@ -440,54 +446,74 @@ const DirectoryPageHeader = ({
<ul className="dropdown-menu p-3" style={{ width: "700px" }}> <ul className="dropdown-menu p-3" style={{ width: "700px" }}>
<p className="text-muted m-0 h6">Filter by</p> <p className="text-muted m-0 h6">Filter by</p>
<div className="d-flex flex-nowrap"> {filteredBuckets.length === 0 && filteredCategories.length === 0 ? (
<div className="mt-1 me-4" style={{ flexBasis: "50%" }}> <div className="text-center text-muted py-5">
<p className="text-small mb-1">Buckets</p> No filter found
<div className="d-flex flex-wrap"> </div>
{filteredBuckets.map(({ id, name }) => ( ) : (
<div className="form-check me-3 mb-1" style={{ minWidth: "calc(50% - 15px)" }} key={id}> <div className="d-flex flex-nowrap">
<input <div className="mt-1 me-4" style={{ flexBasis: "50%" }}>
className="form-check-input form-check-input-sm" <p className="text-small mb-1">Buckets</p>
type="checkbox" <div className="d-flex flex-wrap">
id={`bucket-${id}`} {filteredBuckets.map(({ id, name }) => (
checked={tempSelectedBucketIds.includes(id)} <div
onChange={() => handleTempBucketChange(id)} className="form-check me-3 mb-1"
style={{ width: "1rem", height: "1rem" }} style={{ minWidth: "calc(50% - 15px)" }}
/> key={id}
<label className="form-check-label text-nowrap text-small" htmlFor={`bucket-${id}`}> >
{name} <input
</label> className="form-check-input form-check-input-sm"
</div> type="checkbox"
))} id={`bucket-${id}`}
checked={tempSelectedBucketIds.includes(id)}
onChange={() => handleTempBucketChange(id)}
style={{ width: "1rem", height: "1rem" }}
/>
<label
className="form-check-label text-nowrap text-small"
htmlFor={`bucket-${id}`}
>
{name}
</label>
</div>
))}
</div>
</div>
<div className="mt-1" style={{ flexBasis: "50%" }}>
<p className="text-small mb-1">Categories</p>
<div className="d-flex flex-wrap">
{filteredCategories.map(({ id, name }) => (
<div
className="form-check me-3 mb-1"
style={{ minWidth: "calc(50% - 15px)" }}
key={id}
>
<input
className="form-check-input form-check-input-sm"
type="checkbox"
id={`cat-${id}`}
checked={tempSelectedCategoryIds.includes(id)}
onChange={() => handleTempCategoryChange(id)}
style={{ width: "1rem", height: "1rem" }}
/>
<label
className="form-check-label text-nowrap text-small"
htmlFor={`cat-${id}`}
>
{name}
</label>
</div>
))}
</div>
</div> </div>
</div> </div>
<div className="mt-1" style={{ flexBasis: "50%" }}> )}
<p className="text-small mb-1">Categories</p>
<div className="d-flex flex-wrap">
{filteredCategories.map(({ id, name }) => (
<div className="form-check me-3 mb-1" style={{ minWidth: "calc(50% - 15px)" }} key={id}>
<input
className="form-check-input form-check-input-sm"
type="checkbox"
id={`cat-${id}`}
checked={tempSelectedCategoryIds.includes(id)}
onChange={() => handleTempCategoryChange(id)}
style={{ width: "1rem", height: "1rem" }}
/>
<label className="form-check-label text-nowrap text-small" htmlFor={`cat-${id}`}>
{name}
</label>
</div>
))}
</div>
</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 <button
className="btn btn-xs btn-secondary" className="btn btn-xs btn-secondary"
onClick={(e) => { onClick={(e) => {
// e.stopPropagation();
clearFilter(); clearFilter();
}} }}
> >
@ -503,6 +529,7 @@ const DirectoryPageHeader = ({
</button> </button>
</div> </div>
</ul> </ul>
</div> </div>
)} )}
</div> </div>