Instrument use
A React block (a whole screen) in Beamline's Construction app.
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), each part opening what changes it; under it the window as a week: a row per instrument of that type with what it is doing now, a column per day's working hours, the bookings already made and maintenance (hatched) where they fall, and the slot found outlined among them. The slot found shows its time zone and that it isn't held; booking checks again, and when it was taken meanwhile the search stays and Find next carries on. The usage log keeps who used an instrument and who recorded it as two names, each use linked to the record it belongs to and its duration edited in place; Record a use opens its form.
Use it for
- Finding and booking a free slot on one of several interchangeable machines or rooms.
- Logging who used shared equipment, recorded by someone else, linked to the work it was for.
Not for
- A calendar of every booking across instruments (the time-axis signature).
- Desks or rooms booked by staff (desk-booking).
Anatomy
- search: the sentence (hours, type, dates, working hours and zone as parts that each open a small editor), Find a slot
- week: a row per instrument of the type (name, now: free, in use until, maintenance), a column per day with hour ticks, bookings with who, maintenance hatched, the found slot outlined, the key
- header: the product's mark, Instruments; tabs Find a slot and Usage log
- find: what happened; the slot with its zone, not held, Find next and Book
- log: instrument filter; table of instrument, used by, recorded by, when, duration (edit in place), record; Record a use (opens its form)
States
- find: not searched, looking, a slot, no more slots, booking, booked, taken meanwhile (search kept), refused
- log: empty, filtered, editing a duration, edited (by whom, when), refused (unchanged), recorded
- phone: fields stack, the table scrolls sideways
- right to left: mirrors
Keyboard
- Tab through the search fields, Find, Find next and Book; in the log, the filter, each row's edit and record link, and the new-use fields
Motion
None of its own.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
instruments (required) | Instrument[] | — | |
records (required) | UsageRecord[] | — | |
people (required) | string[] | — | |
user (required) | string | — | Who's using the screen; they're "recorded by" on what they write down. |
timeZone (required) | string | — | The lab's time zone; slots and uses are shown in it, with its name. |
sources | { id: string; title: string; }[] | — | Records a use can be linked to. |
onFind | ((query: SlotQuery, after: number | null) => Promise<SlotCandidate | null>) | — | The next free slot after `after` (epoch ms), or null when none is left in the window. |
onBook | ((slot: SlotCandidate) => Promise<void>) | — | Book a slot; it's checked again here. Reject with SlotTakenError when it went meanwhile. |
onRecord | ((record: UsageRecord) => Promise<void>) | — | |
onEdit | ((record: UsageRecord) => Promise<void>) | — | Save an edited record (the same record, never a new one). |
onOpenSource | ((id: string) => void) | — | |
defaultTab | "find" | "log" | — | |
defaultQuery | Partial<SlotQuery> | — | |
defaultSearch | boolean | — | Search at once with the default query. |
product | string | — | |
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. |
now | InstrumentNow[] | — | What each instrument is doing right now. |
bookings | InstrumentBooking[] | — | Bookings already made in the search window, drawn on the week so a found slot is seen among them. |
Built from
- Avatar
- Bottom sheet
- Button
- Calendar
- Date picker
- Dropdown menu
- Empty state
- Label
- Number field
- Popover
- Select
- Spinner
- Tabs
- Time picker
Dependencies
lucide-react
Import
import { InstrumentUse } from "@beamline/instrument-use";
Get it
Instrument use 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…
- 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…
- 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…