feat(crewing): Phase 3c — onboarding (flagged) #68

Merged
shad0w merged 2 commits from feat/crewing-onboarding into feat/crewing-pipeline 2026-06-22 18:50:10 +00:00
Owner

Crewing — Phase 3c (Onboarding)

Final slice of Phase 3 (3a candidates → 3b pipeline → 3c onboarding). Stacks on #67 (3b pipeline); base branch is feat/crewing-pipeline, so nothing reaches master yet. Behind NEXT_PUBLIC_CREWING_ENABLED.

What's in

  • Schema (crewing_onboarding migration): CrewAssignment + AssignmentStatus (ACTIVE/ON_LEAVE/SIGNED_OFF — leave/sign-off are Phase 4); ContractLetter (salaryRestricted); SalaryStructure += assignmentId; CrewActionType += CREW_ONBOARDED. Employee numbers CRW-xxxx via lib/employee-number.ts.
  • Action (onboardCandidate, onboard_crew): one transaction off a SELECTED application — assign employeeId, create CrewAssignment(ACTIVE, signOnDate), bind the approved SalaryStructure (assignmentId + effectiveFrom), Application → ONBOARDED, Requisition → FILLED, CrewMember → EMPLOYEE (+ currentRank); contract letter stored after. Guards flag + permission + SELECTED state.
  • Screen: the SELECTED action card's Onboard to crew modal (joining date, contract upload, starts-automatically chips); the assigned CRW- number shows on the ONBOARDED card.

Tests & docs

  • Integration: onboarding.test.ts (5) — full transaction, requisition FILLED + salary binding, joining-date + SELECTED-only guards, permission gating, sequential CRW- ids.
  • type-check clean; full unit (234) + integration (168) green.
  • CLAUDE.md updated; wiki §12 status note bumped (3c ).

Deferred

  • SITE_STAFF login creation for management ranks (grantsLogin) — a follow-up (per your call).
  • Attendance / experience / PPE records (the "starts automatically" chips) and the Crew directory (§8.7) — Phase 4 (Epic E/F/G).

This completes Phase 3. Next is Phase 4 (crew records, PPE, leave/attendance + the deferred sign-off/experience, Epic K).

🤖 Generated with Claude Code


Closes Epic D — Onboarding (#78).

## Crewing — Phase 3c (Onboarding) Final slice of **Phase 3** (3a candidates → 3b pipeline → **3c onboarding**). Stacks on **#67** (3b pipeline); base branch is `feat/crewing-pipeline`, so nothing reaches `master` yet. Behind `NEXT_PUBLIC_CREWING_ENABLED`. ### What's in - **Schema** (`crewing_onboarding` migration): `CrewAssignment` + `AssignmentStatus` (ACTIVE/ON_LEAVE/SIGNED_OFF — leave/sign-off are Phase 4); `ContractLetter` (`salaryRestricted`); `SalaryStructure += assignmentId`; `CrewActionType += CREW_ONBOARDED`. Employee numbers `CRW-xxxx` via `lib/employee-number.ts`. - **Action** (`onboardCandidate`, `onboard_crew`): one transaction off a `SELECTED` application — assign `employeeId`, create `CrewAssignment(ACTIVE, signOnDate)`, bind the approved `SalaryStructure` (`assignmentId` + `effectiveFrom`), `Application → ONBOARDED`, `Requisition → FILLED`, `CrewMember → EMPLOYEE` (+ `currentRank`); contract letter stored after. Guards flag + permission + SELECTED state. - **Screen**: the SELECTED action card's **Onboard to crew** modal (joining date, contract upload, starts-automatically chips); the assigned `CRW-` number shows on the ONBOARDED card. ### Tests & docs - Integration: `onboarding.test.ts` (5) — full transaction, requisition FILLED + salary binding, joining-date + SELECTED-only guards, permission gating, sequential CRW- ids. - `type-check` clean; full unit (234) + integration (168) green. - `CLAUDE.md` updated; wiki §12 status note bumped (3c ✅). ### Deferred - SITE_STAFF **login creation** for management ranks (`grantsLogin`) — a follow-up (per your call). - Attendance / experience / PPE records (the "starts automatically" chips) and the **Crew directory** (§8.7) — Phase 4 (Epic E/F/G). This completes **Phase 3**. Next is Phase 4 (crew records, PPE, leave/attendance + the deferred sign-off/experience, Epic K). 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- Closes **Epic D — Onboarding** (#78).
shad0w added 1 commit 2026-06-22 13:43:23 +00:00
feat(crewing): Phase 3c — onboarding (flagged)
All checks were successful
PR checks / checks (pull_request) Successful in 40s
PR checks / integration (pull_request) Successful in 28s
c82efa71af
Final slice of Phase 3 (stacked on 3b pipeline). The onboarding transaction that
turns a SELECTED candidate into active crew, per Crewing-Implementation-Spec
§8.5/§9/§11. Behind NEXT_PUBLIC_CREWING_ENABLED; production unchanged.

What's in
- Schema (crewing_onboarding migration): CrewAssignment + AssignmentStatus
  (ACTIVE/ON_LEAVE/SIGNED_OFF — leave/sign-off are Phase 4); ContractLetter
  (salaryRestricted); SalaryStructure += assignmentId; CrewActionType +=
  CREW_ONBOARDED. Employee numbers CRW-xxxx via lib/employee-number.ts.
- Action (onboardCandidate, onboard_crew): one transaction off a SELECTED
  application — assign employeeId, create CrewAssignment(ACTIVE, signOnDate),
  bind the approved SalaryStructure (assignmentId + effectiveFrom), Application →
  ONBOARDED, Requisition → FILLED, CrewMember → EMPLOYEE (+ currentRank); contract
  letter stored after. Guards flag + permission + SELECTED state.
- Screen: the SELECTED action card's "Onboard to crew" modal (joining date,
  contract upload, starts-automatically chips); the CRW- number shows on the
  ONBOARDED card.

Tests & docs
- Integration: onboarding.test.ts (5) — full transaction, requisition FILLED +
  salary binding, joining-date + SELECTED-only guards, permission gating, sequential
  CRW- ids. type-check clean; full unit (234) + integration (168) green.
- CLAUDE.md updated with the Phase 3c surface.

Deferred: SITE_STAFF login creation for management ranks (grantsLogin) — a
follow-up; attendance/experience/PPE records begin in Phase 4.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
shad0w added 1 commit 2026-06-22 18:49:43 +00:00
shad0w force-pushed feat/crewing-onboarding from 21b5d75bcf to c82efa71af 2026-06-22 18:49:52 +00:00 Compare
shad0w added 1 commit 2026-06-22 18:50:01 +00:00
Merge branch 'feat/crewing-pipeline' into feat/crewing-onboarding
All checks were successful
PR checks / checks (pull_request) Successful in 38s
PR checks / integration (pull_request) Successful in 28s
a8acf26eca
shad0w merged commit bca39be854 into feat/crewing-pipeline 2026-06-22 18:50:10 +00:00
Sign in to join this conversation.
No description provided.