feat(crewing): resolve self-contained deferred follow-ups (flagged) #88

Merged
shad0w merged 1 commit from feat/crewing-followups into feat/crewing-appraisal 2026-06-22 18:54:33 +00:00
Owner

Crewing — self-contained deferred follow-ups

Clears the deferrals tracked across earlier phases that were genuinely self-contained. Stacks on #74 (appraisal); base feat/crewing-appraisal. Behind NEXT_PUBLIC_CREWING_ENABLED.

What's in

  • SITE_STAFF login on onboard/placement (Epic D follow-up, §3/§4.1): lib/crew-login.ts maybeCreateSiteStaffLogin creates a passwordless SITE_STAFF User (sharing the CRW- employee no.) when a grantsLogin rank is onboarded (onboardCandidate) or placed (placeCrew) and the crew member has an email. No-op for non-login ranks / no email / existing user.
  • Own-site scoping (Epic E follow-up, §8.7): User.siteId added; the Crew directory filters a SITE_STAFF user with a home site to crew whose active assignment is at that site (graceful when unset). The link is set at login creation (the siteId = the assignment's site).
  • PPE / next-of-kin verify gates (Epic F/I follow-up): PpeIssue / NextOfKin gained verificationStatus + verifiedById; verifyPpe / verifyNextOfKin (verify_site_records — MPO) + queue sections in /crewing/verification.

Tests & docs

  • Integration: crewing-followups.test.ts (6) — login created/skipped by rank + email (and siteId set), PPE/NoK verify + reject-reason + already-decided guard + permission gating.
  • type-check clean; full unit (245) + integration (211) green (verified with RESEND_API_KEY unset, mimicking CI).
  • CLAUDE.md updated.

Part of Epic D (#78), Epic E (#79), Epic F (#80), Epic I (#83).

Still deferred (not self-contained)

  • Public careers intake API (A2 — external marketing site).
  • Pay-status pay rows (depend on Phase 6 payroll).

🤖 Generated with Claude Code

## Crewing — self-contained deferred follow-ups Clears the deferrals tracked across earlier phases that were genuinely self-contained. Stacks on **#74** (appraisal); base `feat/crewing-appraisal`. Behind `NEXT_PUBLIC_CREWING_ENABLED`. ### What's in - **SITE_STAFF login on onboard/placement** (Epic D follow-up, §3/§4.1): `lib/crew-login.ts` `maybeCreateSiteStaffLogin` creates a passwordless `SITE_STAFF` `User` (sharing the `CRW-` employee no.) when a `grantsLogin` rank is onboarded (`onboardCandidate`) or placed (`placeCrew`) and the crew member has an email. No-op for non-login ranks / no email / existing user. - **Own-site scoping** (Epic E follow-up, §8.7): `User.siteId` added; the Crew directory filters a `SITE_STAFF` user with a home site to crew whose active assignment is at that site (graceful when unset). The link is set at login creation (the `siteId` = the assignment's site). - **PPE / next-of-kin verify gates** (Epic F/I follow-up): `PpeIssue` / `NextOfKin` gained `verificationStatus` + `verifiedById`; `verifyPpe` / `verifyNextOfKin` (`verify_site_records` — MPO) + queue sections in `/crewing/verification`. ### Tests & docs - Integration: `crewing-followups.test.ts` (6) — login created/skipped by rank + email (and `siteId` set), PPE/NoK verify + reject-reason + already-decided guard + permission gating. - `type-check` clean; full unit (245) + integration (211) green (verified with `RESEND_API_KEY` unset, mimicking CI). - `CLAUDE.md` updated. Part of **Epic D** (#78), **Epic E** (#79), **Epic F** (#80), **Epic I** (#83). ### Still deferred (not self-contained) - Public careers intake API (A2 — external marketing site). - Pay-status pay rows (depend on Phase 6 payroll). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
shad0w added 1 commit 2026-06-22 16:58:45 +00:00
feat(crewing): resolve self-contained deferred follow-ups (flagged)
All checks were successful
PR checks / checks (pull_request) Successful in 42s
PR checks / integration (pull_request) Successful in 30s
df3b4bdc97
Clears the self-contained deferrals tracked across phases. Stacks on 5b appraisal.
Behind NEXT_PUBLIC_CREWING_ENABLED.

- SITE_STAFF login on onboard/placement (Epic D follow-up): lib/crew-login.ts
  maybeCreateSiteStaffLogin creates a passwordless SITE_STAFF User (sharing the
  CRW- employee no., siteId = the assignment's site) when a grantsLogin rank is
  onboarded (onboardCandidate) or placed (placeCrew) and the crew member has an
  email. No-op otherwise.
- Own-site scoping (Epic E follow-up, §8.7): User.siteId added (migration
  crewing_followups); the Crew directory filters a SITE_STAFF user with a home site
  to crew whose active assignment is at that site (graceful when unset). The link is
  set at login creation.
- PPE / next-of-kin verify gates (Epic F/I follow-up): PpeIssue/NextOfKin gained
  verificationStatus + verifiedById; verifyPpe / verifyNextOfKin (verify_site_records,
  MPO) + queue sections in /crewing/verification.

Tests & docs
- Integration: crewing-followups.test.ts (6) — login created/skipped by rank+email
  (+ siteId set), PPE/NoK verify + reject-reason + already-decided guard + gating.
  type-check clean; full unit (245) + integration (211) green (RESEND_API_KEY unset).
- CLAUDE.md updated.

Part of Epic D (#78), Epic E (#79), Epic F (#80), Epic I (#83).
Still deferred (not self-contained): public careers API (A2); Pay-status pay rows (Phase 6).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
shad0w added 1 commit 2026-06-22 18:54:17 +00:00
Merge branch 'feat/crewing-appraisal' into feat/crewing-followups
All checks were successful
PR checks / checks (pull_request) Successful in 41s
PR checks / integration (pull_request) Successful in 32s
5f7a64d2d5
shad0w force-pushed feat/crewing-followups from 5f7a64d2d5 to df3b4bdc97 2026-06-22 18:54:26 +00:00 Compare
shad0w merged commit af156a4d46 into feat/crewing-appraisal 2026-06-22 18:54:33 +00:00
Sign in to join this conversation.
No description provided.