feat: initial commit — local services (backend + manager dashboard + waiter PWA)
Includes all work to date: - local_backend: FastAPI backend with products, orders, tables, shifts, cloud sync - manager_dashboard: React manager UI with product/category management, reports, settings - waiter_pwa: React PWA for waiter devices - Category reparent endpoint and UI - Waiter domain: local_ip sent on heartbeat, waiter_domain persisted from cloud response - QR code modal in AppInfoTab for waiter domain - Product form: number input spinners removed, category pre-selected on new product - Category row: count badge moved to far right Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
export default function StatCard({ label, value, sub, icon: Icon, accent, size = 'md' }) {
|
||||
const sizes = {
|
||||
sm: { val: 'text-2xl', pad: 'p-4' },
|
||||
md: { val: 'text-[28px]', pad: 'p-5' },
|
||||
lg: { val: 'text-4xl', pad: 'p-6' },
|
||||
}
|
||||
const s = sizes[size] || sizes.md
|
||||
return (
|
||||
<div className={`relative overflow-hidden rounded-lg border border-slate-200 bg-white ${s.pad} shadow-[0_1px_0_rgba(15,23,42,0.04)]`}>
|
||||
<div className="flex items-start justify-between">
|
||||
<div className="text-[11px] font-medium uppercase tracking-[0.1em] text-slate-500">{label}</div>
|
||||
{Icon && <Icon className="h-4 w-4 text-slate-300" />}
|
||||
</div>
|
||||
<div className={`mt-2 font-mono ${s.val} font-medium tabular-nums tracking-tight ${accent ? 'text-sky-600' : 'text-slate-900'}`}>
|
||||
{value ?? '—'}
|
||||
</div>
|
||||
{sub && <div className="mt-1 text-[12px] text-slate-500">{sub}</div>}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user