# Room readiness

A React block (a whole screen) in [Beamline](https://beamline.io/)'s [Hotel & restaurant](https://beamline.io/components/apps/hotel-restaurant) app. Live demo: https://beamline.io/components/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 assigned and do not disturb as separate facts; a search and filters that reset apart; rooms chosen together for one change, with what saved and what was refused said room by room. A room opens beside the list where each fact changes on its own (an occupied room marked clean stays occupied; do not disturb only when occupied), a stale change is kept and said, and the list can be brought back to it.

## Use it for

- Turning over rooms or units each day: a hotel's housekeeping, a hostel's beds, a vacation-rental cleaning crew, a clinic's exam rooms.
- Where several states of one place (clean, occupied, expected) must change apart, by one person or in bulk.

## Not for

- Bookings without a room ([reservation-desk](https://beamline.io/components/reservation-desk)).
- Tasks on a board ([kanban-board](https://beamline.io/components/kanban-board)).
- Maintenance work orders.

## Anatomy

- header: the product's mark and the title
- toolbar: Find a room, Show only (dirty, unassigned, arriving today), Show all, the count
- bulk bar (when rooms are chosen): the count, one change (a condition, or an assignee), Apply; the result room by room
- table: a checkbox, the room (type and floor), condition (a quiet mark, dirty in the warning tone), occupancy with do not disturb, the front desk's plan, the assignee (the last two fold in a narrow room)
- unit (side): the room, Show it in the list, Close; type, capacity and tags, occupancy, front desk; Condition, Assigned to, Do not disturb, Notes with Save note; saving, saved, stale

## States

- loading
- filtered work, no matches
- unassigned
- occupied dirty
- vacant inspected
- do not disturb (occupied only)
- bulk pending, partial update failure said per room
- unit selected, saving, saved, stale (draft kept), permission denied
- selected unit scrolled out and brought back
- phone: the unit replaces the list
- right to left: the columns mirror

## Keyboard

- Tab through search, filters, each room's checkbox and name, the bulk change and Apply, then the unit's fields

## Motion

None of its own.

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `rooms` (required) | `HousekeepingRoom[]` | — |  |
| `staff` (required) | `{ id: string; name: string; }[]` | — |  |
| `onUpdate` | `((roomId: string, revision: number, change: RoomChange) => Promise<HousekeepingRoom>)` | — | Apply one change to one room. Resolve with the room as saved; reject with an Error named "StaleError" when it changed meanwhile (the draft stays). |
| `onBulk` | `((targets: { id: string; revision: number; }[], change: RoomChange) => Promise<{ saved:…` | — | Apply one change to several rooms. Resolve with the rooms saved and those refused, each with its reason. |
| `defaultSelected` | `string \| null` | — | The room open beside the list. |
| `canEdit` | `boolean` | — |  |
| `timeZone` | `string` | — |  |
| `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. |

## Built from

- [Avatar](https://beamline.io/components/avatar.md)
- [Button](https://beamline.io/components/button.md)
- [Checkbox](https://beamline.io/components/checkbox.md)
- [Chip group](https://beamline.io/components/chip-group.md)
- [Copy button](https://beamline.io/components/copy-button.md)
- [Description list](https://beamline.io/components/description-list.md)
- [Empty state](https://beamline.io/components/empty-state.md)
- [Glow](https://beamline.io/components/glow.md)
- [Kbd](https://beamline.io/components/kbd.md)
- [Label](https://beamline.io/components/label.md)
- [Search field](https://beamline.io/components/search-field.md)
- [Segmented control](https://beamline.io/components/segmented-control.md)
- [Select](https://beamline.io/components/select.md)
- [Skeleton](https://beamline.io/components/skeleton.md)
- [Spinner](https://beamline.io/components/spinner.md)
- [Switch](https://beamline.io/components/switch.md)
- [Text morph](https://beamline.io/components/text-morph.md)
- [Textarea](https://beamline.io/components/textarea.md)
- [Tooltip](https://beamline.io/components/tooltip.md)

## Dependencies

`lucide-react`

## Import

```tsx
import { RoomReadiness } from "@beamline/room-readiness";
```

## Get it

Room readiness is part of Beamline UI. Install the parts you need in your React app as compiled packages or editable source. [Get Beamline](https://beamline.io/checkout?pack=complete) · [Connect your agent](https://beamline.io/connect)

## More in Hotel & restaurant

- [Reservation desk](https://beamline.io/components/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…
- [Table service](https://beamline.io/components/table-service): 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…
- [Counter service](https://beamline.io/components/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…
- [Stay folio](https://beamline.io/components/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](https://beamline.io/components/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](https://beamline.io/components/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](https://beamline.io/components/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](https://beamline.io/components/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](https://beamline.io/components/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](https://beamline.io/). [Build your own style from any look; tokens, fonts, radii, motion; not only colours](https://beamline.io/docs/customize).
