This commit is contained in:
Matthias Hochmeister
2026-03-26 14:22:35 +01:00
parent 3c95b7506b
commit c29b21f714
9 changed files with 400 additions and 103 deletions

View File

@@ -59,7 +59,7 @@ const TAB_COUNT = 2;
// ── Status options ──
const ALL_STATUSES: BestellungStatus[] = ['entwurf', 'erstellt', 'bestellt', 'teillieferung', 'vollstaendig', 'abgeschlossen'];
const ALL_STATUSES: BestellungStatus[] = ['entwurf', 'wartet_auf_genehmigung', 'bereit_zur_bestellung', 'bestellt', 'teillieferung', 'lieferung_pruefen', 'abgeschlossen'];
const DEFAULT_EXCLUDED_STATUSES: BestellungStatus[] = ['abgeschlossen'];
// ── Kennung formatter ──
@@ -262,10 +262,10 @@ export default function Bestellungen() {
{/* ── Summary Cards ── */}
<Grid container spacing={2} sx={{ mb: 3 }}>
{[
{ label: 'Noch nicht bestellt', count: orders.filter(o => o.status === 'entwurf' || o.status === 'erstellt').length, color: 'text.secondary' },
{ label: 'Bestellt', count: orders.filter(o => o.status === 'bestellt').length, color: 'primary.main' },
{ label: 'Entwurf / Genehmigung', count: orders.filter(o => o.status === 'entwurf' || o.status === 'wartet_auf_genehmigung').length, color: 'text.secondary' },
{ label: 'Bereit / Bestellt', count: orders.filter(o => o.status === 'bereit_zur_bestellung' || o.status === 'bestellt').length, color: 'primary.main' },
{ label: 'Teillieferung', count: orders.filter(o => o.status === 'teillieferung').length, color: 'warning.main' },
{ label: 'Vollständig', count: orders.filter(o => o.status === 'vollstaendig').length, color: 'success.main' },
{ label: 'Lieferung prüfen', count: orders.filter(o => o.status === 'lieferung_pruefen').length, color: 'secondary.main' },
{ label: 'Gesamt', count: orders.length, color: 'text.primary' },
].map(({ label, count, color }) => (
<Grid item xs={6} sm={4} md={2} key={label}>