# 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` / `hasPendingUplift` on `WorkOrderTableRow`, mapped from the board API when present. - Introduces `getClosabilityGaps`, `formatClosabilityMissingTitle`, and `canGenerateCompDoc` in `wo-closability.ts` (pending-uplift scope only on this base). - Wires the board **Status** popover to disable **Completed** with tooltip `Missing: Pending uplift approval` when 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. - [ ] `canGenerateCompDoc` returns `{ allowed: false, reason: "Missing: Pending uplift approval" }` when pending uplift is present. - [ ] Board API payload with `upliftSummary.pendingCount > 0` maps 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.