mirror of
https://github.com/Sea-Haven-Industries/shoc-frontend-new.git
synced 2026-10-05 20:02:05 +00:00
1.5 KiB
1.5 KiB
PR4 — Pending uplift close gate
Summary
Blocks marking a work order Completed (and future completion-document generation) while an uplift request is still pending approval.
- Adds optional
upliftSummary/hasPendingUpliftonWorkOrderTableRow, mapped from the board API when present. - Introduces
getClosabilityGaps,formatClosabilityMissingTitle, andcanGenerateCompDocinwo-closability.ts(pending-uplift scope only on this base). - Wires the board Status popover to disable Completed with tooltip
Missing: Pending uplift approvalwhen a gap exists.
Comp Doc Generate
CompDocDialog is not mounted on dev yet. This PR exports canGenerateCompDoc(row) so the completion-doc slice can block generate/open with the same reason string. No UI wiring in this PR.
Out of scope
- Full uplift CRUD (PR3)
- Advanced filter facets for uplift
- Full closability matrix (dispatcher, comp doc, photos, etc.) — separate gate work
Test plan
- Row with
hasPendingUplift: true— Status menu shows Completed disabled; tooltip explains missing pending uplift approval. - Row without pending uplift — Completed remains selectable.
canGenerateCompDocreturns{ allowed: false, reason: "Missing: Pending uplift approval" }when pending uplift is present.- Board API payload with
upliftSummary.pendingCount > 0maps through to closability gate.
Base
Branch feature/wo-uplift-pending-close-gate from local dev. Does not depend on PR3 branch git-wise; uplift fields are optional stubs until BE/PR3 land.