Kaizen
Browse modulesBookingsbookings/serverFunctions

Function: blocksCapacity()

function blocksCapacity(status: 
  | "draft"
  | "held"
  | "pending"
  | "waitlisted"
  | "offered"
  | "confirmed"
  | "completed"
  | "no_show"
  | "cancelled"
  | "rejected"
  | "expired"): boolean;

Defined in: server/bookings/capacity.ts:51

The §6.6 is_blocking truth table: a schedule/seat row blocks capacity iff its booking is in an occupancy-holding state. Maintained in the SAME transaction as every status transition.

  • held additionally requires a live hold — that part is the QUERY-side hold-expiry predicate above, not this flag (an expired-but-unswept hold keeps is_blocking = true until the sweeper flips it).
  • draft / waitlisted never block (a blocking draft would leak a slot forever — nothing TTL-sweeps it).
  • terminals completed / no_show still block: the slot WAS consumed.

Parameters

ParameterType
status| "draft" | "held" | "pending" | "waitlisted" | "offered" | "confirmed" | "completed" | "no_show" | "cancelled" | "rejected" | "expired"

Returns

boolean

On this page