From eab23389ed4dbdf87a7abcb96b98591aaf5f9c8c Mon Sep 17 00:00:00 2001 From: Kartik Sharma Date: Mon, 13 Oct 2025 12:51:42 +0530 Subject: [PATCH 1/8] Correction in Projects Completion Status in this weidget data cannot be shown. --- src/components/Charts/HorizontalBarChart.jsx | 2 +- src/components/Dashboard/ProjectCompletionChart.jsx | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/Charts/HorizontalBarChart.jsx b/src/components/Charts/HorizontalBarChart.jsx index 82608da6..5a02c98f 100644 --- a/src/components/Charts/HorizontalBarChart.jsx +++ b/src/components/Charts/HorizontalBarChart.jsx @@ -23,7 +23,7 @@ const HorizontalBarChart = ({ if (loading) { return (
- Loading chart... + Loading chart... {/* Replace this with a skeleton or spinner if you prefer */}
); diff --git a/src/components/Dashboard/ProjectCompletionChart.jsx b/src/components/Dashboard/ProjectCompletionChart.jsx index 8ce4b13a..decf7918 100644 --- a/src/components/Dashboard/ProjectCompletionChart.jsx +++ b/src/components/Dashboard/ProjectCompletionChart.jsx @@ -3,7 +3,8 @@ import HorizontalBarChart from "../Charts/HorizontalBarChart"; import { useProjects } from "../../hooks/useProjects"; const ProjectCompletionChart = () => { - const { projects, loading } = useProjects(); + const { data: projects = [], isLoading: loading, isError, error } = useProjects(); + // Bar chart logic const projectNames = projects?.map((p) => p.name) || []; @@ -11,7 +12,7 @@ const ProjectCompletionChart = () => { projects?.map((p) => { const completed = p.completedWork || 0; const planned = p.plannedWork || 1; - const percent = (completed / planned) * 100; + const percent = planned ? (completed / planned) * 100 : 0; return Math.min(Math.round(percent), 100); }) || []; From 6649cab6a2ccfc7d4eb9e164351f5e7af461be26 Mon Sep 17 00:00:00 2001 From: Kartik Sharma Date: Mon, 13 Oct 2025 14:16:11 +0530 Subject: [PATCH 2/8] Added cursor-not-allowed when user can delete the organization. --- public/assets/css/core-extend.css | 4 ++++ src/components/Organization/OrganizationsList.jsx | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/public/assets/css/core-extend.css b/public/assets/css/core-extend.css index 2e9e51ef..8ec6df19 100644 --- a/public/assets/css/core-extend.css +++ b/public/assets/css/core-extend.css @@ -280,3 +280,7 @@ .w-8-xl{ width: 2rem; } .w-10-xl{ width: 2.5rem; } } + +.cursor-not-allowed{ + cursor: not-allowed; +} diff --git a/src/components/Organization/OrganizationsList.jsx b/src/components/Organization/OrganizationsList.jsx index dc2e977e..41da2edf 100644 --- a/src/components/Organization/OrganizationsList.jsx +++ b/src/components/Organization/OrganizationsList.jsx @@ -131,7 +131,7 @@ const OrganizationsList = ({searchText}) => {
onOpen({startStep:5,orgData:org.id,flowType:"view"})}> onOpen({startStep:4,orgData:org,flowType:"edit"})}> - +
From d75296ffe80ff6c3f51f19d25b4f2402aec0d814 Mon Sep 17 00:00:00 2001 From: Kartik Sharma Date: Mon, 13 Oct 2025 14:51:47 +0530 Subject: [PATCH 3/8] Filter Sidebar Should Auto-Close When Navigating to Another Page --- .../Documents/DocumentFilterPanel.jsx | 23 +++++++++++++------ src/pages/Directory/ContactFilterPanel.jsx | 19 ++++++++++++--- src/pages/Directory/NoteFilterPanel.jsx | 11 +++++++-- 3 files changed, 41 insertions(+), 12 deletions(-) diff --git a/src/components/Documents/DocumentFilterPanel.jsx b/src/components/Documents/DocumentFilterPanel.jsx index 15a2cbf1..581277e8 100644 --- a/src/components/Documents/DocumentFilterPanel.jsx +++ b/src/components/Documents/DocumentFilterPanel.jsx @@ -1,4 +1,4 @@ -import React, { useState } from "react"; +import React, { useEffect, useState } from "react"; import { useDocumentFilterEntities } from "../../hooks/useDocument"; import { FormProvider, useForm } from "react-hook-form"; import { zodResolver } from "@hookform/resolvers/zod"; @@ -9,9 +9,11 @@ import { import { DateRangePicker1 } from "../common/DateRangePicker"; import SelectMultiple from "../common/SelectMultiple"; import moment from "moment"; +import { useLocation } from "react-router-dom"; const DocumentFilterPanel = ({ entityTypeId, onApply }) => { const [resetKey, setResetKey] = useState(0); + const location = useLocation(); const { data, isError, isLoading, error } = useDocumentFilterEntities(entityTypeId); @@ -52,6 +54,13 @@ const DocumentFilterPanel = ({ entityTypeId, onApply }) => { closePanel(); }; + // Close popup when navigating to another component + useEffect(() => { + return () => { + closePanel(); + }; + }, []); + if (isLoading) return
Loading...
; if (isError) return
Error: {error?.message || "Something went wrong!"}
; @@ -63,6 +72,8 @@ const DocumentFilterPanel = ({ entityTypeId, onApply }) => { documentTag = [], } = data?.data || {}; + + return (
@@ -73,18 +84,16 @@ const DocumentFilterPanel = ({ entityTypeId, onApply }) => {
{data?.isActive ? "Active" : "In-Active"}{" "} @@ -105,9 +104,101 @@ const VieworgDataanization = ({ orgId }) => {
{data?.address}
-
- {" "} - Projects And Services +
+ + + {/* remove "show" from className */} +
+ {data?.projects && data.projects.length > 0 ? ( + data.projects + .reduce((acc, curr) => { + const projectId = curr.project.id; + if (!acc.find((p) => p.id === projectId)) { + acc.push(curr.project); + } + return acc; + }, []) + .map((project) => ( +
+ + +
+ {data.projects + .filter((p) => p.project.id === project.id) + .map((p) => ( +
+ + {p.service.name} +
+ ))} +
+
+ )) + ) : ( +
No projects available
+ )} +
+
+ + {/* Services Section */} +
+ + + {/* collapse is closed initially */} +
+ {data?.services && data.services.length > 0 ? ( +
+ {data.services.map((service) => ( +
+
+
+
+ + {service.name} +
+

+ {service.description || "No description available."} +

+
+
+
+ ))} +
+ ) : ( +
No services available
+ )} +
); From 80a974e3be8fc4e34ca2984c8623c436bc4203e1 Mon Sep 17 00:00:00 2001 From: Kartik Sharma Date: Mon, 13 Oct 2025 11:17:09 +0530 Subject: [PATCH 5/8] =?UTF-8?q?=E2=80=9CNA=E2=80=9D=20Should=20Be=20Displa?= =?UTF-8?q?yed=20When=20Employee=20Has=20No=20Email=20Instead=20of=20?= =?UTF-8?q?=E2=80=9C=E2=80=93=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Documents/Documents.jsx | 2 +- src/components/Employee/EmpAttendance.jsx | 1 - src/pages/employee/EmployeeList.jsx | 50 +++++++++++------------ 3 files changed, 26 insertions(+), 27 deletions(-) diff --git a/src/components/Documents/Documents.jsx b/src/components/Documents/Documents.jsx index 8210bf58..f3649664 100644 --- a/src/components/Documents/Documents.jsx +++ b/src/components/Documents/Documents.jsx @@ -149,7 +149,7 @@ const Documents = ({ Document_Entity, Entity }) => { -
+
{(isSelf || canUploadDocument) && (
- + {item.email ? ( {item.email} ) : ( - - - - + NA )} + @@ -567,9 +562,14 @@ const EmployeeList = () => { - - {moment(item.joiningDate)?.format("DD-MMM-YYYY")} + + {item.joiningDate ? ( + moment(item.joiningDate).format("DD-MMM-YYYY") + ) : ( + NA + )} + {showInactive ? ( Date: Mon, 13 Oct 2025 10:45:58 +0530 Subject: [PATCH 6/8] Incorrect Toggle Switch Text for Active/Inactive Employee in Project Teams --- src/components/Activities/Attendance.jsx | 2 +- src/components/Activities/AttendcesLogs.jsx | 2 +- src/components/Documents/Documents.jsx | 2 +- src/components/Project/Team/Teams.jsx | 2 +- src/pages/Directory/DirectoryPage.jsx | 153 +++++++++----------- src/pages/employee/EmployeeList.jsx | 2 +- 6 files changed, 70 insertions(+), 93 deletions(-) diff --git a/src/components/Activities/Attendance.jsx b/src/components/Activities/Attendance.jsx index 9a082976..c46feac3 100644 --- a/src/components/Activities/Attendance.jsx +++ b/src/components/Activities/Attendance.jsx @@ -126,7 +126,7 @@ const Attendance = ({ getRole, handleModalData, searchTerm, projectId, organizat checked={ShowPending} onChange={(e) => setShowPending(e.target.checked)} /> - +
{attLoading ? ( diff --git a/src/components/Activities/AttendcesLogs.jsx b/src/components/Activities/AttendcesLogs.jsx index 8f8a55ac..0a917968 100644 --- a/src/components/Activities/AttendcesLogs.jsx +++ b/src/components/Activities/AttendcesLogs.jsx @@ -190,7 +190,7 @@ useEffect(() => { checked={showPending} onChange={(e) => setShowPending(e.target.checked)} /> - + diff --git a/src/components/Documents/Documents.jsx b/src/components/Documents/Documents.jsx index f3649664..d724c98a 100644 --- a/src/components/Documents/Documents.jsx +++ b/src/components/Documents/Documents.jsx @@ -144,7 +144,7 @@ const Documents = ({ Document_Entity, Entity }) => { - {isActive ? "Active" : "In-Active"} + {isActive ? "Active Document" : "In-Active Document"} diff --git a/src/components/Project/Team/Teams.jsx b/src/components/Project/Team/Teams.jsx index f6bdc526..31d27efa 100644 --- a/src/components/Project/Team/Teams.jsx +++ b/src/components/Project/Team/Teams.jsx @@ -201,7 +201,7 @@ const Teams = () => { className="form-check-label ms-2" htmlFor="activeEmployeeSwitch" > - {activeEmployee ? "Active Employees" : "Include Inactive Employees"} + {activeEmployee ? "Active Employees" : "In-active Employees"} diff --git a/src/pages/Directory/DirectoryPage.jsx b/src/pages/Directory/DirectoryPage.jsx index a2a3e1a5..e0871446 100644 --- a/src/pages/Directory/DirectoryPage.jsx +++ b/src/pages/Directory/DirectoryPage.jsx @@ -139,9 +139,8 @@ export default function DirectoryPage({ IsPage = true, projectId = null }) { + - - diff --git a/src/pages/employee/EmployeeList.jsx b/src/pages/employee/EmployeeList.jsx index 9b1d1afa..2018afb2 100644 --- a/src/pages/employee/EmployeeList.jsx +++ b/src/pages/employee/EmployeeList.jsx @@ -306,7 +306,7 @@ const EmployeeList = () => { className="form-check-label ms-0" htmlFor="inactiveEmployeesCheckbox" > - Show Inactive Employees + In-active Employees From 95921084721c5f0e19923c60349425e522e3a02d Mon Sep 17 00:00:00 2001 From: Kartik Sharma Date: Mon, 13 Oct 2025 16:35:28 +0530 Subject: [PATCH 7/8] Removing extra margin-top on Project-details. --- src/pages/project/ProjectDetails.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/project/ProjectDetails.jsx b/src/pages/project/ProjectDetails.jsx index 8d2f8277..d6fbd55d 100644 --- a/src/pages/project/ProjectDetails.jsx +++ b/src/pages/project/ProjectDetails.jsx @@ -77,7 +77,7 @@ const ProjectDetails = () => { -
+
From b80af5467cc4150849b06e73108c3f099304a8e3 Mon Sep 17 00:00:00 2001 From: Kartik Sharma Date: Tue, 14 Oct 2025 15:07:07 +0530 Subject: [PATCH 8/8] Changes in Infrastructure. --- src/components/Project/Infrastructure/WorkArea.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Project/Infrastructure/WorkArea.jsx b/src/components/Project/Infrastructure/WorkArea.jsx index 59f281be..c5925321 100644 --- a/src/components/Project/Infrastructure/WorkArea.jsx +++ b/src/components/Project/Infrastructure/WorkArea.jsx @@ -104,7 +104,7 @@ const WorkArea = ({ workArea, floor, forBuilding }) => {
-
+