pelagia-portal/App/app/(portal)/crewing/leave
Hardik 040a66488d
All checks were successful
PR checks / checks (pull_request) Successful in 38s
PR checks / integration (pull_request) Successful in 28s
feat(crewing): clash detection by required strength (Option A)
Replace the implicit "strength = 1" clash rule with a configurable per-vessel,
per-rank requirement (director decision). Adds VesselRankRequirement
{vesselId, rankId, minStrength} (migration crewing_vessel_rank_requirement) and
reworks lib/leave-clash.ts → leaveCausesClash: a leave approval clashes when the
remaining active same-rank cover over the window would fall below minStrength
(default 1 when unconfigured), auto-raising a LEAVE requisition. The requirement
is managed by the office (manage_crew, admin UI in the follow-up).

- Integration: leave-attendance.test.ts gains a configured-strength case
  (minStrength 2, one remaining → clash). Full unit (240) + integration (183) green.
- CLAUDE.md updated.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-22 21:14:21 +05:30
..
actions.ts feat(crewing): clash detection by required strength (Option A) 2026-06-22 21:14:21 +05:30
leave-manager.tsx feat(crewing): Phase 4b — leave & attendance (flagged) 2026-06-22 21:07:15 +05:30
page.tsx feat(crewing): Phase 4b — leave & attendance (flagged) 2026-06-22 21:07:15 +05:30