feat: widget icons, dark theme tables, breadcrumb removal, bookkeeping rework, personal equipment pages, PDF/order improvements

This commit is contained in:
Matthias Hochmeister
2026-04-14 10:35:40 +02:00
parent 4c4fb01e68
commit 4fbea8af81
41 changed files with 679 additions and 659 deletions

View File

@@ -474,11 +474,20 @@ export default function BestellungDetail() {
doc.text('Bestellinformationen', 10, curY);
curY += 5;
row('Bezeichnung', bestellung.bezeichnung);
row('Status', BESTELLUNG_STATUS_LABELS[bestellung.status]);
row('Erstellt am', formatDate(bestellung.erstellt_am));
if (bestellung.bestellt_am) row('Bestelldatum', formatDate(bestellung.bestellt_am));
curY += 5;
// ── Place and date ──
doc.setFontSize(10);
doc.setFont('helvetica', 'normal');
const pageWidth = doc.internal.pageSize.width;
const dateStr = bestellung.bestellt_am
? new Date(bestellung.bestellt_am).toLocaleDateString('de-DE', { day: '2-digit', month: '2-digit', year: 'numeric' })
: new Date().toLocaleDateString('de-DE', { day: '2-digit', month: '2-digit', year: 'numeric' });
doc.text(`St. Valentin, am ${dateStr}`, pageWidth - 10, curY, { align: 'right' });
curY += 8;
// ── Line items table ──
const steuersatz = (parseFloat(String(bestellung.steuersatz)) || 20) / 100;
const hasPrices = positionen.some((p) => p.einzelpreis != null && p.einzelpreis > 0);
@@ -619,13 +628,6 @@ export default function BestellungDetail() {
doc.setFont('helvetica', 'normal');
doc.setTextColor(0, 0, 0);
// Place and date (right-aligned, above signature line)
const today = new Date();
const dd = String(today.getDate()).padStart(2, '0');
const mm = String(today.getMonth() + 1).padStart(2, '0');
const yyyy = today.getFullYear();
doc.text(`St. Valentin, am ${dd}.${mm}.${yyyy}`, 200, curY - 6, { align: 'right' });
// Signature line (right)
doc.line(120, curY, 200, curY);
@@ -673,22 +675,20 @@ export default function BestellungDetail() {
<PageHeader
title={bestellung.bezeichnung}
backTo="/bestellungen"
breadcrumbs={[
{ label: 'Bestellungen', href: '/bestellungen' },
{ label: bestellung.bezeichnung },
]}
actions={
<Box sx={{ display: 'flex', alignItems: 'center', gap: 1 }}>
{canExport && !editMode && (
<Tooltip title={bestellung.status === 'entwurf' || bestellung.status === 'wartet_auf_genehmigung' ? 'Export erst nach Genehmigung verfügbar' : 'PDF Export'}>
<span>
<IconButton
<Button
variant="outlined"
size="small"
startIcon={<PdfIcon />}
onClick={generateBestellungDetailPdf}
color="primary"
disabled={bestellung.status === 'entwurf' || bestellung.status === 'wartet_auf_genehmigung'}
>
<PdfIcon />
</IconButton>
Export
</Button>
</span>
</Tooltip>
)}