From dcb2f59f5b52fdcf6900a99c904adfb2ce8183f4 Mon Sep 17 00:00:00 2001 From: Kartik Sharma Date: Fri, 5 Sep 2025 12:26:57 +0530 Subject: [PATCH 1/7] Filter icon should not be displayed when no records are found in Daily Progress Report --- src/components/common/FilterIcon.jsx | 7 ++++++- src/pages/Activities/DailyTask.jsx | 15 ++++++++++++--- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/components/common/FilterIcon.jsx b/src/components/common/FilterIcon.jsx index 922af101..b2322de1 100644 --- a/src/components/common/FilterIcon.jsx +++ b/src/components/common/FilterIcon.jsx @@ -30,7 +30,7 @@ const FilterIcon = ({ }, [currentSelectedBuilding, currentSelectedFloors, currentSelectedActivities, selectedProject]); const getUniqueFilterValues = (key, overrideBuilding, overrideFloors) => { - if (!taskListData) return []; + if (!taskListData || taskListData.length === 0) return []; let filteredTasks = [...taskListData]; @@ -125,6 +125,11 @@ const FilterIcon = ({ const appliedFilterCount = (appliedBuilding ? 1 : 0) + appliedFloors.length + appliedActivities.length; + // ✅ Hide filter if no task data + if (!taskListData || taskListData.length === 0) { + return null; + } + return (
{ {/* --- Filters --- */}
- */} +
@@ -194,7 +203,7 @@ const DailyTask = () => { {taskLoading && ( - + )} @@ -211,7 +220,7 @@ const DailyTask = () => { {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} From c568dc9108f73c3d7e7f860474c93abb28e9cb3b Mon Sep 17 00:00:00 2001 From: Kartik Sharma Date: Fri, 5 Sep 2025 12:33:43 +0530 Subject: [PATCH 2/7] Date Picker in Employee Attendance & Activity Tab Should Default to Last 7 Days --- src/components/Employee/EmpActivities.jsx | 2 +- src/components/Employee/EmpAttendance.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Employee/EmpActivities.jsx b/src/components/Employee/EmpActivities.jsx index f5d9e8c2..e79b181d 100644 --- a/src/components/Employee/EmpActivities.jsx +++ b/src/components/Employee/EmpActivities.jsx @@ -25,7 +25,7 @@ error,
diff --git a/src/components/Employee/EmpAttendance.jsx b/src/components/Employee/EmpAttendance.jsx index 26ae9531..dfa12e98 100644 --- a/src/components/Employee/EmpAttendance.jsx +++ b/src/components/Employee/EmpAttendance.jsx @@ -128,7 +128,7 @@ const EmpAttendance = ({ employee }) => { >
From 6998714fea3d13a688730891481abe67f3beb6da Mon Sep 17 00:00:00 2001 From: Kartik Sharma Date: Tue, 9 Sep 2025 12:51:19 +0530 Subject: [PATCH 3/7] Contact Number Field Accepts More Than 10 Digits in Create/Update Contact --- src/components/Directory/ManageDirectory.jsx | 38 ++++++-------------- src/components/Directory/UpdateContact.jsx | 9 ++++- 2 files changed, 19 insertions(+), 28 deletions(-) diff --git a/src/components/Directory/ManageDirectory.jsx b/src/components/Directory/ManageDirectory.jsx index 5c858815..6b7cf8ff 100644 --- a/src/components/Directory/ManageDirectory.jsx +++ b/src/components/Directory/ManageDirectory.jsx @@ -40,7 +40,7 @@ const ManageDirectory = ({ submitContact, onCLosed }) => { const { designationList, loading: designloading } = useDesignation(); const { contactTags, loading: Tagloading } = useContactTags(); const [IsSubmitting, setSubmitting] = useState(false); - const [showSuggestions,setShowSuggestions] = useState(false); + const [showSuggestions, setShowSuggestions] = useState(false); const [filteredDesignationList, setFilteredDesignationList] = useState([]); const dispatch = useDispatch(); @@ -132,6 +132,12 @@ const ManageDirectory = ({ submitContact, onCLosed }) => { setValue("designation", val); }; + // Handle phone number input to only allow numbers and max length of 10 + const handlePhoneInput = (e) => { + const value = e.target.value.replace(/[^0-9]/g, ""); + e.target.value = value.slice(0, 10); + }; + const toggleBucketId = (id) => { const updated = watchBucketIds?.includes(id) @@ -277,23 +283,11 @@ const ManageDirectory = ({ submitContact, onCLosed }) => { placeholder="email@example.com" /> {index === emailFields.length - 1 ? ( - //
{/* Address */} -
- +
+ - Address + Address + : - + {profile?.currentAddress || NA}
From 20077a137fd911ec454aaf016f3c98301c9714fa Mon Sep 17 00:00:00 2001 From: Kartik Sharma Date: Tue, 9 Sep 2025 15:33:43 +0530 Subject: [PATCH 5/7] Master Page - Grid alignment --- src/pages/master/MasterPage.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/master/MasterPage.jsx b/src/pages/master/MasterPage.jsx index 564fc036..f0f61f6b 100644 --- a/src/pages/master/MasterPage.jsx +++ b/src/pages/master/MasterPage.jsx @@ -123,7 +123,7 @@ const MasterPage = () => { name="DataTables_Table_0_length" aria-controls="DataTables_Table_0" className="form-select py-1 px-2" - style={{ fontSize: "0.875rem", height: "32px", width: "150px" }} + style={{ fontSize: "0.875rem", height: "32px", width: "190px" }} value={selectedMaster} > {isLoading && } From 614d61e6e929201bd47fa82bd548794898863e13 Mon Sep 17 00:00:00 2001 From: Kartik Sharma Date: Tue, 9 Sep 2025 15:10:10 +0530 Subject: [PATCH 6/7] Invalid Date Displayed Instead of "NA" in Employee List --- src/pages/employee/EmployeeList.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pages/employee/EmployeeList.jsx b/src/pages/employee/EmployeeList.jsx index 5cd7ab2d..07105180 100644 --- a/src/pages/employee/EmployeeList.jsx +++ b/src/pages/employee/EmployeeList.jsx @@ -606,9 +606,10 @@ const EmployeeList = () => { {item.jobRole || "Not Assign Yet"}
- - {moment(item.joiningDate)?.format("DD-MMM-YYYY")} + {item.joiningDate + ? moment(item.joiningDate).format("DD-MMM-YYYY") + : "NA"} {showInactive ? ( From c9ccd463856a675b1671abe9c91025c14675f34e Mon Sep 17 00:00:00 2001 From: Kartik Sharma Date: Tue, 9 Sep 2025 13:14:00 +0530 Subject: [PATCH 7/7] Meaningful Message Required When No Reports Found in Selected Date Range --- src/pages/Activities/DailyTask.jsx | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/src/pages/Activities/DailyTask.jsx b/src/pages/Activities/DailyTask.jsx index 60b5ed6a..0edddf62 100644 --- a/src/pages/Activities/DailyTask.jsx +++ b/src/pages/Activities/DailyTask.jsx @@ -55,7 +55,7 @@ const DailyTask = () => { }); }, [selectedProject]); - // Memoized filtering + //  Memoized filtering const filteredTasks = useMemo(() => { if (!TaskList) return []; return TaskList.filter((task) => { @@ -69,7 +69,7 @@ const DailyTask = () => { }); }, [TaskList, filters]); - // Memoized dates + //  Memoized dates const groupedTasks = useMemo(() => { const groups = {}; filteredTasks.forEach((task) => { @@ -101,8 +101,8 @@ const DailyTask = () => { data-bs-content={`
${task.teamMembers - .map( - (m) => ` + .map( + (m) => `
@@ -111,8 +111,8 @@ const DailyTask = () => {
${m.firstName} ${m.lastName}
` - ) - .join("")} + ) + .join("")}
`} > @@ -182,7 +182,7 @@ const DailyTask = () => { currentSelectedFloors={filters.selectedFloors} currentSelectedActivities={filters.selectedActivities} selectedProject={selectedProject} - disabled={!TaskList || TaskList.length === 0} // 🔹 Disable when no data + disabled={!TaskList || TaskList.length === 0} />
@@ -200,19 +200,17 @@ const DailyTask = () => { - {taskLoading && ( + {taskLoading ? ( - )} - {!taskLoading && groupedTasks.length === 0 && ( + ) : filteredTasks.length === 0 ? ( - No Reports Found + No reports available for the selected date range. - )} - {!taskLoading && + ) : ( groupedTasks.map(({ date, tasks }) => ( @@ -244,7 +242,8 @@ const DailyTask = () => { ))} - ))} + )) + )}
@@ -254,4 +253,4 @@ const DailyTask = () => { ); }; -export default DailyTask; +export default DailyTask; \ No newline at end of file