Skip to main content

Function: assignmentIsFrozen()

assignmentIsFrozen(a, todayISO): boolean

Defined in: src/server/services/assignments.ts:22

An assignment's hours are FROZEN once its window is over — the assignment is deactivated, or its end_date has passed. Frozen hours are read-only in the owner grids and can't be edited or deleted (ADR-0050 L1): this replaces the old status='locked' freeze (offboarding + the lock-ended cron), which overloaded a status reserved for payroll pay-run locks. Derived from live assignment state, so reactivating a contractor/facility (which clears active=false) lifts the freeze — nothing to undo. Settlement still runs: approving, invoicing, and closing a pay run for the final week stay open.

Parameters

a

active

boolean | null

end_date

string | null

todayISO

string

Returns

boolean