diff --git a/manager_dashboard/src/pages/reports/expenses/ExpensesReport.jsx b/manager_dashboard/src/pages/reports/expenses/ExpensesReport.jsx
index bc925c7..ec0bb79 100644
--- a/manager_dashboard/src/pages/reports/expenses/ExpensesReport.jsx
+++ b/manager_dashboard/src/pages/reports/expenses/ExpensesReport.jsx
@@ -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 (
- {allowDay && (
-
- {['range', 'day'].map(m => (
-
- ))}
-
- )}
- {value.mode === 'range' ? (<>
-
-
-
- {['today', 'week', 'month', 'thirty'].map(k => (
-
- ))}
-
- >) : (
-
- )}
-
- {right}
- {problem &&
{t(`reports.rangeProblem.${problem}`)}
}
+
)
}
diff --git a/manager_dashboard/src/pages/reports/kit/parts.jsx b/manager_dashboard/src/pages/reports/kit/parts.jsx
index 80733a2..049d048 100644
--- a/manager_dashboard/src/pages/reports/kit/parts.jsx
+++ b/manager_dashboard/src/pages/reports/kit/parts.jsx
@@ -7,7 +7,7 @@ import toast from 'react-hot-toast'
import { ArrowDown, ArrowUp, Download, Info } from 'lucide-react'
import { errorMessage } from '@xenia/api'
import { useFormat, useTranslation } from '@xenia/i18n'
-import { Button, EmptyState, InfoTip, Page, Spinner, cx } from '@xenia/ui'
+import { Button, EmptyState, InfoTip, Page, PageHeader, Spinner, Tabs, cx } from '@xenia/ui'
import client from '../../../api/client'
import { sortRows } from './reportLogic'
@@ -17,21 +17,11 @@ export function ReportPage({ title, tabs = [], children, testId }) {
const active = tabs.find(t => t.id === params.get('tab'))?.id ?? tabs[0]?.id
const tab = tabs.find(t => t.id === active)
return (
-
-
- {title}
- {tabs.length > 1 && (
-
- )}
-
- {tab ? : children}
+ 1 ? ({ id: t.id, label: t.label, testId: `report-tab-${t.id}` }))}
+ onChange={id => setParams(p => { const n = new URLSearchParams(p); n.set('tab', id); return n }, { replace: true })} /> : undefined}>
+
+ {tab ? : children}
)
}
@@ -149,5 +139,5 @@ export function ExportButton({ endpoint, params, filename }) {
setTimeout(() => URL.revokeObjectURL(url), 1000)
} catch (err) { toast.error(errorMessage(err, t)) } finally { setBusy(false) }
}
- return } loading={busy} onClick={run} data-testid="report-export">{t('reports.export')}
+ return } loading={busy} onClick={run} data-testid="report-export">{t('reports.export')}
}
diff --git a/manager_dashboard/src/pages/reports/prepzones/PrepZonesReport.jsx b/manager_dashboard/src/pages/reports/prepzones/PrepZonesReport.jsx
index 915e33e..56663e9 100644
--- a/manager_dashboard/src/pages/reports/prepzones/PrepZonesReport.jsx
+++ b/manager_dashboard/src/pages/reports/prepzones/PrepZonesReport.jsx
@@ -82,9 +82,9 @@ function ZoneCard({ zone: z, period }) {
{z.notification_name && {z.notification_name}}
{z.printers.map(p => {p.name})}}
actions={
- } onClick={products} disabled={!z.all_products.length}>{t('reports.zones.productsCsv')}
- } onClick={ordersCsv} disabled={!z.all_orders.length}>{t('reports.zones.ordersCsv')}
- } onClick={() => setPrinting(true)}>{t('reports.print.button')}
+ } onClick={products} disabled={!z.all_products.length}>{t('reports.zones.productsCsv')}
+ } onClick={ordersCsv} disabled={!z.all_orders.length}>{t('reports.zones.ordersCsv')}
+ } onClick={() => setPrinting(true)}>{t('reports.print.button')}
}>
diff --git a/manager_dashboard/src/pages/reports/products/ProductsReport.jsx b/manager_dashboard/src/pages/reports/products/ProductsReport.jsx
index 5516260..19480a3 100644
--- a/manager_dashboard/src/pages/reports/products/ProductsReport.jsx
+++ b/manager_dashboard/src/pages/reports/products/ProductsReport.jsx
@@ -5,7 +5,7 @@
import { useState } from 'react'
import { Printer } from 'lucide-react'
import { useFormat, useTranslation } from '@xenia/i18n'
-import { Button, Select } from '@xenia/ui'
+import { Button, Dropdown } from '@xenia/ui'
import client from '../../../api/client'
import { useLiveQuery } from '../../../live/useLiveQuery'
import { BarList } from '../kit/charts'
@@ -67,9 +67,9 @@ function ProductsTab() {
- } onClick={() => setPrinting(true)}>{t('reports.print.button')}
+ } onClick={() => setPrinting(true)}>{t('reports.print.button')}
} />
-