pelagia-portal/App/app/(portal)/crewing
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
..
applications fix(crewing): harden onboardCandidate (D1 guard, D3 metadata, atomic contract) 2026-06-22 23:32:30 +05:30
appraisals feat(crewing): Phase 5b — appraisal (flagged) 2026-06-22 22:09:32 +05:30
attendance feat(crewing): Phase 4b — leave & attendance (flagged) 2026-06-22 21:07:15 +05:30
candidates feat(crewing): Phase 3a — candidates / talent pool (flagged) 2026-06-22 18:23:01 +05:30
crew fix(crewing): mask Aadhaar/PAN document numbers server-side 2026-06-22 23:29:11 +05:30
leave feat(crewing): clash detection by required strength (Option A) 2026-06-22 21:14:21 +05:30
requisitions feat(crewing): Phase 3b — recruitment pipeline (flagged) 2026-06-22 18:49:12 +05:30
verification feat(crewing): EPFO/UAN assisted verification (GstService pattern, flagged) 2026-06-22 22:43:24 +05:30