diff --git a/index.html b/index.html index 24a9ef36..525634c5 100644 --- a/index.html +++ b/index.html @@ -1,7 +1,7 @@ - - + diff --git a/public/assets/css/core-extend.css b/public/assets/css/core-extend.css index b05f71c1..3a8406cb 100644 --- a/public/assets/css/core-extend.css +++ b/public/assets/css/core-extend.css @@ -11,6 +11,18 @@ top: var(--sticky-top, 0px) !important; z-index: 1025; } +.form-control-md { + min-height: calc(1.6em + 0.65rem + calc(var(--bs-border-width) * 2)); + padding: 0.18rem 0.60rem; + font-size: 0.875rem; /* ~14px */ + border-radius: var(--bs-border-radius); +} + +.form-control-md::file-selector-button { + padding: 0.32rem 0.75rem; + margin: -0.32rem -0.75rem; + margin-inline-end: 0.75rem; +} /* ===========================% Background_Colors %========================================================== */ @@ -222,7 +234,9 @@ font-weight: normal; .h-min { height: min-content; } .h-max { height: max-content; } - +.vh-50 { + height: 50vh !important; +} diff --git a/public/assets/css/default.css b/public/assets/css/default.css index 8503dc87..6e2cafb7 100644 --- a/public/assets/css/default.css +++ b/public/assets/css/default.css @@ -31,7 +31,7 @@ } .app-brand-text { - font-size: 1.75rem; + font-size: 1rem; letter-spacing: -0.5px; /* text-transform: lowercase; */ } diff --git a/public/assets/js/main.js b/public/assets/js/main.js index cc356fa7..272f0369 100644 --- a/public/assets/js/main.js +++ b/public/assets/js/main.js @@ -148,5 +148,41 @@ function Main () { wheelPropagation: false }); } + }; +document.addEventListener("DOMContentLoaded", function () { + const html = document.documentElement; + + /****************************** + * SIDEBAR HOVER BEHAVIOR + ******************************/ + document.addEventListener("mouseover", function (e) { + const isInsideSidebar = e.target.closest("#layout-menu"); + + if (isInsideSidebar && html.classList.contains("layout-menu-collapsed")) { + html.classList.add("layout-menu-hover"); + } + }); + + document.addEventListener("mouseout", function (e) { + const leftSidebar = !e.relatedTarget || !e.relatedTarget.closest("#layout-menu"); + + if (leftSidebar) { + html.classList.remove("layout-menu-hover"); + } + }); + + /****************************** + * TOGGLE MENU BUTTON OVERRIDE + ******************************/ + document.body.addEventListener("click", function (e) { + const btn = e.target.closest(".layout-menu-toggle"); + if (!btn) return; + + e.preventDefault(); + + html.classList.toggle("layout-menu-collapsed"); + html.classList.remove("layout-menu-hover"); + }); +}); diff --git a/public/assets/vendor/css/core.css b/public/assets/vendor/css/core.css index e1d620fe..1e6ee587 100644 --- a/public/assets/vendor/css/core.css +++ b/public/assets/vendor/css/core.css @@ -89,7 +89,7 @@ ); --bs-root-font-size: 16px; --bs-body-font-family: var(--bs-font-sans-serif); - --bs-body-font-size: 0.875rem; + --bs-body-font-size: 0.85rem; --bs-body-font-weight: 400; --bs-body-line-height: 1.375; --bs-body-color: #646e78; @@ -9060,7 +9060,7 @@ img[data-app-light-img][data-app-dark-img] { } .table th { color: var(--bs-heading-color); - font-size: 0.8125rem; + font-size: 0.8025rem; letter-spacing: 0.2px; text-transform: uppercase; } @@ -20345,7 +20345,7 @@ li:not(:first-child) .dropdown-item, } .fs-6 { - font-size: 0.9375rem !important; + font-size: 0.8375rem !important; } .fs-tiny { diff --git a/src/components/DailyProgressRport/TaskReportFilterPanel.jsx b/src/components/DailyProgressRport/TaskReportFilterPanel.jsx index 8394a158..e682ad14 100644 --- a/src/components/DailyProgressRport/TaskReportFilterPanel.jsx +++ b/src/components/DailyProgressRport/TaskReportFilterPanel.jsx @@ -39,14 +39,12 @@ const TaskReportFilterPanel = ({ handleFilter }) => { dateTo: localToUtc(formData.dateTo), }; handleFilter(filterPayload); - closePanel(); }; const onClear = () => { setResetKey((prev) => prev + 1); handleFilter(TaskReportDefaultValue); reset(TaskReportDefaultValue); - closePanel(); }; return ( diff --git a/src/components/DailyProgressRport/TaskReportList.jsx b/src/components/DailyProgressRport/TaskReportList.jsx index 00cb064e..f812937c 100644 --- a/src/components/DailyProgressRport/TaskReportList.jsx +++ b/src/components/DailyProgressRport/TaskReportList.jsx @@ -204,24 +204,34 @@ const TaskReportList = () => { This shows the total pending tasks for each activity on that date.

} + content={ +
+ This shows the total pending tasks for each activity on that date. +
+ } >
+ Reported/Planned{" "} This shows the reported versus planned tasks for each activity on that date.

} + content={ +
+ This shows the reported versus planned tasks for each activity on that date. +
+ } >
+ Assign Date Team Actions diff --git a/src/components/Dashboard/AttendanceOverview.jsx b/src/components/Dashboard/AttendanceOverview.jsx index 77fbee51..e6fc0624 100644 --- a/src/components/Dashboard/AttendanceOverview.jsx +++ b/src/components/Dashboard/AttendanceOverview.jsx @@ -100,7 +100,7 @@ const AttendanceOverview = () => { }; return ( -
+
{/* Header */}
diff --git a/src/components/Dashboard/Dashboard.jsx b/src/components/Dashboard/Dashboard.jsx index ad5ead8c..e918629d 100644 --- a/src/components/Dashboard/Dashboard.jsx +++ b/src/components/Dashboard/Dashboard.jsx @@ -17,12 +17,19 @@ import ExpenseAnalysis from "./ExpenseAnalysis"; import ExpenseStatus from "./ExpenseStatus"; import ExpenseByProject from "./ExpenseByProject"; import ProjectStatistics from "../Project/ProjectStatistics"; +import ServiceJobs from "./ServiceJobs"; +import { useHasUserPermission } from "../../hooks/useHasUserPermission"; +import { REGULARIZE_ATTENDANCE, SELF_ATTENDANCE, TEAM_ATTENDANCE } from "../../utils/constants"; const Dashboard = () => { // Get the selected project ID from Redux store const projectId = useSelector((store) => store.localVariables.projectId); const isAllProjectsSelected = projectId === null; + const canRegularize = useHasUserPermission(REGULARIZE_ATTENDANCE); + const canTeamAttendance = useHasUserPermission(TEAM_ATTENDANCE); + const canSelfAttendance = useHasUserPermission(SELF_ATTENDANCE); + return (
@@ -40,26 +47,6 @@ const Dashboard = () => {
- - {isAllProjectsSelected && ( -
- -
- )} -
- -
- {!isAllProjectsSelected && ( -
- -
- )} - - {!isAllProjectsSelected && ( -
- -
- )}
@@ -74,6 +61,32 @@ const Dashboard = () => {
+ + {isAllProjectsSelected && ( +
+ +
+ )} +
+ +
+ {!isAllProjectsSelected && (canRegularize || canTeamAttendance || canSelfAttendance) && ( +
+ +
+ )} + + {!isAllProjectsSelected && ( +
+
+ +
+
+ )} + + {/*
+ +
*/}
); diff --git a/src/components/Dashboard/ServiceJobs.jsx b/src/components/Dashboard/ServiceJobs.jsx new file mode 100644 index 00000000..987addda --- /dev/null +++ b/src/components/Dashboard/ServiceJobs.jsx @@ -0,0 +1,237 @@ +import React from "react"; + +const ServiceJobs = () => { + return ( +
+
+
+
+
Service Jobs
+

All Projects

+
+
+ +
+
+ + {/* Tabs */} +
    +
  • + +
  • +
  • + +
  • +
  • + +
  • +
+ + {/* Tab Content */} +
+ + {/* ---------------------- NEW TAB ---------------------- */} +
+ {/* Entry 1 */} +
    +
  • + + + +
    +
    + Sender +
    +
    Myrtle Ullrich
    +

    101 Boulder, California(CA), 95959

    +
    +
  • +
  • + + + +
    +
    + Receiver +
    +
    Barry Schowalter
    +

    939 Orange, California(CA), 92118

    +
    +
  • +
+ +
+ + {/* Entry 2 */} +
    +
  • + + + +
    +
    + Sender +
    +
    Veronica Herman
    +

    162 Windsor, California(CA), 95492

    +
    +
  • +
  • + + + +
    +
    + Receiver +
    +
    Helen Jacobs
    +

    487 Sunset, California(CA), 94043

    +
    +
  • +
+
+ + {/* ---------------------- PREPARING TAB ---------------------- */} +
+ + {/* Entry 1 */} +
    +
  • + + + +
    +
    + Sender +
    +
    Oliver Grant
    +

    220 Pine St, California(CA), 95765

    +
    +
  • + +
  • + + + +
    +
    + Receiver +
    +
    Samantha Lee
    +

    744 Bay Area, California(CA), 94016

    +
    +
  • +
+ +
+ + {/* Entry 2 */} +
    +
  • + + + +
    +
    + Sender +
    +
    Marcus Howard
    +

    58 Avenue, California(CA), 95376

    +
    +
  • + +
  • + + + +
    +
    + Receiver +
    +
    Daniel Foster
    +

    312 Marina, California(CA), 94109

    +
    +
  • +
+
+ + {/* ---------------------- SHIPPING TAB ---------------------- */} +
+ + {/* Entry 1 */} +
    +
  • + + + +
    +
    + Sender +
    +
    James Carter
    +

    441 Market St, California(CA), 94111

    +
    +
  • + +
  • + + + +
    +
    + Receiver +
    +
    Linda Moore
    +

    990 Willow Road, California(CA), 94025

    +
    +
  • +
+ +
+ + {/* Entry 2 */} +
    +
  • + + + +
    +
    + Sender +
    +
    Sarah Bennett
    +

    882 Canyon Rd, California(CA), 94704

    +
    +
  • + +
  • + + + +
    +
    + Receiver +
    +
    George Simmons
    +

    19 Palm St, California(CA), 93001

    +
    +
  • +
+
+ +
+
+
+ +
+
+ ); +}; + +export default ServiceJobs; diff --git a/src/components/Expenses/Filelist.jsx b/src/components/Expenses/Filelist.jsx index 35a4a986..36a48565 100644 --- a/src/components/Expenses/Filelist.jsx +++ b/src/components/Expenses/Filelist.jsx @@ -2,54 +2,53 @@ import React from "react"; import { formatFileSize, getIconByFileType } from "../../utils/appUtils"; import Tooltip from "../common/Tooltip"; -const Filelist = ({ files, removeFile, expenseToEdit,sm=6,md=4 }) => { +const Filelist = ({ files, removeFile, expenseToEdit, sm = 6, md = 4 }) => { return (
- {files - .filter((file) => { - if (expenseToEdit) { - return file.isActive; - } - return true; - }) - .map((file, idx) => ( -
-
- {/* File icon and info */} -
- + {files + .filter((file) => { + if (expenseToEdit) { + return file.isActive; + } + return true; + }) + .map((file, idx) => ( +
+
+ {/* File icon and info */} +
+ -
- - {file.fileName} - - - {file.fileSize ? formatFileSize(file.fileSize) : ""} - + +
+ + {file.fileName} + + + {file.fileSize ? formatFileSize(file.fileSize) : ""} + +
+
+
+ + {/* Delete icon */} + + { + e.preventDefault(); + removeFile(expenseToEdit ? file.documentId ?? file.tempId ?? idx : file.tempId ?? idx); + }} + > +
- - {/* Delete icon */} - - { - e.preventDefault(); - removeFile(expenseToEdit ? file.documentId : idx); - }} - > - -
-
- ))} -
- + ))} +
); }; @@ -58,13 +57,11 @@ export const FilelistView = ({ files, viewFile }) => { return (
{files?.map((file, idx) => ( -
+
{/* File icon and info */}
- +
{ e.preventDefault(); viewFile({ IsOpen: true, - Image: file.preSignedUrl, + Image: files, }); }} > @@ -92,4 +89,45 @@ export const FilelistView = ({ files, viewFile }) => { ))}
); -}; \ No newline at end of file +}; +export const FileView = ({ file, viewFile }) => { + if (!file) { + return ( +
+

No file uploaded

+
+ ); + } + + return ( +
+
+ {/* File icon and info */} +
+ + +
{ + e.preventDefault(); + viewFile({ + IsOpen: true, + Image: file.preSignedUrl, + }); + }} + > + + {file.fileName} + + + + {" "} + {file.fileSize ? formatFileSize(file.fileSize) : ""} + + +
+
+
+
+ ); +}; diff --git a/src/components/Expenses/ManageExpense.jsx b/src/components/Expenses/ManageExpense.jsx index 40b4bebf..598b1bf8 100644 --- a/src/components/Expenses/ManageExpense.jsx +++ b/src/components/Expenses/ManageExpense.jsx @@ -236,31 +236,8 @@ const ManageExpense = ({ closeModal, expenseToEdit = null }) => { {expenseToEdit ? "Update Expense " : "Create New Expense"}
-
- {/*
- - - {errors.projectId && ( - {errors.projectId.message} - )} -
*/} -
+
+
{ Expense Category @@ -337,34 +314,23 @@ const ManageExpense = ({ closeModal, expenseToEdit = null }) => { )}
-
- {/* */} - {/* */} - +
( )} />
-
+
-
+
-
+
-
+
@@ -517,14 +484,14 @@ const ManageExpense = ({ closeModal, expenseToEdit = null }) => { )}
-
+
@@ -536,7 +503,7 @@ const ManageExpense = ({ closeModal, expenseToEdit = null }) => {
-
+