fix(crewing): rank-held universal, ex-hand an admin-only flag #98

Merged
shad0w merged 2 commits from fix/crewing-exhand-admin-only into master 2026-06-23 16:24:15 +00:00
Owner

Summary

Two related crewing fixes from review feedback:

  1. "Rank held" applies to everyone, not just ex-hands. The field is relabelled from "Rank held (ex-hands)" to "Rank held"; for returning crew it still auto-updates on sign-off.
  2. Ex-hand is now an explicit, admin-only designation — decoupled from the Source dropdown.

Changes

  • Candidate form (crewing/candidates): removed the EX_HAND source option and relabelled "Rank held". addCandidate always intakes a fresh NEW/CANDIDATE (the ex-hand-recognition heuristic still reuses an existing EX_HAND row by email/name). updateCandidate no longer rewrites type/status, so an admin-set EX_HAND or an onboarded EMPLOYEE is never clobbered by a candidate edit.
  • Admin crew form (admin/crew): the type NEW/EX_HAND select is now an "Ex-hand (returning crew)" checkbox — the single place ex-hand is tagged.
  • List / detail: ex-hand indicators (purple "Ex-hand" chip in the pool list, "Returning crew" on the profile) key on type === EX_HAND instead of source.
  • Sign-off: preserves the original recruitment source when flipping a crew member to EX_HAND.

Tests

  • tests/integration/candidates.test.ts: ex-hand rows are seeded directly (the candidate form can no longer create them); added an assertion that candidate intake stays NEW/CANDIDATE.
  • tsc --noEmit clean; candidates / crewing-admin / signoff integration suites green (23 tests).

🤖 Generated with Claude Code

## Summary Two related crewing fixes from review feedback: 1. **"Rank held" applies to everyone, not just ex-hands.** The field is relabelled from "Rank held (ex-hands)" to "Rank held"; for returning crew it still auto-updates on sign-off. 2. **Ex-hand is now an explicit, admin-only designation** — decoupled from the Source dropdown. ## Changes - **Candidate form** (crewing/candidates): removed the EX_HAND source option and relabelled "Rank held". addCandidate always intakes a fresh NEW/CANDIDATE (the ex-hand-recognition heuristic still reuses an existing EX_HAND row by email/name). updateCandidate no longer rewrites type/status, so an admin-set EX_HAND or an onboarded EMPLOYEE is never clobbered by a candidate edit. - **Admin crew form** (admin/crew): the type NEW/EX_HAND select is now an **"Ex-hand (returning crew)"** checkbox — the single place ex-hand is tagged. - **List / detail**: ex-hand indicators (purple "Ex-hand" chip in the pool list, "Returning crew" on the profile) key on type === EX_HAND instead of source. - **Sign-off**: preserves the original recruitment source when flipping a crew member to EX_HAND. ## Tests - tests/integration/candidates.test.ts: ex-hand rows are seeded directly (the candidate form can no longer create them); added an assertion that candidate intake stays NEW/CANDIDATE. - tsc --noEmit clean; candidates / crewing-admin / signoff integration suites green (23 tests). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
shad0w added 1 commit 2026-06-23 16:05:47 +00:00
fix(crewing): make rank-held universal, ex-hand an admin-only flag
All checks were successful
PR checks / checks (pull_request) Successful in 41s
PR checks / integration (pull_request) Successful in 30s
e951a44a67
Rank held applies to every candidate, not just ex-hands; it auto-updates
for returning crew on sign-off. Ex-hand designation is decoupled from the
Source dropdown and owned by the office:

- Candidate form: drop the EX_HAND source option, relabel "Rank held
  (ex-hands)" to "Rank held". addCandidate always intakes NEW/CANDIDATE
  (ex-hand recognition still reuses an existing EX_HAND row); updateCandidate
  no longer rewrites type/status, so an admin-set EX_HAND or onboarded
  EMPLOYEE is never clobbered by a candidate edit.
- Admin crew form: the type NEW/EX_HAND select becomes an "Ex-hand
  (returning crew)" checkbox -- the only place ex-hand is tagged.
- List/detail ex-hand indicators key on type === EX_HAND (not source).
- Sign-off preserves the original recruitment source when flipping to EX_HAND.
- Tests seed EX_HAND rows directly; assert candidate intake stays NEW.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
shad0w added 1 commit 2026-06-23 16:22:51 +00:00
Merge branch 'master' into fix/crewing-exhand-admin-only
All checks were successful
PR checks / checks (pull_request) Successful in 44s
PR checks / integration (pull_request) Successful in 30s
e7888a0886
shad0w merged commit afa5937429 into master 2026-06-23 16:24:15 +00:00
Sign in to join this conversation.
No description provided.