pelagia-portal/App/app/(portal)/crewing/applications
Hardik d796e81efc fix(crewing): harden onboardCandidate (D1 guard, D3 metadata, atomic contract)
- D1: require a Manager-approved SalaryStructure before onboarding; a SELECTED
  application with none is now blocked instead of silently binding zero salary
  rows.
- D3 AC2: the CREW_ONBOARDED CrewAction records the created IDs
  (assignmentId, employeeId, salaryStructureId) in metadata.
- Atomicity: the contract letter is uploaded before the transaction and its row
  is created INSIDE it, so onboarding is one atomic write (no half-onboarded
  crew member without a contract on failure).

onboarding.test.ts asserts the metadata and the new D1 block (no assignment, the
candidate stays a CANDIDATE).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-22 23:32:30 +05:30
..
[id] feat(crewing): Phase 3c — onboarding (flagged) 2026-06-22 19:12:53 +05:30
actions.ts fix(crewing): harden onboardCandidate (D1 guard, D3 metadata, atomic contract) 2026-06-22 23:32:30 +05:30
application-action-card.tsx feat(crewing): Phase 3c — onboarding (flagged) 2026-06-22 19:12:53 +05:30
application-ui.ts feat(crewing): Phase 3b — recruitment pipeline (flagged) 2026-06-22 18:49:12 +05:30