Services & products
Bookable services, products and bundles (codes for sessions booked later), shown in Shop blocks — in this order, highest priority first.
{#if form?.message}
{form.message}
{/if}
{#snippet thumbnail(item: ItemRecord)}
{#if item.imageUrl}

{:else}
{/if}
{/snippet}
{#snippet priorityNote(item: ItemRecord)}
{#if item.priority}
Priority {item.priority}{/if}
{/snippet}
{#snippet typeBadge(item: ItemRecord)}
{item.type === 'item_with_time' ? 'Service' : item.type === 'bundle' ? 'Bundle' : 'Product'}
{/snippet}
{#snippet price(item: ItemRecord)}{item.durations.length > 1 ? `from ${money.format(item.price)}` : money.format(item.price)}{/snippet}
{#snippet details(item: ItemRecord)}
{#if item.type === 'item_with_time'}
{durationList(item)}{item.bufferMinutes ? ` + ${item.bufferMinutes} min get-ready` : ''}{(item.capacity ?? 1) > 1 ? ` · ${item.capacity} places` : ''}
{:else if item.type === 'bundle'}
{bundleList(item)} · {item.validMonths ? `valid ${item.validMonths} months` : 'no expiry'}
{:else}—{/if}
{/snippet}
{#snippet status(item: ItemRecord, problem: string)}
{#if problem}
Not on sale
{:else}
{item.active ? 'Active' : 'Inactive'}
{/if}
{/snippet}
{#snippet notes(problem: string, waiting: number)}
{#if problem}
{problem}
{/if}
{#if waiting}
{waiting === 1 ? '1 code has' : `${waiting} codes have`} sessions of this left to book — they can’t while it’s inactive.
{/if}
{/snippet}
{#each items as item (item.id)}
{@const problem = item.type === 'bundle' && item.active ? bundleProblem(item) : ''}
{@const waiting = !item.active && item.type === 'item_with_time' ? (data.waiting[item.id] ?? 0) : 0}
-
{@render thumbnail(item)}
{item.name}
{@render priorityNote(item)}
{@render typeBadge(item)}
{@render status(item, problem)}
{@render price(item)}{item.type === 'item' ? ` · stock ${item.stock ?? '∞'}` : ''}
{#if item.type !== 'item'}
{@render details(item)}
{/if}
{@render notes(problem, waiting)}
{:else}
- No items yet — create a service or product.
{/each}
| Name | Type | Price | Stock | Duration | Status | |
{#each items as item (item.id)}
{@const problem = item.type === 'bundle' && item.active ? bundleProblem(item) : ''}
{@const waiting = !item.active && item.type === 'item_with_time' ? (data.waiting[item.id] ?? 0) : 0}
{@render thumbnail(item)}
{item.name}
{@render priorityNote(item)}
|
{@render typeBadge(item)} |
{@render price(item)} |
{item.type === 'item' ? (item.stock ?? '∞') : '—'} |
{@render details(item)} |
{@render status(item, problem)}
{@render notes(problem, waiting)}
|
|
{:else}
| No items yet — create a service or product. |
{/each}