Dashboard | CMS {#snippet tile(label: string, value: string, note: string)}

{label}

{value}

{note}

{/snippet} {#snippet salesTable(rows: typeof dashboard.sales, nameOf: (row: (typeof dashboard.sales)[number]) => string, empty: string)} {#if rows.length} {#each rows as row, i (i)} {/each}
SoldIncome
{nameOf(row)}{row.count}{money(row.income)}
{:else}

{empty}

{/if} {/snippet}

Dashboard

How the studio is doing. Income is paid orders, in the month they were paid; hours are booked appointment time, with group sessions counted once.

Coming up

Next {dashboard.upcomingDays} days: {dashboard.upcoming.length} {dashboard.upcoming.length === 1 ? 'booking' : 'bookings'}, {hours(dashboard.upcomingMinutes)}

{#if upcomingDays.length}
{#each upcomingDays as day (day.key)}

{day.key === todayKey ? 'Today' : day.label}

    {#each day.bookings as booking, i (i)}
  • {timeLabel(booking.start)} {booking.name}{#if booking.quantity > 1} × {booking.quantity}{/if} {formatDuration(booking.minutes)}{#if booking.customer} · {booking.customer}{/if}
  • {/each}
{/each}
{:else}

Nothing booked in the next {dashboard.upcomingDays} days.

{/if} All orders

Needs attention

Sessions and codes: next {dashboard.attentionDays} days

{#if dashboard.attention.length} {:else}

✓ All clear: no failed emails, nearly full sessions or codes about to expire.

{/if}
{@render tile(`Income in ${thisMonthName}`, money(dashboard.thisMonth.income), `${incomeChange >= 0 ? '+' : '−'}${money(Math.abs(incomeChange))} on ${monthLabel(dashboard.lastMonth.month, { month: 'long' })}`)} {@render tile(`Hours worked in ${thisMonthName}`, hours(dashboard.minutesDoneThisMonth), `${hours(dashboard.minutesAheadThisMonth)} still booked`)} {@render tile( 'Opened time booked', utilisationPercent === null ? '—' : `${utilisationPercent} %`, dashboard.utilisation ? `${hours(dashboard.utilisation.booked)} of ${hours(dashboard.utilisation.open)} in Slots this month` : 'No slots opened this month' )} {@render tile('Codes owed', money(dashboard.valueOutstanding), `${dashboard.codesOutstanding} ${dashboard.codesOutstanding === 1 ? 'code' : 'codes'} with sessions to book`)}

Income

Per month, last {dashboard.months.length} months

Income in {dashboard.thisMonth.month.slice(0, 4)}

{money(dashboard.incomeThisYear)}

{dashboard.thisMonth.orders} {dashboard.thisMonth.orders === 1 ? 'order' : 'orders'} this month{#if dashboard.thisMonth.orders}, {money(dashboard.thisMonth.income / dashboard.thisMonth.orders)} on average{/if}

Show as table
{#each [...dashboard.months].reverse() as row (row.month)} {/each}
MonthOrdersIncomeHours
{monthLabel(row.month, { month: 'short', year: 'numeric' })} {row.orders} {money(row.income)} {hours(row.minutes)}

Customers

{dashboard.newCustomers + dashboard.returningCustomers} in {thisMonthName}: {dashboard.newCustomers} new, {dashboard.returningCustomers} returning

Regulars

{#if dashboard.regulars.length} {#each dashboard.regulars as regular, i (i)} {/each}
OrdersSpent
{regular.name}{regular.orders}{money(regular.spent)}
{:else}

Nobody has ordered more than once yet.

{/if}

What sells

{@render salesTable(dashboard.sales, (row) => row.name, 'Nothing sold yet.')}

Popular lengths

{@render salesTable(dashboard.lengths, (row) => `${row.name} · ${formatDuration(row.minutes)}`, 'No bookings yet.')}

Regulars, what sells and popular lengths cover the last {dashboard.months.length} months.