Rooms & equipment
A React block (a whole screen) in Beamline's Construction app.
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 once (one, a number set on its row of places, or no limit) kept apart from when it can be used (always, or hours), and the services that need it; each service's requirements (a group, any member including later ones or chosen ones, whether a booking takes the whole resource); and a time trial: drag a booking along the day and every requirement says which member would take it, or why none can (full until, closed until), with what online booking and the desk do then.
Use it for
- Setting up what a booking needs beyond a person: treatment rooms, machines, a lounge with several places, a steam room with hours; salons, spas, clinics, studios, rental desks.
- Checking why a service can't be booked at a time: which room or machine is the one in the way.
Not for
- Explaining every closed time of one service across a week (availability-layers).
- A person's own bookable hours (availability-rule-editor).
- Fitting jobs into days of station capacity (capacity-terrain).
Anatomy
- side list: the location, then each group's resources at it with how many they hold at once, then the services with how many requirements each
- resource: name, group and location; Appointments at once (One, A number, No limit) drawn as a row of places whose end is a grip (the number field its twin), No limit drawn as a row running off its end, capacity not known said; When it can be used (Always, or specific days and times in the availability rule editor), apart from capacity; the services that need it; Save with Unsaved
- service: its requirements joined by and, each a group with Any of N (members added later too) or Chosen ones, and Takes the whole resource; Add a requirement; no requirements said
- time trial: the verdict (Bookable at 3:00 PM: Room 3 and Diode laser, or Not bookable at 2:15 PM: no Laser free), what online booking does then and the salon's own policy for the desk (Book at the desk anyway, or Can't be booked at this time, or nothing when the app gives none); the booking as a card held and dragged along the day with its times on it, a bracket under it at its true length; every member's lane across the card's width (closed hours labelled, appointments as quiet tiles that name who and when on hover and focus), the tried booking drawn on each lane (the taker in the success tone, a clash in the danger tone); each lane's name with its state under it (Free, Full until, Closed until); each requirement's taker (Room 3 takes it) or None free
States
- single capacity
- limited capacity (places)
- no limit with its hours kept (a schedule gate)
- restricted hours
- capacity not known (never read as free)
- no services need it
- permission denied (look, don't change)
- unsaved change, save refused with the edit kept, saved
- any member (dynamic) and chosen members
- exclusive reservation
- missing resource (no members: Save waits)
- online booking blocked; the desk's override from your app, or said as unknown
- loading
Keyboard
- the side list: Tab and Enter
- places: the grip is a slider, ←/→ by one place; the number field types it
- the trial's booking is a slider: ←/→ by 15 minutes, Shift by an hour, Home and End; held, Escape puts it back; appointments in the lanes take focus and say who and when
Motion
Places fill and empty in the fast duration as the count changes; the tried booking, its bracket and its span on every lane slide to a new start by translate in the fast duration (held, they follow the hand by quarter hours); nothing moves at rest; reduced motion places at once.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
locations / groups (required) | SetupLocation[] / ResourceGroup[] | — | The business's locations and its kinds of resource (a group spans locations; each resource belongs to one). |
resources / defaultResources / onResourcesChange | SetupResource[] | — | Each with its group, location, capacity ({ mode: "single" }, { mode: "limited", count }, { mode: "unlimited" }, or null while not known) and hours (an Availability, or null for always). |
services / defaultServices / onServicesChange | SetupService[] | — | Each with its minutes, location and requirements ({ groupId, selection: "all" | "explicit", resourceIds, exclusive }); a service needs every requirement, each met by one member. |
open / defaultOpen / onOpenChange | string | — | open: What is open: "resource:<id>" or "service:<id>". defaultOpen: Initial open state when uncontrolled; defaults to false. onOpenChange: Reports an open-state change; no callback by default. |
onSaveResource / onSaveService | (item) => Promise | — | onSaveResource: Save a resource (its capacity, hours, location); a rejection keeps the edit with the reason. onSaveService: Save a service's requirements; a rejection keeps them with the reason. |
busy / trialDate (required) | Busy[] / string | — | busy: The appointments already using resources on `trialDate`, for the time trial. trialDate: The day the time trial is drawn for ("2026-11-06"). |
deskOverride / onDeskBooking | boolean | null / (serviceId, start) => void | — | deskOverride: Your booking policy for a time a requirement can't meet; online booking never offers it. true: the desk may book it anyway (the trial offers "Book at the desk anyway", calling `onDeskBooking`); false: it can't be booked at all (said); null or left out: the trial says nothing about the desk. onDeskBooking: The desk books the tried time anyway (offered only when `deskOverride` is true). |
canManage / loading / product | boolean / boolean / string | — | Look without changing; loading skeletons; your product's mark. |
locations (required) | SetupLocation[] | — | |
groups (required) | ResourceGroup[] | — | |
resources | SetupResource[] | — | |
defaultResources | SetupResource[] | — | |
onResourcesChange | ((resources: SetupResource[]) => void) | — | |
services | SetupService[] | — | |
defaultServices | SetupService[] | — | |
onServicesChange | ((services: SetupService[]) => void) | — | |
open | string | — | What is open: "resource:<id>" or "service:<id>". |
defaultOpen | string | — | Initial open state when uncontrolled; defaults to false. |
onOpenChange | ((open: string) => void) | — | Reports an open-state change; no callback by default. |
onSaveResource | ((resource: SetupResource) => Promise<unknown>) | — | Save a resource (its capacity, hours, location); a rejection keeps the edit with the reason. |
onSaveService | ((service: SetupService) => Promise<unknown>) | — | Save a service's requirements; a rejection keeps them with the reason. |
busy | Busy[] | — | The appointments already using resources on `trialDate`, for the time trial. |
trialDate (required) | string | — | The day the time trial is drawn for ("2026-11-06"). |
canManage | boolean | — | false: the person may look but not change resources (managing them needs its own permission). |
loading | boolean | — | |
product | string | — | Your product's name, shown as its mark. |
className | string | — | Classes on the documented visual root; no override by default. |
ref | Ref<HTMLDivElement> | — | Receives the documented native target or imperative handle; omitted by default. |
deskOverride | boolean | null | — | Your booking policy for a time a requirement can't meet; online booking never offers it. true: the desk may book it anyway (the trial offers "Book at the desk anyway", calling `onDeskBooking`); false: it can't be booked at all (said); null or left out: the trial says nothing about the desk. |
onDeskBooking | ((serviceId: string, start: number) => void) | — | The desk books the tried time anyway (offered only when `deskOverride` is true). |
Built from
- availability-rule-editor
- value-grip
- segmented-control
- number-field
- radio-group
- select
- multi-select
- switch
- button
- badge
- alert
- empty-state
- skeleton
- tooltip
Dependencies
lucide-react
Import
import { ResourceSetup } from "@beamline/resource-setup";
Get it
Rooms & equipment 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…
- Job booking setup: 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…
- 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…
- 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…