feat(manager): design pass 1 — every page on <Page>, shared toolbars, fees under Online orders, QR codes under Tables, day stats reworked

From the owner's page-by-page review (2026-11-20):
- every page root is <Page> (scrolls, fills 1080p, 16:9 centred on
  ultrawides); not yet: products, management/tables, stock (next pass)
- /dashboard: more padding in cards (p-card), quieter secondary text,
  11px uppercase labels everywhere (text-overline)
- day stats: xl dialog, "● Day running · Opened …" as text, the six
  figures in equal boxes, "On tabs" in the payments bar, shared Tabs
- /tables: Segmented List / Map / QR codes (?view=; /online/qr redirects),
  filter chips + zones multi-select at one height, the card itself opens
  the table (button removed), cards ~20% wider
- /online-orders: shared Tabs with Settings (= the old /online/fees page,
  which redirects to ?tab=settings); orders fill the width
- contacts, customers, expenses: PageHeader + Toolbar + SearchInput +
  multi-select Dropdowns (kinds; statuses, categories); table cells
  vertically centred; the Spent tip opens on hover
- filterCards / filterContacts / filterExpenses take several values
  (unit tests added)
- docs/DESIGN.md: the design language (CS-20 in the pack README)
- tests/e2e/manager_layout.mjs: the page rule at 1920x1080 and 3440x1440;
  manager.mjs and manager_look.mjs follow the moved pages

Verified: manager build + lint (0 errors), unit tests (manager 99, ui 24,
i18n 31, api 25, access 8), i18n guard, manager_layout.mjs all passed,
manager.mjs 228 checks all passed. Not checked: the waiter app and the
terminal by eye (they only get the muted ink-2 token).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-20 11:23:30 +02:00
co-authored by Claude Opus 5.5
parent 26ba19cba5
commit 6f4ab23582
67 changed files with 535 additions and 356 deletions
@@ -14,7 +14,7 @@ import toast from 'react-hot-toast'
import { MonitorSmartphone, Plus } from 'lucide-react'
import { errorMessage, parseError } from '@xenia/api'
import { useTranslation, useFormat } from '@xenia/i18n'
import { Button, Dialog, EmptyState, Field, Input, Select, Spinner } from '@xenia/ui'
import { Button, Dialog, EmptyState, Field, Input, Page, Select, Spinner } from '@xenia/ui'
import client from '../../api/client'
import DeviceConfigFields from './DeviceConfigFields'
import { configInitial, deviceStatus, deviceUsage, hasRoom, linkTargets, normalizeCode } from './devicesLogic'
@@ -104,7 +104,7 @@ export default function DevicesPage() {
}
return (
<div className="p-6 lg:p-8 max-w-6xl grid gap-6">
<Page>
<div className="flex flex-wrap items-start gap-4 justify-between">
<p className="text-body text-ink-2 max-w-2xl">{t('devices.intro')}</p>
<Button icon={<Plus size={16} />} onClick={() => setDialog({ kind: 'pair' })}>{t('devices.pair')}</Button>
@@ -187,7 +187,7 @@ export default function DevicesPage() {
<RemoveDialog device={dialog.device} onClose={() => setDialog(null)}
onRemove={() => act(() => client.post(`/api/devices/${dialog.device.id}/revoke`))} />
)}
</div>
</Page>
)
}
@@ -8,7 +8,7 @@ import toast from 'react-hot-toast'
import { errorMessage } from '@xenia/api'
import { useAccess } from '@xenia/access'
import { useFormat, useTranslation } from '@xenia/i18n'
import { Button, EmptyState, Spinner } from '@xenia/ui'
import { Button, EmptyState, Page, Spinner } from '@xenia/ui'
import client from '../../api/client'
export default function LicensePage() {
@@ -68,7 +68,7 @@ export default function LicensePage() {
const sorted = [...modules].sort((a, b) => t(`modules:${a.key}.name`).localeCompare(t(`modules:${b.key}.name`)))
return (
<div className="p-6 lg:p-8 max-w-5xl grid gap-6">
<Page>
<section className="bg-surface border border-line rounded-card shadow-raised p-6 grid gap-4" data-testid="license-status">
<div className="flex flex-wrap items-center gap-3 justify-between">
<div>
@@ -129,6 +129,6 @@ export default function LicensePage() {
</tbody>
</table>
</section>
</div>
</Page>
)
}
@@ -9,7 +9,7 @@ import toast from 'react-hot-toast'
import { errorMessage } from '@xenia/api'
import { useAccess, useCan } from '@xenia/access'
import { useTranslation } from '@xenia/i18n'
import { Button, Dialog, EmptyState, Spinner, Switch } from '@xenia/ui'
import { Button, Dialog, EmptyState, Page, Spinner, Switch } from '@xenia/ui'
import client from '../../api/client'
import { moduleState, stoppedBy } from './modulesLogic'
@@ -79,7 +79,7 @@ function ModulesPage({ kinds, intro }) {
if (!modules) return <div className="p-8 flex justify-center"><Spinner /></div>
return (
<div className="p-6 lg:p-8 max-w-6xl grid gap-8">
<Page>
<div>
<p className="text-body text-ink-2 max-w-2xl">{intro}</p>
{!canManage && <p className="text-label text-ink-3 mt-1">{t('modules.readOnly')}</p>}
@@ -113,7 +113,7 @@ function ModulesPage({ kinds, intro }) {
</span>
)}
</Dialog>
</div>
</Page>
)
}