diff --git a/src/components/Directory/NoteCardDirectoryEditable.jsx b/src/components/Directory/NoteCardDirectoryEditable.jsx index 7759e62a..de91ad69 100644 --- a/src/components/Directory/NoteCardDirectoryEditable.jsx +++ b/src/components/Directory/NoteCardDirectoryEditable.jsx @@ -184,7 +184,7 @@ const NoteCardDirectoryEditable = ({ ) : ( diff --git a/src/data/menuData.json b/src/data/menuData.json index 0802133b..cadf34bf 100644 --- a/src/data/menuData.json +++ b/src/data/menuData.json @@ -46,11 +46,7 @@ "available": true, "link": "/activities/reports" }, - { - "text": "Image Gallary", - "available": true, - "link": "/activities/gallary" - }, + { "text": "Daily Expenses", "available": true, @@ -63,6 +59,12 @@ "icon": "bx bx-group", "available": true, "link": "/directory" + }, + { + "text": "Image Gallary", + "icon": "bx bx-images", + "available": true, + "link": "/gallary" }, { "text": "Administration", diff --git a/src/pages/Directory/DirectoryPageHeader.jsx b/src/pages/Directory/DirectoryPageHeader.jsx index 6a3ae418..4efc043e 100644 --- a/src/pages/Directory/DirectoryPageHeader.jsx +++ b/src/pages/Directory/DirectoryPageHeader.jsx @@ -278,7 +278,7 @@ const DirectoryPageHeader = ({
-
+
{ endDate: null, }; setAppliedFilters(initialStateApplied); - - setIsFilterPanelOpen(false); }, []); const filteredImages = images.filter((img) => { @@ -278,16 +276,16 @@ const ImageGallery = () => { {label}
{type === "dateRange" && (selectedFilters.startDate || selectedFilters.endDate) && ( - - )} + + )} {type !== "dateRange" && selectedFilters[type] && selectedFilters[type].length > 0 && ( @@ -301,17 +299,15 @@ const ImageGallery = () => { Clear )} - {/* Add the collapse/expand icon */} - - {collapsedFilters[type] ? '+' : '-'} - + + {collapsedFilters[type] ? '+' : '-'} +
{!collapsedFilters[type] && (
{type === "dateRange" ? ( - // The DateRangePicker will be rendered outside this function, at the end of the filter panel - null + null ) : ( items.map((item) => { const itemId = item[0]; @@ -377,12 +373,14 @@ const ImageGallery = () => {
- {buildingName} > {floorName} > {workArea} >{" "} - {activity} + {buildingName} > {floorName} > {workArea} >{" "} + {activity}
{workCategoryName && (
- {workCategoryName} + + {workCategoryName} +
)}
@@ -453,35 +451,37 @@ const ImageGallery = () => {
-
+
toggleCollapse('dateRange')}> Date Range - - - {collapsedFilters.dateRange ? '+' : '-'} - + + + {collapsedFilters.dateRange ? '+' : '-'} +
{!collapsedFilters.dateRange && (
)} @@ -492,15 +492,12 @@ const ImageGallery = () => { {renderFilterCategory("Activity", activities, "activity")} {renderFilterCategory("Uploaded By (User)", uploadedByUsers, "uploadedBy")} {renderFilterCategory("Work Category", workCategories, "workCategory")} - - {/* DateRangePicker at the end */} -
- -
diff --git a/src/pages/Gallary/ImageGallery.css b/src/pages/Gallary/ImageGallery.css index 9e9e64fa..377fe531 100644 --- a/src/pages/Gallary/ImageGallery.css +++ b/src/pages/Gallary/ImageGallery.css @@ -55,7 +55,6 @@ } .filter-button { - background-color: #6366f1; color: white; padding: 8px 12px; font-size: 14px; @@ -368,7 +367,6 @@ } .location-line { - font-weight: 600; font-size: 12px; color: #555; text-align: right; @@ -455,14 +453,14 @@ position: relative; } -hr { - display: none; -} - .image-card:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15); } +hr { + display: none; +} + .image-wrapper img { width: 100%; @@ -532,43 +530,14 @@ hr { .filter-actions { display: flex; - justify-content: space-between; - margin-top: auto; - padding-top: 10px; - position: sticky; - bottom: 0; - z-index: 10; - padding-bottom: 5px; -} - -.btn { - padding: 8px 15px; - border-radius: 5px; - font-size: 13px; - cursor: pointer; - transition: background-color 0.2s ease, box-shadow 0.2s ease; - flex: 1; - margin: 0 4px; -} - -.btn-primary { - background-color: #6366f1; - color: white; - border: none; -} - -.btn-primary:hover { - background-color: #4f46e5; -} - -.btn-secondary { - border: 1px solid #cbd5e1; - background-color: #fff; - color: #333; -} - -.btn-secondary:hover { - background-color: #e2e8f0; + justify-content: end; + margin-top: auto; + padding-top: 10px; + position: sticky; + bottom: 0; + z-index: 10; + padding-bottom: 5px; + gap: 8px; } .datepicker { diff --git a/src/router/AppRoutes.jsx b/src/router/AppRoutes.jsx index eac7d762..7c364ca9 100644 --- a/src/router/AppRoutes.jsx +++ b/src/router/AppRoutes.jsx @@ -75,7 +75,7 @@ const router = createBrowserRouter( { path: "/activities/records/:projectId?", element: }, { path: "/activities/task", element: }, { path: "/activities/reports", element: }, - { path: "/activities/gallary", element: }, + { path: "/gallary", element: }, { path: "/masters", element: }, { path: "/help/support", element: }, { path: "/help/docs", element: },