Skip to main content

Function: offboardContractor()

offboardContractor(_prev, formData): Promise<OffboardState>

Defined in: src/server/actions/offboarding.ts:29

Owner-only: offboard a contractor. Archives them, sets the contract end date, and end-dates their active assignments. End-dating is the freeze: once an assignment's window is over, its hours can't be edited or deleted through the owner grids (ADR-0050 L1 — status='locked' is reserved for payroll pay-run locks, so offboarding must not write it; the freeze is derived from assignment state via assignmentIsFrozen). Settlement still runs — approving, invoicing, and closing a pay run for the final week all stay open. Fully reversible: reactivating (which clears active=false) lifts it.

Parameters

_prev

OffboardState

formData

FormData

Returns

Promise<OffboardState>