Skip to main content

Interface: FacilityShelfData

Defined in: src/server/services/invoice/weeklyRun.ts:381

Master-data profile for the facility shelf (the "who/where/what" panel beside the billing detail).

Holds the facility's address, its single chosen primaryContact (billing role preferred, then admin, then first active contact; null when none), the active contract terms (hourlyRateCents is integer cents; hours/rate/terms may be null), the distinct positions (service types) staffed, and one contractors row per assigned contractor with a derived activity status: active when they logged payable hours this week, else leave if an approved leave overlaps the week, else no_activity. renewalDue is true when the contract end date or the facility renewal date falls within the next 90 days (inclusive). Read-only and company-scoped.

Properties

billingAddress

billingAddress: string | null

Defined in: src/server/services/invoice/weeklyRun.ts:386


city

city: string | null

Defined in: src/server/services/invoice/weeklyRun.ts:384


contract

contract: { contractedHours: number | null; endDate: string | null; hourlyRateCents: number | null; paymentTermsDays: number | null; startDate: string | null; } | null

Defined in: src/server/services/invoice/weeklyRun.ts:394


contractors

contractors: object[]

Defined in: src/server/services/invoice/weeklyRun.ts:402

id

id: string

name

name: string

serviceType

serviceType: string | null

status

status: "active" | "leave" | "no_activity"


facilityId

facilityId: string

Defined in: src/server/services/invoice/weeklyRun.ts:382


name

name: string

Defined in: src/server/services/invoice/weeklyRun.ts:383


positions

positions: string[]

Defined in: src/server/services/invoice/weeklyRun.ts:401


primaryContact

primaryContact: { email: string | null; name: string | null; phone: string | null; role: string; } | null

Defined in: src/server/services/invoice/weeklyRun.ts:388


renewalDue

renewalDue: boolean

Defined in: src/server/services/invoice/weeklyRun.ts:408


state

state: string | null

Defined in: src/server/services/invoice/weeklyRun.ts:385


zip

zip: string | null

Defined in: src/server/services/invoice/weeklyRun.ts:387