From 6e92915df51859859ca780199c7ef689f96cdc37 Mon Sep 17 00:00:00 2001 From: Hardik Date: Mon, 22 Jun 2026 21:15:49 +0530 Subject: [PATCH] =?UTF-8?q?docs(crewing):=20Phase=204b=20=E2=9C=85=20+=20R?= =?UTF-8?q?6=20clash=20reconciled=20to=20Option=20A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit §12 status note: mark 4b Leave & attendance done; record the Option A clash decision (per-vessel/per-rank VesselRankRequirement.minStrength, default 1) and the upcoming crewing-admin PR (requirement UI, Manager direct placement, admin crew CRUD, manage_crew permission). --- Crewing-Implementation-Spec.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Crewing-Implementation-Spec.md b/Crewing-Implementation-Spec.md index d2b75cb..e11a9d4 100644 --- a/Crewing-Implementation-Spec.md +++ b/Crewing-Implementation-Spec.md @@ -416,13 +416,21 @@ with these reconciliations: > login creation for management ranks (`grantsLogin`) is a deferred follow-up**. > > **Phase 4** is in progress as stacked sub-PRs: **4a Crew records & profile + PPE -> (Epics E, F) ✅**, **4b Leave & attendance (Epic G) — pending**, **4c Sign-off & +> (Epics E, F) ✅**, **4b Leave & attendance (Epic G) ✅**, **4c Sign-off & > experience (Epic K) — pending**. 4a applies role-based PII masking server-side > (bank/Aadhaar full only for Accounts; salary hidden from site staff, §6/§8.8). > Deferrals carried in 4a: site-staff own-site scoping (needs a User↔Site link), > the records **verify queue** (§8.11 → Phase 5), and the Pay-status tab beyond the -> salary structure (→ payroll, Phase 6). The leave-clash auto-backfill in 4b will -> reuse the Phase-2 `autoRaiseRequisition` helper. +> salary structure (→ payroll, Phase 6). +> +> **R6 clash detection — reconciled to Option A (director decision):** a +> `VesselRankRequirement{vesselId, rankId, minStrength}` configures required crew +> strength per rank per vessel; approving a leave that drops active same-rank cover +> over the window **below `minStrength`** (default 1 when unconfigured) auto-raises +> a `LEAVE` requisition (reuses the Phase-2 `autoRaiseRequisition`). A follow-up +> **crewing-admin** PR adds the office UI to manage requirements, **Manager direct +> crew placement** (assign crew to a vessel/site without a requisition), and +> **Admin crew CRUD**, behind a new `manage_crew` permission. 1. **Foundations** — `SITE_STAFF` role; crewing schema + enums; permissions; `CREWING_ENABLED` flag; nav scaffold; reference data (Ranks, RankDocRequirements). 2. **Requisitions + relief** (Epic A) — requisition lifecycle, relief requests, and the shared `autoRaiseRequisition` backfill helper. *(Epic K sign-off/experience originally sat here; moved to Phase 4 — see status note above, as it depends on the onboarding/assignment schema.)*