feat(manager): every report on the shared controls (one toolbar height, modern dropdowns, shared tabs)

- The period: one toolbar (range / day as a Segmented, dates, quick choices, the report's own
  filters and export / print on the right), every control 44 px; the business day a searchable
  Dropdown.
- Report filters (person, category, status, waiter, table, printer) are the shared Dropdown;
  export / print buttons as tall as the rest; trends' step a Segmented.
- A report's tabs are the shared tab strip above the page; a day's and an order's sections too.
- e2e: the floor editor's edge '+' and the layout check cover products, tables set-up and the
  channel prices.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-20 15:27:07 +02:00
co-authored by Claude Opus 5.5
parent 244e93f827
commit 9021373a6b
13 changed files with 71 additions and 93 deletions
@@ -4,7 +4,7 @@
// The period is filtered by the server (venue dates, 6.13a); categories / statuses are `finance.*` texts.
import { useState } from 'react'
import { useFormat, useTranslation } from '@xenia/i18n'
import { Button, Dialog, Select } from '@xenia/ui'
import { Button, Dialog, Dropdown } from '@xenia/ui'
import client from '../../../api/client'
import { useLiveQuery } from '../../../live/useLiveQuery'
import { Pill } from '../../overview/parts'
@@ -51,10 +51,10 @@ function Expenses() {
]
return (
<div className="grid gap-4">
<PeriodPicker value={period} onChange={setPeriod} allowDay={false} right={<span className="flex gap-2 items-end">
<Select size="sm" value={status} onChange={e => setStatus(e.target.value)} aria-label={t('reports.status')}
<PeriodPicker value={period} onChange={setPeriod} allowDay={false} right={<span className="flex flex-wrap gap-2 items-center">
<Dropdown value={status} onChange={v => setStatus(v)} aria-label={t('reports.status')}
options={[{ value: '', label: t('reports.store.anyStatus') }, ...['due', 'partial', 'paid'].map(s => ({ value: s, label: t(`finance.status.${s}`) }))]} />
<Select size="sm" value={category} onChange={e => setCategory(e.target.value)} aria-label={t('reports.prod.category')}
<Dropdown value={category} onChange={v => setCategory(v)} aria-label={t('reports.prod.category')}
options={[{ value: '', label: t('reports.prod.allCategories') }, ...CATEGORIES.map(c => ({ value: c, label: catName(c) }))]} />
</span>} />
{isPending ? <Loading /> : error ? <Failed error={error} retry={refetch} /> : (<>
@@ -65,7 +65,7 @@ function Expenses() {
</div>
{groups.length > 0 && (
<Panel title={t('reports.exp.split')} actions={<span className="flex gap-1">{['category', 'supplier'].map(s => (
<Button key={s} size="sm" variant={split === s ? 'primary' : 'ghost'} onClick={() => setSplit(s)}>{t(`reports.exp.by.${s}`)}</Button>))}</span>}>
<Button key={s} size="sm" variant={split === s ? 'secondary' : 'ghost'} aria-pressed={split === s} onClick={() => setSplit(s)}>{t(`reports.exp.by.${s}`)}</Button>))}</span>}>
<BarList testId="expenses-split" format={v => fmt.formatMoney(v)} rows={groups.map(g => ({ ...g, sub: g.due ? t('reports.exp.dueSub', { amount: fmt.formatMoney(g.due) }) : undefined }))} />
</Panel>
)}