diff --git a/src/pages/Gallary/ImageGallary.jsx b/src/pages/Gallary/ImageGallary.jsx index 016d2bc6..172d9d8c 100644 --- a/src/pages/Gallary/ImageGallary.jsx +++ b/src/pages/Gallary/ImageGallary.jsx @@ -6,10 +6,10 @@ import { useSelector } from "react-redux"; import { useModal } from "./ModalContext"; import ImagePop from "./ImagePop"; import Avatar from "../../components/common/Avatar"; -import DateRangePicker from "../../components/common/DateRangePicker"; import eventBus from "../../services/eventBus"; import Breadcrumb from "../../components/common/Breadcrumb"; -import {formatUTCToLocalTime} from "../../utils/dateUtils"; +import { formatUTCToLocalTime } from "../../utils/dateUtils"; +import DateRangePicker from "../../components/common/DateRangePicker"; const PAGE_SIZE = 10; const SCROLL_THRESHOLD = 5; @@ -207,9 +207,9 @@ const ImageGallery = () => { } else { id = batch[idKey]; } - + const name = batch[nameKey]; - + if (id && name && !map.has(id)) { map.set(id, name); } @@ -229,7 +229,7 @@ const ImageGallery = () => { } }); }); - return Array.from(uniqueUsersMap.entries()).sort((a, b) => a[1].localeCompare(b[1])); + return Array.from(uniqueUsersMap.entries()).sort((a, b) => a[1].localeCompare(b[1])); }, [allImagesData]); const buildings = getUniqueValuesWithIds("buildingId", "buildingName"); @@ -315,7 +315,7 @@ const ImageGallery = () => { return false; } if ((oldVal === null && newVal === "") || (oldVal === "" && newVal === null)) { - return false; + return false; } return oldVal !== newVal; }); @@ -406,8 +406,7 @@ const ImageGallery = () => {
@@ -438,12 +437,12 @@ const ImageGallery = () => { ); return ( -
- +
@@ -605,13 +604,13 @@ const ImageGallery = () => { >
- - -
+ + +
{renderFilterCategory("Date Range", [], "dateRange")} {renderFilterCategory("Building", buildings, "building")} @@ -621,7 +620,7 @@ const ImageGallery = () => { {renderFilterCategory("Uploaded By (User)", uploadedByUsers, "uploadedBy")} {renderFilterCategory("Work Category", workCategories, "workCategory")} - +