From afcd1934f906179c87bb337dba9ffd771de816bb Mon Sep 17 00:00:00 2001 From: Kartik Sharma Date: Sun, 21 Sep 2025 15:10:31 +0530 Subject: [PATCH] Integrate the API for Work Area and fetch data filtered by serviceId. --- .../Project/Infrastructure/Floor.jsx | 3 +- .../Project/Infrastructure/InfraTable.jsx | 5 +- .../Project/Infrastructure/WorkArea.jsx | 5 +- src/components/Project/ProjectInfra.jsx | 58 ++++++++----------- src/hooks/useProjects.js | 23 ++++---- src/repositories/ProjectRepository.jsx | 11 +++- 6 files changed, 50 insertions(+), 55 deletions(-) diff --git a/src/components/Project/Infrastructure/Floor.jsx b/src/components/Project/Infrastructure/Floor.jsx index 2ee5d84b..0f7f00f7 100644 --- a/src/components/Project/Infrastructure/Floor.jsx +++ b/src/components/Project/Infrastructure/Floor.jsx @@ -1,6 +1,6 @@ import React from "react"; import WorkArea from "./WorkArea"; -const Floor = ({ floor, workAreas, forBuilding }) => { +const Floor = ({ floor, workAreas, forBuilding,serviceId }) => { return ( {workAreas && workAreas.length > 0 ? ( @@ -10,6 +10,7 @@ const Floor = ({ floor, workAreas, forBuilding }) => { key={workArea.id} workArea={workArea} floor={floor} + serviceId={serviceId} /> )) ) : ( diff --git a/src/components/Project/Infrastructure/InfraTable.jsx b/src/components/Project/Infrastructure/InfraTable.jsx index 77c6f905..3805857f 100644 --- a/src/components/Project/Infrastructure/InfraTable.jsx +++ b/src/components/Project/Infrastructure/InfraTable.jsx @@ -11,7 +11,7 @@ import { getCachedData, } from "../../../slices/apiDataManager"; -const InfraTable = ({ buildings, projectId}) => { +const InfraTable = ({ buildings, projectId, serviceId }) => { const [projectBuilding, setProjectBuilding] = useState([]); const [expandedBuildings, setExpandedBuildings] = useState([]); const [showFloorModal, setShowFloorModal] = useState(false); @@ -90,6 +90,7 @@ const InfraTable = ({ buildings, projectId}) => { forBuilding={building} floor={floor} workAreas={floor.workAreas} + serviceId={serviceId} /> )) ) : ( @@ -100,7 +101,7 @@ const InfraTable = ({ buildings, projectId}) => { No floors have been added yet. Start by adding floors to manage this building.
Loading....
No Infra Avaiable