Skip to main content

Interface: TimeApprovalRow

Defined in: src/server/services/timeApproval.ts:12

Properties

assignmentId

assignmentId: string

Defined in: src/server/services/timeApproval.ts:15

One row per (contractor, assignment): a contractor with hours at two facilities has two rows.


contractorId

contractorId: string

Defined in: src/server/services/timeApproval.ts:13


daysInPeriod

daysInPeriod: number

Defined in: src/server/services/timeApproval.ts:19


daysWorked

daysWorked: number

Defined in: src/server/services/timeApproval.ts:21


facilityId

facilityId: string | null

Defined in: src/server/services/timeApproval.ts:17


facilityName

facilityName: string

Defined in: src/server/services/timeApproval.ts:18


frozen

frozen: boolean

Defined in: src/server/services/timeApproval.ts:45

The row's assignment window is over (offboarded / ended) → hours are frozen: read-only in the grid, excluded from "Delete all" (ADR-0050 L1). Distinct from locked (payroll) — reactivating the contractor/facility lifts it. Replaces the old status='locked' freeze (offboarding + lock cron).


invoiced

invoiced: boolean

Defined in: src/server/services/timeApproval.ts:37

At least one entry is attributed to a sent invoice (invoice_id set). The row stays editable, but changing invoiced hours may require reissuing the invoice, so the grid warns and blocks deletion (ADR-0050). Independent of status — an invoiced row is usually approved, not locked.


invoiceLabel?

optional invoiceLabel?: string

Defined in: src/server/services/timeApproval.ts:39

Invoice number(s) covering this row's hours, e.g. "INV-0007" — for the "Invoiced" badge/warning.


name

name: string

Defined in: src/server/services/timeApproval.ts:16


pending

pending: boolean

Defined in: src/server/services/timeApproval.ts:26

Has at least one entry still awaiting approval (submitted / pending_approval).


ptoHours

ptoHours: number

Defined in: src/server/services/timeApproval.ts:23


status

status: "approved" | "pending" | "locked"

Defined in: src/server/services/timeApproval.ts:31

Row state for the UI. locked = payroll pay-run lock ONLY (billing no longer locks — ADR-0050), dominates → read-only. Otherwise pending if anything still needs review, else approved.


totalHours

totalHours: number

Defined in: src/server/services/timeApproval.ts:24


trackedHours

trackedHours: number

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


workingDays

workingDays: number

Defined in: src/server/services/timeApproval.ts:20