# Booking

https://docs.kleaver.ie/modules/booking/

Visitors pick a day and time, fill in their details and get a confirmation by email, with cancel and reschedule links. This is a mock-up with sample availability (09:00–17:00 on Mondays, Wednesdays and Fridays): nothing is sent or saved. On a real site it is driven by scripts/booking.js and a booking service (services/booking), set up in the booking block of client.json. Notes are in COMPONENTS.md.

## Catalog

Booking and Status modules (in `components.css`)  ·  see **`book.html`**, **`modules.html#booking`** (mock-up, `scripts/booking-demo.js`), **`modules.html#status`**

| Component | Classes | Use for |
|---|---|---|
| Booking | `.booking[data-booking][data-booking-endpoint]` > `.booking__status` (`aria-live`), `.booking__fallback` (`{{booking.contact}}`), `.booking__types`, `.booking__summary`, `.booking__picker` > `.booking__calendar` + `.booking__times`, `.booking__form`, `.booking__done`, `.booking__manage`; state in `data-state="loading\|ready\|error\|done"` | Visitor booking against the Kleaver booking service (`services/booking`): date grid (ARIA grid, roving tabindex, arrows/Home/End/PageUp/PageDown), times as radios in the visitor's own time zone, details form with consent and honeypot, confirmation, and manage mode (`?manage=<token>`: cancel with a confirm step, change time). Driven by `scripts/booking.js`, which only booking pages load. Without JS, or when the service is down, only the owner's email/phone show. The page needs `<meta name="referrer" content="no-referrer">`. `build.js` writes the `/book-api/*` rewrite from `booking.serviceUrl`. |
| Status | `.status` (page column) > `.status__head` (`.status__title`, `.status__summary[data-state]`, `.status__checked`), `.status__banner[data-level="info\|minor\|major"]`, `.status__stale`, `.status__list` > `.status__row` > `.status__name`, `.status__badge[data-state="up\|degraded\|down\|unknown"]` > `.status__dot`, `.status__strip` > 30 × `.status__day[data-worst]`, `.status__uptime`; `.status__footer`; admin extras `.status__panel`, `.status__stats`, `.status__alert`, `.status__reveal`, `.status__loading`/`.status__spinner` | Public status page and private dashboard (`demo/status`) fed by the status service (`services/status`). Each state has a text label, never colour alone; a stale checker shows "Status unavailable", never green. Driven by `scripts/status.js` (public) and `scripts/status-admin.js` (admin), loaded only by those pages. Without JS only a notice and the contact email show. Static sample on `modules.html#status`. |

---
