tango-app-ui-store-builder 1.0.99 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -28078,13 +28078,21 @@ class PlanoVerificationTableComponent {
28078
28078
  }
28079
28079
  // [ZONE-VERIFICATION] additive sibling helpers — do not touch getTaskStatus/getTaskTooltip
28080
28080
  getZoneStatus(data) {
28081
- const zoneTaskStatus = data?.zoneTask?.[0]?.taskStatus?.find((ele) => ele.type === "zoneVerification");
28081
+ const zoneTaskList = data?.zoneTask?.[0]?.taskStatus ?? [];
28082
+ const zoneTaskStatus = zoneTaskList.find((ele) => ele.type === "zoneVerification");
28082
28083
  const zoneStatus = data?.zoneDetails?.zoneStatus;
28083
28084
  if (!zoneTaskStatus)
28084
28085
  return "yetToAssign";
28085
28086
  if (zoneTaskStatus.status !== "submit") {
28086
28087
  return zoneTaskStatus.breach ? "flag" : "taskAssigned";
28087
28088
  }
28089
+ // Trust the rollup: if every floor's zone task has approvalStatus === true
28090
+ // (set by updateZoneVerificationStatus when all non-CL siblings are actioned),
28091
+ // the plano is fully approved — even if orphan compliance docs exist.
28092
+ const allApproved = zoneTaskList.length > 0 &&
28093
+ zoneTaskList.every((t) => t.approvalStatus === true);
28094
+ if (allApproved)
28095
+ return "completed";
28088
28096
  if (zoneStatus === "complete")
28089
28097
  return "completed";
28090
28098
  return "reviewPending";