diff --git a/src/components/Project/Infrastructure/WorkItem.jsx b/src/components/Project/Infrastructure/WorkItem.jsx index 7a7dfb38..0b050068 100644 --- a/src/components/Project/Infrastructure/WorkItem.jsx +++ b/src/components/Project/Infrastructure/WorkItem.jsx @@ -119,6 +119,9 @@ const WorkItem = ({ workItem, forBuilding, forFloor, forWorkArea }) => { showToast(message, "error"); } }; + + const PlannedWork = NewWorkItem?.workItem?.plannedWork || workItem?.plannedWork; + const CompletedWork = NewWorkItem?.workItem?.completedWork ?? workItem?.completedWork; return ( <> {isModalOpen && ( @@ -233,56 +236,65 @@ const WorkItem = ({ workItem, forBuilding, forFloor, forWorkArea }) => { > - -
- {!projectId && ManageTasks && ( - - )} - {ManageInfra && ( - <> - - - - )} -
- + +
+ {/* Reserve space for Assign button */} +
+ {(!projectId && ManageTasks) && (PlannedWork !== CompletedWork) ? ( + + ) : ( + // Hidden placeholder to preserve layout + + Assign + + )} +
+ + {/* Edit and Delete buttons */} + {ManageInfra && ( + <> + + + + )} +
+ + + + );