feat: Remove 'Positionen' section from invoice template

Remove the unused invoice items elements from the admin invoice template:
- Remove 'invoice-items-header' and 'invoice-items-rows' palette items
- Remove 'Positionen' category from palette groups
- Remove these elements from the starter layout
- Remove IDs from INVOICE_LOCKED_TEXT_PALETTE_IDS
This commit is contained in:
2026-03-18 09:23:17 +01:00
parent 6dbf5a00c4
commit 5fb6f3303b

View File

@@ -39,8 +39,6 @@ const INVOICE_LOCKED_TEXT_PALETTE_IDS = new Set([
"customer-address",
"customer-email",
"customer-phone",
"invoice-items-header",
"invoice-items-rows",
"invoice-subtotal",
"invoice-tax",
"invoice-total",
@@ -295,29 +293,6 @@ const INVOICE_PALETTE_ITEMS: PaletteItem[] = [
defaultContent: (user) =>
`Tel.: ${user?.phoneNumber ?? ""}\nE-Mail: ${user?.email ?? ""}`,
},
{
id: "invoice-items-header",
category: "invoice-items",
label: "Positionen-Überschrift",
description: "Überschrift für die Rechnungspositionen",
width: 620,
fontSize: 16,
fontWeight: 700,
textAlign: "left",
defaultContent: () => "Pos. | Beschreibung | Menge | Einzelpreis | Gesamt",
},
{
id: "invoice-items-rows",
category: "invoice-items",
label: "Rechnungspositionen",
description: "Tabelle mit Rechnungspositionen",
width: 620,
fontSize: 14,
fontWeight: 400,
textAlign: "left",
defaultContent: () =>
"1 | Laboruntersuchung Probe #10307 | 1 | 45,00 € | 45,00 €\n2 | Milchprobenanalyse | 2 | 25,00 € | 50,00 €",
},
{
id: "invoice-subtotal",
category: "invoice-totals",
@@ -429,7 +404,6 @@ const INVOICE_PALETTE_GROUPS: Array<{ category: PaletteCategory; title: string }
{ category: "invoice-header", title: "Rechnungskopf" },
{ category: "customer-data", title: "Kundendaten" },
{ category: "issuer-data", title: "Aussteller" },
{ category: "invoice-items", title: "Positionen" },
{ category: "invoice-totals", title: "Beträge" },
{ category: "invoice-footer", title: "Fußbereich" },
{ category: "free-elements", title: "Freie Elemente" },
@@ -962,9 +936,6 @@ function createInvoiceStarterLayout(user: UserOption | null, paletteItems: Palet
createElementFromPalette(requirePaletteItem(paletteItems, "customer-address"), user, { x: 56, y: 246 }),
createElementFromPalette(requirePaletteItem(paletteItems, "customer-number"), user, { x: 56, y: 290 }),
horizontalLine(56, 330, 646),
createElementFromPalette(requirePaletteItem(paletteItems, "invoice-items-header"), user, { x: 56, y: 350 }),
createElementFromPalette(requirePaletteItem(paletteItems, "invoice-items-rows"), user, { x: 56, y: 380 }),
horizontalLine(56, 440, 646),
createElementFromPalette(requirePaletteItem(paletteItems, "invoice-subtotal"), user, { x: 500, y: 460 }),
createElementFromPalette(requirePaletteItem(paletteItems, "invoice-tax"), user, { x: 500, y: 486 }),
createElementFromPalette(requirePaletteItem(paletteItems, "invoice-total"), user, { x: 500, y: 520 }),