Slots | CMS

Slots

When you can be booked. A window (e.g. 09:00–12:00) takes bookings of the services you choose, at any of their lengths; each booking takes its time plus get-ready time out of the window. A group session is one service at a fixed time with places. Times are in {data.timezone}.

{#if form?.message}{/if} {#if bulkDone}
{bulkMessage(bulkDone)}
{/if} {#if !items.length}
Add a bookable service under Services & products first.
{/if} {#if data.slotsError}{/if}

{monthLabel}

{#each WEEKDAYS as weekday (weekday.day)}
{weekday.label}
{/each}
{#each gridKeys as key (key)} {@const daySlotList = slotsByDay.get(key) ?? []} {@const isToday = key === data.today}
{#each daySlotList.slice(0, MAX_CHIPS) as slot (slot.id)} {@const state = slotState(slot)} {/each} {#if daySlotList.length > MAX_CHIPS} {/if}
{/each}
{#each Object.entries(SLOT_STATE_LABELS) as [state, label] (state)} {label} {/each} — a booking blocks every other one overlapping it, including get-ready time. Click a day for its bookings and free time.
All slots in {monthLabel} ({monthSlots.length})
{#each monthSlots as slot (slot.id)} {@const state = slotState(slot)} {:else} {/each}
WhenKindServicesBookedStatus
{formatDateTime(slot.start, data.timezone)}–{formatTime(slot.end, data.timezone)} {slot.kind === 'window' ? 'Window' : 'Group session'} {serviceNames(slot)} {slot.kind === 'session' ? `${slot.booked + slot.held}/${slot.capacity}` : slot.booked + slot.held} {SLOT_STATE_LABELS[state]}
No slots this month — use “Generate slots” to fill it.
{#if daySlots.length}
    {#each daySlots as slot (slot.id)} {@const state = slotState(slot)}
  • {range(slot.start, slot.end)} {slot.kind === 'window' ? 'Window' : 'Group session'} · {serviceNames(slot)}{places(slot) ? ` · ${places(slot)} places` : ''} {#if slot.kind === 'window'}{freeLabel(slot)} · {startTimesLabel(slot.startTimes ?? 'grid', slot.gridMinutes)}{:else if state === 'blocked'}{describe(slot, state)}{:else}{formatDuration(slot.minutes ?? 0)}{/if} {#if slot.notes}{slot.notes}{/if} {SLOT_STATE_LABELS[state]}
  • {/each}
{:else}

No slots on this day{serviceFilter ? ' for this service' : ''}.

{/if} {#if dayBookings.length}

Bookings

    {#each dayBookings as booking (`${booking.slot}|${booking.start}|${booking.status}|${booking.item}`)}
  • {range(booking.start, booking.end)} {booking.itemName}{booking.quantity > 1 ? ` · ${booking.quantity} places` : ''} {#if booking.readyAt !== booking.end} · ready again {formatTime(booking.readyAt, data.timezone)}{/if} {booking.status === 'booked' ? 'Booked' : 'In a basket'}
  • {/each}

Customer details are under Orders.

{/if}
{#if editorError}{/if} {#if !draft.id} (v === 'window' ? 'Window' : 'Group session')} onChange={(v) => (draft.kind = v as SlotKind)} /> {/if} {#if draft.kind === 'window'} {#if taken}
{[draft.booked && `${draft.booked} booked`, draft.held && `${draft.held} in a customer’s basket`].filter(Boolean).join(', ')} — the window can grow or change services, but must still cover every booked time.
{/if}
Services that can be booked in this window
{#each items as item (item.id)} {/each}
START_TIMES_LABELS[v as StartTimesMode]} onChange={(v) => (draft.startTimes = v as StartTimesMode)} /> {#if draft.startTimes === 'grid'} {/if} {startTimesHint(draft.startTimes, draft.gridMinutes)}
{:else} {#if sessionLocked}
{[draft.booked && `${draft.booked} booked`, draft.held && `${draft.held} in a customer’s basket`].filter(Boolean).join(', ')} — only the places and notes can be changed.
{/if}
{/if}