- Throughput: new "Throughput Overview" header with Gauge icon and brand-green badge icons on each card (Today, This week, 4-week average, Horse Mix, Grain Mix) - Throughput: inline rolling-range selector (7d / 4w / 6w / 12w, default 4 weeks) driving the customer-mix cards; stats window widened to 12 weeks so switching range is a pure client-side re-filter - Throughput: cards collapse to a single even 5-across row on laptop and up, with container-query value text that scales to each card's width - Throughput: date logic pinned to Australian Eastern time (fixes the day-early date); This week subtitle shows the Mon-Sun date range - Throughput: subtler tinted add-form; removed the inline-entry kicker and the "Open full form" link - Topbar: fix cramped laptop header - action toggles no longer wrap above the user button; search drops to its own row earlier Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
18 lines
510 B
TypeScript
18 lines
510 B
TypeScript
import { hasStoredClientSession } from '$lib/session';
|
|
import { api } from '$lib/api';
|
|
import type { OrderingCustomer } from '$lib/types';
|
|
|
|
// Customer accounts. Access enforced by the family +layout.ts guard.
|
|
export async function load({ fetch }) {
|
|
if (!hasStoredClientSession()) {
|
|
return { customers: [] as OrderingCustomer[] };
|
|
}
|
|
|
|
try {
|
|
const customers = await api.orderingAdmin.customers(fetch);
|
|
return { customers };
|
|
} catch {
|
|
return { customers: [] as OrderingCustomer[] };
|
|
}
|
|
}
|