diff --git a/public/assets/vendor/css/core.css b/public/assets/vendor/css/core.css index d7f7cfcb..e73f6706 100644 --- a/public/assets/vendor/css/core.css +++ b/public/assets/vendor/css/core.css @@ -836,7 +836,7 @@ progress { } .row { - --bs-gutter-x: 1.625rem; + --bs-gutter-x: 3.625rem; --bs-gutter-y: 0; display: flex; flex-wrap: wrap; @@ -2553,7 +2553,7 @@ progress { } .table-responsive { - overflow-x: auto; + /* overflow-x: auto; */ -webkit-overflow-scrolling: touch; } @@ -8966,10 +8966,8 @@ a:not([href]):hover { } /* Autofill input bg and text color issue on different OS and browsers */ -input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus, -textarea:-webkit-autofill, textarea:-webkit-autofill:hover, textarea:-webkit-autofill:focus, select:-webkit-autofill, @@ -8978,6 +8976,15 @@ select:-webkit-autofill:focus, input:-internal-autofill-selected { background-clip: text !important; } +input:-webkit-autofill, +textarea:-webkit-autofill, +select:-webkit-autofill { + -webkit-box-shadow: 0 0 0px 1000px white inset !important; + box-shadow: 0 0 0px 1000px white inset !important; + -webkit-text-fill-color: #000 !important; + caret-color: #000 !important; + transition: background-color 5000s ease-in-out 0s; +} h1, .h1 { diff --git a/src/assets/vendor/css/core.css b/src/assets/vendor/css/core.css index 625896b1..70f4fb09 100644 --- a/src/assets/vendor/css/core.css +++ b/src/assets/vendor/css/core.css @@ -2436,7 +2436,7 @@ progress { } .table-responsive { - overflow-x: auto; + /* overflow-x: auto; */ -webkit-overflow-scrolling: touch; } diff --git a/src/components/Activities/AttendcesLogs.jsx b/src/components/Activities/AttendcesLogs.jsx index 32c46617..505c7c61 100644 --- a/src/components/Activities/AttendcesLogs.jsx +++ b/src/components/Activities/AttendcesLogs.jsx @@ -234,7 +234,7 @@ const AttendanceLog = ({
{data && data.length > 0 && ( @@ -332,7 +332,7 @@ const AttendanceLog = ({
)} {!loading && !isRefreshing && data.length === 0 && ( - No employee logs + No employee logs )} {/* {error && !loading && !isRefreshing && ( diff --git a/src/components/Project/ProjectNav.jsx b/src/components/Project/ProjectNav.jsx index 9b266a9b..9fa89cdb 100644 --- a/src/components/Project/ProjectNav.jsx +++ b/src/components/Project/ProjectNav.jsx @@ -14,7 +14,7 @@ const ProjectNav = ({ onPillClick, activePill }) => {
{!collapsedFilters[type] && ( @@ -406,31 +320,22 @@ const ImageGallery = () => {
) : ( - items.map((item) => { - const itemId = item[0]; - const itemName = item[1]; - const isChecked = selectedFilters[type].some( - (selectedItem) => selectedItem[0] === itemId - ); - - return ( - - ); - }) + items.map(([itemId, itemName]) => ( + + )) )} )} @@ -438,40 +343,25 @@ const ImageGallery = () => { ); return ( -
- +
+
{loading && pageNumber === 1 ? ( -
-
-
+
) : images.length > 0 ? ( images.map((batch) => { const firstDoc = batch.documents[0]; - const userName = `${firstDoc?.uploadedBy?.firstName || ""} ${firstDoc?.uploadedBy?.lastName || "" - }`.trim(); - const date = formatUTCToLocalTime(firstDoc?.uploadedAt) - - - + const userName = `${firstDoc?.uploadedBy?.firstName || ""} ${firstDoc?.uploadedBy?.lastName || ""}`.trim(); + const date = formatUTCToLocalTime(firstDoc?.uploadedAt); const showScrollButtons = batch.documents.length > SCROLL_THRESHOLD; return ( @@ -479,29 +369,15 @@ const ImageGallery = () => {
- +
- - {userName} - - - {date} - + {userName} + {date}
-
-
- {batch.buildingName} > {batch.floorName} >{" "} - {batch.workAreaName || "Unknown"} >{" "} - {batch.activityName} -
+
{batch.buildingName} > {batch.floorName} > {batch.workAreaName || "Unknown"} > {batch.activityName}
{batch.workCategoryName && (
@@ -511,107 +387,53 @@ const ImageGallery = () => { )}
-
- {showScrollButtons && ( - - )} -
(imageGroupRefs.current[batch.batchId] = el)} - > + {showScrollButtons && } +
(imageGroupRefs.current[batch.batchId] = el)}> {batch.documents.map((doc, idx) => { const hoverDate = moment(doc.uploadedAt).format("DD-MM-YYYY"); const hoverTime = moment(doc.uploadedAt).format("hh:mm A"); return ( -
- openModal() - } - onMouseEnter={() => setHoveredImage(doc)} - onMouseLeave={() => setHoveredImage(null)} - > +
openModal()} onMouseEnter={() => setHoveredImage(doc)} onMouseLeave={() => setHoveredImage(null)}>
{`Image
{hoveredImage === doc && (
-

- Date: {hoverDate} -

-

- Time: {hoverTime} -

-

- Activity: {batch.activityName} -

+

Date: {hoverDate}

+

Time: {hoverTime}

+

Activity: {batch.activityName}

)}
); })}
- {showScrollButtons && ( - - )} + {showScrollButtons && }
); }) ) : ( - !loading &&

- No images match the selected filters. -

+ !loading &&

No images match the selected filters.

)} -
{loadingMore && hasMore &&
} - {!hasMore && !loading && images.length > 0 && ( -

You've reached the end of the images.

- )} + {!hasMore && !loading && images.length > 0 &&

You've reached the end of the images.

}
-
+
-
- Filters -
- +
Filters
+
- - -
+ + +
{renderFilterCategory("Date Range", [], "dateRange")} {renderFilterCategory("Building", buildings, "building")} @@ -620,12 +442,10 @@ const ImageGallery = () => { {renderFilterCategory("Activity", activities, "activity")} {renderFilterCategory("Uploaded By (User)", uploadedByUsers, "uploadedBy")} {renderFilterCategory("Work Category", workCategories, "workCategory")} - -
); }; -export default ImageGallery; \ No newline at end of file +export default ImageGallery; diff --git a/src/pages/Gallary/ImagePop.css b/src/pages/Gallary/ImagePop.css index dfdb549c..367758f6 100644 --- a/src/pages/Gallary/ImagePop.css +++ b/src/pages/Gallary/ImagePop.css @@ -1,103 +1,149 @@ +/* Image Modal Overlay */ .image-modal-overlay { position: fixed; top: 0; left: 0; - z-index: 9999; /* High z-index to ensure it's on top */ + z-index: 9999; width: 100%; height: 100%; - background-color: rgba(0, 0, 0, 0.85); /* Dark semi-transparent background */ + background-color: rgba(0, 0, 0, 0.85); display: flex; justify-content: center; align-items: center; } +/* Main Modal Content Box */ .image-modal-content { background: #fff; padding: 24px; - max-width: 90%; /* Responsive max-width */ - max-height: 100%; /* Responsive max-height */ + max-width: 50%; + max-height: 95vh; /* Limits the modal's height to 95% of viewport height */ border-radius: 12px; position: relative; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); text-align: center; - display: flex; /* Use flexbox for internal layout */ + display: flex; flex-direction: column; align-items: center; justify-content: center; + overflow-y: auto; /* Enables vertical scrolling */ + + /* --- HIDE SCROLLBAR FOR MAIN MODAL CONTENT --- */ + /* For Webkit browsers (Chrome, Safari, Edge) */ + &::-webkit-scrollbar { + width: 0px; /* Hide vertical scrollbar */ + height: 0px; /* Hide horizontal scrollbar, though unlikely needed here */ + } + /* For Firefox */ + scrollbar-width: none; /* Hide scrollbar in Firefox */ + /* For Internet Explorer and Edge (legacy) */ + -ms-overflow-style: none; + /* --- END HIDE SCROLLBAR --- */ } +/* Image Styles */ .modal-image { max-width: 100%; - max-height: 70vh; /* Limits image height to 70% of viewport height */ + max-height: 70vh; + width: auto; border-radius: 10px; - object-fit: contain; /* Ensures the whole image is visible without cropping */ + object-fit: contain; margin-bottom: 20px; - flex-shrink: 0; /* Prevent image from shrinking if content is too large */ + flex-shrink: 0; } -.image-details { +/* Scrollable Container for Text Details */ +.image-details-scroll-container { + width: 100%; + flex-grow: 1; + max-height: calc(95vh - 70vh - (24px * 2) - 20px); /* Approximate calculation for text area height */ + overflow-y: auto; /* Enables vertical scrolling for details */ text-align: left; + padding-right: 5px; /* Add some padding so text doesn't touch the hidden scrollbar area */ + + /* --- HIDE SCROLLBAR FOR TEXT DETAILS SECTION --- */ + /* For Webkit browsers (Chrome, Safari, Edge) */ + &::-webkit-scrollbar { + width: 0px; /* Hide vertical scrollbar */ + height: 0px; /* Hide horizontal scrollbar */ + } + /* For Firefox */ + scrollbar-width: none; /* Hide scrollbar in Firefox */ + /* For Internet Explorer and Edge (legacy) */ + -ms-overflow-style: none; + /* --- END HIDE SCROLLBAR --- */ +} + +/* Image Details Section (inside the scroll container) */ +.image-details { color: #444; font-size: 14px; line-height: 1.4; margin: 0; padding: 0; - width: 100%; /* Ensure details section takes full width */ + width: 100%; + text-align: left; } .image-details p { - margin: 4px 0; /* Reduce vertical space between lines in details */ + margin: 4px 0; + white-space: normal; + word-wrap: break-word; + overflow-wrap: break-word; + text-overflow: initial; + text-align: left; } +/* Close Button */ .close-button { position: absolute; - top: 1px; /* Position relative to the modal content */ + top: 1px; right: 8px; font-size: 30px; background: none; border: none; - color: black; /* White color for visibility on dark overlay */ + color: black; cursor: pointer; padding: 0; line-height: 1; - z-index: 10000; /* Ensure it's above everything else */ + z-index: 10000; } -/* Styles for the navigation buttons */ +/* Navigation Buttons */ .nav-button { position: absolute; - top: 50%; /* Vertically center them */ - transform: translateY(-50%); /* Adjust for perfect vertical centering */ - background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */ + top: 50%; + transform: translateY(-50%); + background-color: rgba(0, 0, 0, 0.5); color: white; border: none; padding: 10px 15px; font-size: 30px; cursor: pointer; - z-index: 1000; /* Ensure buttons are above the image */ - border-radius: 50%; /* Make them circular */ + z-index: 1000; + border-radius: 50%; width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; - transition: background-color 0.3s ease; /* Smooth hover effect */ + transition: background-color 0.3s ease; } .nav-button:hover { - background-color: rgba(0, 0, 0, 0.8); /* Darker on hover */ + background-color: rgba(0, 0, 0, 0.8); } .nav-button.prev-button { - left: 0px; /* Position left arrow */ + left: 0px; } .nav-button.next-button { - right: 0px; /* Position right arrow */ + right: 0px; } -/* Style for disabled buttons (optional) */ +/* Disabled Button Style */ .nav-button:disabled { opacity: 0.5; cursor: not-allowed; -} +} \ No newline at end of file diff --git a/src/pages/authentication/ChangePassword.jsx b/src/pages/authentication/ChangePassword.jsx index 5191d6c3..a501c5eb 100644 --- a/src/pages/authentication/ChangePassword.jsx +++ b/src/pages/authentication/ChangePassword.jsx @@ -69,22 +69,17 @@ const ChangePasswordPage = ({ onClose }) => { className="modal d-flex align-items-center justify-content-center show" tabIndex="-1" role="dialog" - style={{ display: "flex", backgroundColor: "rgba(0,0,0,0.5)" }} + style={{ backgroundColor: "rgba(0,0,0,0.5)" }} >
-
- {" "} +
-
- -
- {/* Close Button */}
Change Password

@@ -119,7 +114,6 @@ const ChangePasswordPage = ({ onClose }) => { )}

- {/*
*/}
@@ -180,14 +174,14 @@ const ChangePasswordPage = ({ onClose }) => {
)}
- {/*
*/} -
+ +
Your password must have at least 8 characters and include a lower - case latter, an uppercase letter, a number, and a special + case letter, an uppercase letter, a number, and a special character.
{/* Action Buttons */} -
+
diff --git a/src/pages/employee/AttendancesEmployeeRecords.jsx b/src/pages/employee/AttendancesEmployeeRecords.jsx index 1908ef21..bac57a09 100644 --- a/src/pages/employee/AttendancesEmployeeRecords.jsx +++ b/src/pages/employee/AttendancesEmployeeRecords.jsx @@ -85,7 +85,7 @@ const AttendancesEmployeeRecords = ({ employee }) => { const currentDate = new Date().toLocaleDateString("en-CA"); const { currentPage, totalPages, currentItems, paginate } = usePagination( sortedFinalList, - 10 + 20 ); useEffect(() => { @@ -141,13 +141,12 @@ const AttendancesEmployeeRecords = ({ employee }) => { id="DataTables_Table_0_length" >
- +
setIsRefreshing(!isRefreshing)} @@ -224,7 +223,7 @@ const AttendancesEmployeeRecords = ({ employee }) => { )}
- {!loading && data.length > 5 && ( + {!loading && sortedFinalList.length > 20 && ( +)} +
); diff --git a/src/pages/Gallary/ImageGalleryAPI.jsx b/src/repositories/ImageGalleryAPI.jsx similarity index 72% rename from src/pages/Gallary/ImageGalleryAPI.jsx rename to src/repositories/ImageGalleryAPI.jsx index 9ca09bfe..5f75dbed 100644 --- a/src/pages/Gallary/ImageGalleryAPI.jsx +++ b/src/repositories/ImageGalleryAPI.jsx @@ -1,9 +1,8 @@ -import { api } from "../../utils/axiosClient"; +import { api } from "../utils/axiosClient"; export const ImageGalleryAPI = { ImagesGet: (projectId, filter, pageNumber, pageSize) => { const payloadJsonString = JSON.stringify(filter); - // Corrected API endpoint with pagination parameters return api.get(`/api/image/images/${projectId}?filter=${payloadJsonString}&pageNumber=${pageNumber}&pageSize=${pageSize}`); }, -}; \ No newline at end of file +};