Skip to main content

Function: updateContractorProfile()

updateContractorProfile(_prev, formData): Promise<ContractorProfileState>

Defined in: src/server/actions/contractors.ts:202

Admin-only: edit a contractor's core record. Company-scoped. Email is the login, so when it changes for a contractor who already has an auth user we update that auth user first (bailing if the address is taken) and only then mirror it onto the row, keeping login + record consistent.

Parameters

_prev

ContractorProfileState

formData

FormData

Returns

Promise<ContractorProfileState>