From dc4e48ad3bc6e5c32b041e60c1ed9838215db1c1 Mon Sep 17 00:00:00 2001 From: Kartik Sharma Date: Tue, 14 Oct 2025 14:51:57 +0530 Subject: [PATCH] Changes in Employee list at pagination and at mobile view then scrollbar is shown. --- .../DailyProgressRport/TaskReportList.jsx | 203 +++++++++--------- src/components/Directory/ListViewContact.jsx | 13 +- src/components/Expenses/ExpenseList.jsx | 34 ++- src/pages/employee/EmployeeList.jsx | 9 +- 4 files changed, 129 insertions(+), 130 deletions(-) diff --git a/src/components/DailyProgressRport/TaskReportList.jsx b/src/components/DailyProgressRport/TaskReportList.jsx index 78af8df3..c47f46c4 100644 --- a/src/components/DailyProgressRport/TaskReportList.jsx +++ b/src/components/DailyProgressRport/TaskReportList.jsx @@ -29,7 +29,7 @@ const TaskReportList = () => { const ApprovedTaskRights = useHasUserPermission(APPROVE_TASK); const ReportTaskRights = useHasUserPermission(ASSIGN_REPORT_TASK); - const { service, openModal, closeModal,filter } = useDailyProgrssContext(); + const { service, openModal, closeModal, filter } = useDailyProgrssContext(); const selectedProject = useSelectedProject(); const { projectNames } = useProjectName(); @@ -37,7 +37,7 @@ const TaskReportList = () => { selectedProject, ITEMS_PER_PAGE, currentPage, - service,filter + service, filter ); const ProgrssReportColumn = [ @@ -192,109 +192,114 @@ const TaskReportList = () => { if (isLoading) return ; if (isError) return
Loading....
; return ( -
- - - - - - - - - - - - - {groupedTasks.length === 0 && ( +
+
+
Activity - - Total Pending{" "} - 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.

} - > - -
-
-
Assign DateTeamActions
+ - + + + + + + - )} - - {groupedTasks.map(({ date, tasks }) => ( - - - + + {groupedTasks.length === 0 && ( + + - {tasks.map((task, idx) => ( - - - - - - - + - ))} - - ))} - -
- No reports available - Activity + + Total Pending{" "} + 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.

} + > + +
+
+
Assign DateTeamActions
- {formatUTCToLocalTime(date)} +
+ No reports available
-
- {task.workItem.activityMaster?.activityName || "No Activity Name"} -
-
- {task.workItem.workArea?.floor?.building?.name} ›{" "} - {task.workItem.workArea?.floor?.floorName} ›{" "} - {task.workItem.workArea?.areaName} -
-
- {formatNumber(task.workItem.plannedWork)} - {`${formatNumber(task.completedTask)} / ${formatNumber(task.plannedTask)}`}{formatUTCToLocalTime(task.assignmentDate)}{renderTeamMembers(task, idx)} -
- {ReportTaskRights && !task.reportedDate && ( - - )} - {ApprovedTaskRights && task.reportedDate && !task.approvedBy && ( - - )} - -
+ )} + + {groupedTasks.map(({ date, tasks }) => ( + +
+ {formatUTCToLocalTime(date)}
- {data?.data?.length > 0 && ( - - )} -
+ {tasks.map((task, idx) => ( + + +
+ {task.workItem.activityMaster?.activityName || "No Activity Name"} +
+
+ {task.workItem.workArea?.floor?.building?.name} ›{" "} + {task.workItem.workArea?.floor?.floorName} ›{" "} + {task.workItem.workArea?.areaName} +
+ + + {formatNumber(task.workItem.plannedWork)} + + {`${formatNumber(task.completedTask)} / ${formatNumber(task.plannedTask)}`} + {formatUTCToLocalTime(task.assignmentDate)} + {renderTeamMembers(task, idx)} + +
+ {ReportTaskRights && !task.reportedDate && ( + + )} + {ApprovedTaskRights && task.reportedDate && !task.approvedBy && ( + + )} + +
+ + + ))} + + ))} + + + + + { + data?.data?.length > 0 && ( + + ) + } + ); }; diff --git a/src/components/Directory/ListViewContact.jsx b/src/components/Directory/ListViewContact.jsx index 16fd9a14..f4f15531 100644 --- a/src/components/Directory/ListViewContact.jsx +++ b/src/components/Directory/ListViewContact.jsx @@ -160,8 +160,7 @@ const ListViewContact = ({ data, Pagination }) => { ) : ( { )} - {Pagination && ( -
- {Pagination} -
- )} + {Pagination && ( +
+ {Pagination} +
+ )} ); diff --git a/src/components/Expenses/ExpenseList.jsx b/src/components/Expenses/ExpenseList.jsx index c18d2650..d51063d7 100644 --- a/src/components/Expenses/ExpenseList.jsx +++ b/src/components/Expenses/ExpenseList.jsx @@ -67,9 +67,8 @@ const ExpenseList = ({ filters, groupBy = "transactionDate", searchText }) => { key = item.status?.displayName || "Unknown"; break; case "submittedBy": - key = `${item.createdBy?.firstName ?? ""} ${ - item.createdBy?.lastName ?? "" - }`.trim(); + key = `${item.createdBy?.firstName ?? ""} ${item.createdBy?.lastName ?? "" + }`.trim(); break; case "project": key = item.project?.name || "Unknown Project"; @@ -110,9 +109,8 @@ const ExpenseList = ({ filters, groupBy = "transactionDate", searchText }) => { label: "Submitted By", align: "text-start", getValue: (e) => - `${e.createdBy?.firstName ?? ""} ${ - e.createdBy?.lastName ?? "" - }`.trim() || "N/A", + `${e.createdBy?.firstName ?? ""} ${e.createdBy?.lastName ?? "" + }`.trim() || "N/A", customRender: (e) => (
{ lastName={e.createdBy?.lastName} /> - {`${e.createdBy?.firstName ?? ""} ${ - e.createdBy?.lastName ?? "" - }`.trim() || "N/A"} + {`${e.createdBy?.firstName ?? ""} ${e.createdBy?.lastName ?? "" + }`.trim() || "N/A"}
), @@ -152,9 +149,8 @@ const ExpenseList = ({ filters, groupBy = "transactionDate", searchText }) => { align: "text-center", getValue: (e) => ( {e.status?.name || "Unknown"} @@ -299,15 +295,15 @@ const ExpenseList = ({ filters, groupBy = "transactionDate", searchText }) => { )} - {data?.data?.length > 0 && ( - - )} + {data?.data?.length > 0 && ( + + )} ); diff --git a/src/pages/employee/EmployeeList.jsx b/src/pages/employee/EmployeeList.jsx index 4d6d2f0c..10db6786 100644 --- a/src/pages/employee/EmployeeList.jsx +++ b/src/pages/employee/EmployeeList.jsx @@ -649,17 +649,16 @@ const EmployeeList = () => { ))} - - - {displayData?.length > 0 && ( + + + + {displayData?.length > 0 && ( )} - - ) : (