Job booking setup

A React block (a whole screen) in Beamline's Construction app.

Online booking for a field-service company, set up from three sides that feed one booking form. Services: each priced and timed per unit with whether it reaches the form (or why not: online booking off, nobody can be booked, can't be saved); the editor sets price, duration per unit (15 minutes to 12 hours), a quantity range and who can be booked, with a live customer preview at a chosen quantity (the units drawn as one bar, the exact total time and price, the people it shows with); a newer save by someone else is said and the draft kept. Booking rules: how soon (business days), how often slots start and what's kept between visits (a fixed gap, the estimated drive, or nothing), previewed on one person's real day with visits, calendar events (never blocking) and every start offered or hidden with its reason in words; drive times are labelled estimates, and no address, an address outside the area and a form that never asks for an address each say what they do. Team hours: who can be booked online and each person's week on availability-rule-editor (reversed or overlapping ranges named by day keep Save off), beside the people who could take each start of a day.

Use it for

  • A home or field-service company deciding what customers can book online, when, and with whom.
  • Judging a booking rule by the slots it offers and hides on a real day.

Not for

Anatomy

  • bar: the company, the time zone in words, Services, Booking rules or Team hours
  • services: the list with time and price per unit and a state chip; the editor (name, unit price, description, online booking, duration per unit, quantity range, who can be booked, Cancel and Save); what a customer sees (quantity, the units as one bar, the math, the total, whether it shows on the form)
  • booking rules: earliest bookable day, slot interval, between visits (gap, drive time or none) with its value, Save rules; a preview of one person's day for a new visit at an address: hours, visits and events on a lane, a tick per start (offered or hidden), the estimated drive for the pointed start, offered starts and hidden runs with their reasons
  • team hours: people with their week and whether they can be booked online; the chosen person's hours on availability-rule-editor with problems named by day; who could take each start of a day and what's on their calendars (blocks or doesn't)

States

  • service: on the form, not bookable online, nobody can be booked, invalid duration, invalid quantity range, longer than a day, unsaved, saving, saved, conflict (load theirs or save over), failed
  • rules: fixed gap, drive time, no gap, before the first bookable day, outside the area, no address, no estimate, the form doesn't ask for an address (Save off), first visit of the day (drive from the yard), after an overnight job, saved, failed
  • team: day off, time off, invalid range (Save off), nobody can take a start, saving, saved, conflict
  • empty: no bookable services yet
  • narrow room: columns stack

Keyboard

  • Tab reaches each service, person, day and start; Enter or Space picks it; focusing a start shows why it's offered or hidden

Motion

A unit grows into the customer's bar as the quantity rises; the pointed start's ghost and its estimated drive fade in. Nothing runs at rest.

Props

PropTypeDefaultDescription
company (required)string—The company's name, shown in the bar.
zone (required)string—The time zone the business runs in, in words ("London time").
currency (required)string—ISO 4217 code prices are in.
servicesBookableService[]—
defaultServicesBookableService[]—
onServicesChange((services: BookableService[]) => void)—
staffStaffMember[]—
defaultStaffStaffMember[]—
onStaffChange((staff: StaffMember[]) => void)—
policyBookingPolicy—
defaultPolicyBookingPolicy—
onPolicyChange((policy: BookingPolicy) => void)—
items (required)DayItem[]—Visits, tasks and calendar events on the team's days (the host's; events never block booking).
areas (required)ServiceArea[]—
driveTimes (required)DriveTimes—Estimated drive minutes between areas, "base" being the yard.
today (required)string—Today, ISO yyyy-mm-dd.
opening (required){ start: string; end: string; }—Opening hours, "HH:mm".
formAsksAddressboolean—Whether the booking form asks for the customer's address (drive time needs it). Default true.
previewLengthnumber—Length of the visit the previews book, in minutes. Default 60.
defaultViewJobBookingSetupView—
defaultServicestring—
defaultServiceDraftPartial<BookableService>—Unsaved edits already made to the open service (a change in progress).
defaultPreviewQuantitynumber—
defaultPolicyDraftPartial<BookingPolicy>—
defaultRulesPreview{ person?: string | undefined; area?: string | null | undefined; date?: string | undefi…—
defaultPersonstring—
defaultHoursDraftAvailability—
defaultTeamDatestring—
onSaveServiceSaveService—Saves a service; reject with `{ conflict, theirs }` when someone saved a newer revision (`force` overwrites).
onSavePolicy((policy: BookingPolicy) => Promise<BookingPolicy>)—
onSaveStaff((person: StaffMember) => Promise<StaffMember>)—Saves a person's hours; reject with `{ conflict }` when they changed meanwhile.
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 { JobBookingSetup } from "@beamline/job-booking-setup";

Get it

Job booking setup 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 Construction

  • Submittal register: The documents a trade owes a project before its material is bought, on the clocks that matter: a log whose rows each draw their way to site on one shared…
  • Change orders: Change orders against a contract, with the money drawn where it stands: one bar of the original contract, each approved change, a line at the current…
  • Inspection review: A unit's inspection, reviewed in three views. Findings: rooms and features with their condition, answers, notes and photos, and each feature's…
  • Work orders: A maintenance work order that coordinates subtasks: the children's progress drawn by status with cancelled ones counted apart, the parent completed on…
  • Action center: Everything waiting on a person across projects: a strip of every open item on the days ahead, one lane per kind of owing (You submit, You answer, Tasks…
  • Company access: A project's companies as one board: No company first (office access waits for a company, and says so), then each company with its code and its people…
  • Condition checklist: An inspection by area. Each item marked good (success), soon (warning) or needs work now (danger), or not checked yet and kept apart below; what was…
  • Corrective actions: A corrective action raised from a failed inspection answer, for food safety, facilities or quality teams. The answer, its photo and note are pinned above…
  • Quality checks: Quality checks by picture and the control points that make them. A check asks for one photo: an upload that fails keeps its file with Try again, and…
  • Maintenance plan: Maintenance of shared equipment. The instruments, most urgent first, each with its most pressing kind and how due it is (overdue, due soon, fine, never…
  • Maintenance plans: An operations team's maintenance plans. The queue lists every asset-plan pair (one machine can appear under two plans) with its last service, next due…
  • Equipment register: A business's machines and vehicles: a register filtered by status (in use, in repair, sold, each counted) with each machine's photo or type icon…
  • Asset workspace: One physical asset: a machine, vehicle or piece of plant. Its header keeps the system id apart from the name and serial, with type, site, status and the…
  • Asset packs: Packs of assets (sounds, presets, fonts), the providers they come from and the storage they take. Download and install are two phases with their own…
  • Instrument use: Shared instruments. The slot search reads as one sentence (how long, which instrument type, the dates and the working hours with the lab's time zone)…
  • Job booking: A customer books a home or field-service job on the company's own site, phone first. Services with how many units, each unit adding its time and price…
  • Rental availability: A rental shop's availability: a product's month for the quantity a customer wants (each day available, some left with the count, booked out or not known…
  • Rooms & equipment: A salon's or clinic's rooms and equipment and what its services need of them: resources by group at each location, how many appointments each holds at…
  • System pages: The four pages a product shows when the normal one cannot: page not found (search and the likely places), something broke (try again, an error id to…

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.