Bookings
A booking is a time interval during which a cabin is reserved for a specific meeting. Bookings live in Portable (the source of truth), and external calendars — Google Calendar and Microsoft Teams — only mirror them: a booking created in the interface appears in the calendars, and an event created in a calendar becomes a booking.
The Bookings tab
The Bookings tab on the cabin page is the cabin's schedule.
- Year, Month, Day — the scale. Year and month show the number of bookings per month and day; clicking a day opens it.
- Previous / Next — the neighbouring period, Today — back to today.
- In Day mode — a grid of the day with bookings and a red current-time line that moves by itself.
- The schedule updates in real time: no-shows, walk-ins and calendar events appear without reloading the page.
Every booking shows its time, subject and a source label:
| Label | Source |
|---|---|
| UI | created in the interface |
| API | created through the REST API |
| Walk-in | someone sat in the cabin without a booking |
| Teams | an event from Microsoft Teams (Outlook) |
| Meet | an event from Google Calendar |
Creating a booking
- New booking — a form: Subject, Start, End.
- Or drag with the mouse over an empty part of the day grid: the selection snaps to the company grid step and does not overlap busy intervals; on release the same form opens.
The server checks for overlaps in the same transaction as the write: if the slot is already taken, the booking is not created ("slot is already taken"). Holding the slot after the person leaves is a company setting (see below): for that whole time the slot is taken and a new booking cannot be created on it.
Editing and cancelling
- Clicking a booking opens the edit form: subject and time. Changes are checked for overlaps the same way as on creation and go out to every calendar.
- × on a booking — cancel. The event is deleted from every connected calendar.
How a booking drives the cabin
The server watches the bookings and the cabin state every 5 seconds and drives the cabin by itself:
| Situation | What the server does |
|---|---|
| A booking has started | switches the cabin to Work Api: light, ventilation, "busy" sign |
| Someone entered the cabin | the booking becomes active (the meeting took place) |
| Less than the extension threshold is left, someone is inside | extends the booking by one step — but not past the start of the next booking. If there is no room to extend, the cabin blinks its light once: time is running out |
| Nobody came within the no-show time | the booking is closed as no_show, the cabin is turned off, the event is deleted from the calendars — the room is freed |
| Someone was there and left, the cabin has been empty longer than the timeout | the booking is closed as completed. If they left before the end, the booking and the calendar event are shortened to the moment they left |
| The booking time is over | the booking is closed (completed if the meeting happened, otherwise no_show); calendar events are left alone — they are history now |
| Someone sat down without a booking | a Walk-in booking of one step from the current minute is created; it goes out to the calendars so the cabin is busy there too |
| No booking, the cabin is in Work Api | returns the cabin to its normal mode |
| The cabin's status is older than 10 minutes (the cabin is offline) | the watcher decides nothing: no commands, no no-show, no walk-in — stale data is not judged |
| The cabin is in firmware safe mode or its scales are off | the weight is not trusted: the booking stays open and the cabin is switched on by the schedule, but no-show, arrival and prolongation are not decided; the booking is closed as no_show when its time is over |
The server counts a no-show from the start of the booking or from the moment the cabin became free, whichever is later. A booking created retroactively cannot be "missed" before it was created.
Company booking policy
Profile → Booking system, the Booking behavior block (available to every employee). One policy for every source: the interface, the API and every calendar.
| Field | Default | Meaning |
|---|---|---|
| No-show timeout (min) | 5 | how long to wait for the person; the slot is held just as long after they leave |
| Booking time step (min) | 30 | the grid step, the walk-in length and the extension step |
| Prolong threshold (min) | 5 | how many minutes before the end to extend or blink |
| Calendar look-ahead (days) | 14 | how many days ahead events are pulled from external calendars (up to 365) |
Booking statuses
| Status | Meaning |
|---|---|
pending, confirmed | the booking exists; the meeting has not started yet or the person has not come |
active | someone is in the cabin |
completed | the meeting took place |
no_show | nobody came |
cancelled | cancelled |
conflict | a calendar event landed on an already taken slot; it does not take the slot and the event is deleted from every calendar |
pending, confirmed and active take the slot; the rest do not.
Calendar sync
Connecting calendars is described in Calendars: Google and Teams. The sync rules:
- Outward. Every creation, change and cancellation of a booking reaches every calendar of the cabin within seconds. On a failure the server retries.
- Inward. Once a minute the server pulls calendar events up to the company horizon. A new event becomes a booking with that calendar as its source; moving the event moves the booking.
- Echo. An event Portable created in a calendar itself is marked; it does not come back as a booking.
- Overlap. If a calendar event overlaps an existing booking, the existing one wins: the new booking gets the
conflictstatus and its event is deleted from every calendar.
Deleting an event in a calendar
The server reacts only to events the calendar explicitly marked as deleted. An event missing from the response (moved beyond the horizon, the API returned an incomplete list) is not treated as deleted.
| Who deleted it | What happens |
|---|---|
| In the calendar the booking came from | the person cancelled the meeting — the booking is cancelled |
| In a calendar that only mirrors the booking (for example a booking from the interface deleted in Google) | the event is created again: this calendar is not the booking's source |
To cancel a booking created in the interface or as a walk-in, cancel it in the interface.