diff --git a/src/components/Project/Infrastructure/Floor.jsx b/src/components/Project/Infrastructure/Floor.jsx index fe015b16..dfd0bc35 100644 --- a/src/components/Project/Infrastructure/Floor.jsx +++ b/src/components/Project/Infrastructure/Floor.jsx @@ -15,8 +15,15 @@ const Floor = ({ floor, workAreas, forBuilding }) => { ) : ( -
-
+
+ {/*
+ + +
*/} +
{" "} diff --git a/src/components/Project/Infrastructure/WorkArea.jsx b/src/components/Project/Infrastructure/WorkArea.jsx index 9e796dd6..c31c7dab 100644 --- a/src/components/Project/Infrastructure/WorkArea.jsx +++ b/src/components/Project/Infrastructure/WorkArea.jsx @@ -10,8 +10,11 @@ import showToast from "../../../services/toastService"; const WorkArea = ({ workArea, floor, forBuilding }) => { const [ workItems, setWorkItems ] = useState( [] ); const dispatch = useDispatch() - const [Project,setProject] = useState() + const [ Project, setProject ] = useState() + + const [isExpanded, setIsExpanded] = useState(false); + const toggleExpand = () => setIsExpanded(!isExpanded); useEffect(() => { const project = getCachedData( "projectInfo" ); @@ -80,86 +83,73 @@ const WorkArea = ({ workArea, floor, forBuilding }) => { return ( - - -
-
-
-
- {" "} - - Floor:  - {" "} - - {floor.floorName} - -
-
- - Work Area:  - {" "} - - {workArea.areaName} - -
-
-
+ + +
+ + {/*
+ + +
*/} +
+ {workArea?.workItems?.length > 0 && ( + +)} + {/* Floor:  */} + 0 ? "ps-2" : "ps-7" }`}>Floor:  + {floor.floorName} + Work Area:  + {workArea.areaName}
- - + +
+ + + - {workItems && workItems.length > 0 && ( + {isExpanded && workArea?.workItems?.length > 0 && ( - - {/* for mobile view */} - - {/* for greather than mobile view ************* */} - - - {/* ************************** */} + + + + - - {workArea?.workItems && workArea.workItems.length > 0 ? ( - workArea.workItems.map((workItem) => ( - - )) - ) : ( - - - - )} + {workArea.workItems.map((workItem) => ( + + ))}
- Activity - - Status - - Planned - - Completed - ActivityStatusPlannedCompleted Progress - Actions + + Actions
- No Data -
)} - {!workItems &&

No item

} + + {isExpanded && (!workArea?.workItems || workArea?.workItems.length === 0) && ( + + No Data + + )} ); };