Table service

A React block (a whole screen) in Beamline's Hotel & restaurant app.

A restaurant table's service in three places sharing one order. The floor: tables placed on a plan by drag, arrow keys or typed numbers (Shift and an arrow resizes), each with a stable id, a code unique across every floor (a code used elsewhere refused in the dialog and on save), covers and shape, switched off without losing history; the layout saved as one revision, said as waiting until the tills report they loaded it, and a failed save keeping the edits. The order: by course or by seat, new items marked Not sent until Send, which sends only them (with their ids and an operation id), a held course fired when the previous one is out, a sent item's course kept, reprinting a ticket as a copy (no new item, nothing made again), a printer that refuses said with nothing sent; paying is a separate step. The checks: the order split across seats with split-anything (shared items in fractions that keep their identity, cents that add up, tax following each share), started from each seat's own items or equal covers; saving needs every item on a check and charges nothing, a paid check's share stays put, and a split saved against an order changed on another till is refused and started again from the new revision.

Use it for

  • A server's view of one table: ordering by seat and course, sending to the kitchen in parts, firing courses and splitting the checks.
  • A manager laying out a venue's tables and pushing the layout to the tills.

Not for

Anatomy

  • head: the table's code, covers and order revision; Floor, Order and Checks
  • floor: floors, Add table, the plan (tables with code and covers, off ones hatched), the chosen table's settings (Edit table…, Takes orders, place and size), the save bar (changed count, Discard, Save layout, waiting for the tills or loaded)
  • order: the menu (New items go to a seat or Shared and a course, New course, dishes by category), the order grouped by course or seat (course state, lines with quantity, seat or course, Not sent or Sent time, price, options), Fire when ready, the send bar (not-sent count, Checks and payment, Send)
  • checks: Start from each seat or equal covers or nothing, paid seats said, split-anything, the save bar (items left, saved, conflict with Start from the new revision)

States

  • floor: empty, table chosen, dialog, code taken, table off, changed not saved, saving, saved waiting for the tills, loaded, save failed
  • order: drafts not sent, by course, by seat, new course, sending, sent, next course ready, fired, ticket reprinted, printer refused
  • checks: nothing split, by seat, equal covers, items left, saved unpaid, partly paid, conflict, save failed

Keyboard

  • Tab reaches each table on the plan; arrow keys move it by one grid step, Shift and an arrow resizes it, Enter chooses it; place and size can be typed
  • Each order line's options menu moves it to a seat or course, changes the quantity, removes a draft or reprints a sent ticket

Motion

Tables glide to a snapped place; split-anything's lines fly between checks. Nothing runs at rest.

Props

PropTypeDefaultDescription
floors (required)FloorPlan[]—The venue's floors as saved.
appliedRevisionsRecord<string, number>—Revision each floor's tills have loaded, by floor id; the floor says "waiting" until it reaches a saved one.
onSaveFloor((floorId: string, tables: FloorTable[]) => Promise<number>)—Saves one floor's layout as a whole; resolve with its new revision, reject to keep the edits here.
order (required)ServiceOrder—The table's order as it was loaded; the block keeps its edits.
menu (required)MenuEntry[]—
onSend((order: ServiceOrder, itemIds: string[], operationId: string) => Promise<string>)—Sends exactly these item ids (with an operation id to dedupe a retry); resolve with when the kitchen took them.
onFire((courseId: string) => Promise<string>)—Fires a held course; resolve with when.
onReprint((itemId: string) => Promise<unknown>)—Prints a copy of a sent item's ticket.
onSaveSplit((partition: CheckPartition) => Promise<number>)—Saves the split (not a payment); resolve with its revision, reject with SplitConflict if the order moved on.
onReloadOrder((revision: number) => ServiceOrder)—The order at the revision a refused split named; the split starts again from it.
defaultSharesCheckShares—
paidSeatsnumber[]—Seats whose check is paid.
savedSplitRevisionnumber | null—
defaultViewTableServiceView—
defaultFloorIdstring—
defaultSelectedTablestring | null—
defaultEditingTableboolean—
defaultDraftsRecord<string, FloorTable[]>—Unsaved layout edits to open with, by floor id.
defaultGroupOrderGroup—
taxRatenumber—
currencystring—
localestring—
classNamestring—Classes on the documented visual root; no override by default.
styleCSSProperties—Inline styles on the documented visual root; no overrides by default.
refRef<HTMLDivElement>—Receives the documented native target or imperative handle; omitted by default.

Built from

Dependencies

lucide-react

Import

import { TableService } from "@beamline/table-service";

Get it

Table service is part of Beamline UI. Install the parts you need in your React app as compiled packages or editable source. Get Beamline · Connect your agent

More in Hotel & restaurant

  • Reservation desk: A front desk's bookings without a room for a night, beside the rooms that could take them: bookings grouped by room type with their stay, party and…
  • Counter service: A counter and its kitchen. The counter: the order on the left (its name, eat here / takeaway / drive-through, each line with its options and quantity…
  • Room readiness: Housekeeping's rooms for the day: condition, occupancy, the front desk's plan (arriving with its time or not known, departing, staying on), who is…
  • Stay folio: A stay's folio: the chosen folio's lines filtered by kind, posted and pending said, voided lines on request, every row in the ledger's currency; beside…
  • Guest messages: Conversations with guests beside the booking each is about, for a host stand, salon front desk or hotel. Guests waiting for an answer come first with how…
  • Shift briefing: A team's pre-shift briefing for a restaurant service (or any shift with bookings): the venue, the service and when its reservation snapshot was read, an…
  • Map explorer: A map with one operational layer over real ground (an optional map base: relief, lakes, streams, woods, roads), explored without losing your place; its…
  • Page header: The top of a record or project page: breadcrumb, title with status, description and meta, a primary action with secondary actions that fold into a More…
  • Turntable review: A 3D asset reviewed on a turntable. The object large at the angle in view with front, side and back said, standing on a plate whose rim shows the twelve…

Part of Beamline UI: polished, editable React components and complete screens for custom applications. Build your own style from any look; tokens, fonts, radii, motion; not only colours.