feat: Split customer address into separate fields in invoice template
Replace combined 'customer-address' with 4 separate elements: - customer-street (Straße) - customer-house-number (Hausnummer) - customer-postal-code (PLZ) - customer-city (Ort) Update starter layout to use new separate fields with appropriate positioning.
This commit is contained in:
@@ -36,7 +36,10 @@ const INVOICE_LOCKED_TEXT_PALETTE_IDS = new Set([
|
||||
"invoice-due-date",
|
||||
"customer-number",
|
||||
"customer-name",
|
||||
"customer-address",
|
||||
"customer-street",
|
||||
"customer-house-number",
|
||||
"customer-postal-code",
|
||||
"customer-city",
|
||||
"customer-email",
|
||||
"customer-phone",
|
||||
"invoice-subtotal",
|
||||
@@ -225,15 +228,48 @@ const INVOICE_PALETTE_ITEMS: PaletteItem[] = [
|
||||
defaultContent: () => "VoS, Dirk Schwissel",
|
||||
},
|
||||
{
|
||||
id: "customer-address",
|
||||
id: "customer-street",
|
||||
category: "customer-data",
|
||||
label: "Kundenadresse",
|
||||
description: "Adresse des Kunden",
|
||||
width: 280,
|
||||
label: "Kunden-Straße",
|
||||
description: "Straße des Kunden",
|
||||
width: 200,
|
||||
fontSize: 14,
|
||||
fontWeight: 400,
|
||||
textAlign: "left",
|
||||
defaultContent: () => "Musterstraße 123\n12345 Musterstadt",
|
||||
defaultContent: () => "Musterstraße",
|
||||
},
|
||||
{
|
||||
id: "customer-house-number",
|
||||
category: "customer-data",
|
||||
label: "Kunden-Hausnummer",
|
||||
description: "Hausnummer des Kunden",
|
||||
width: 80,
|
||||
fontSize: 14,
|
||||
fontWeight: 400,
|
||||
textAlign: "left",
|
||||
defaultContent: () => "123",
|
||||
},
|
||||
{
|
||||
id: "customer-postal-code",
|
||||
category: "customer-data",
|
||||
label: "Kunden-PLZ",
|
||||
description: "Postleitzahl des Kunden",
|
||||
width: 80,
|
||||
fontSize: 14,
|
||||
fontWeight: 400,
|
||||
textAlign: "left",
|
||||
defaultContent: () => "12345",
|
||||
},
|
||||
{
|
||||
id: "customer-city",
|
||||
category: "customer-data",
|
||||
label: "Kunden-Ort",
|
||||
description: "Ort des Kunden",
|
||||
width: 200,
|
||||
fontSize: 14,
|
||||
fontWeight: 400,
|
||||
textAlign: "left",
|
||||
defaultContent: () => "Musterstadt",
|
||||
},
|
||||
{
|
||||
id: "customer-email",
|
||||
@@ -922,7 +958,10 @@ function createInvoiceStarterLayout(user: UserOption | null, paletteItems: Palet
|
||||
createElementFromPalette(requirePaletteItem(paletteItems, "invoice-due-date"), user, { x: 480, y: 148 }),
|
||||
horizontalLine(56, 200, 646),
|
||||
createElementFromPalette(requirePaletteItem(paletteItems, "customer-name"), user, { x: 56, y: 220 }),
|
||||
createElementFromPalette(requirePaletteItem(paletteItems, "customer-address"), user, { x: 56, y: 246 }),
|
||||
createElementFromPalette(requirePaletteItem(paletteItems, "customer-street"), user, { x: 56, y: 246 }),
|
||||
createElementFromPalette(requirePaletteItem(paletteItems, "customer-house-number"), user, { x: 260, y: 246 }),
|
||||
createElementFromPalette(requirePaletteItem(paletteItems, "customer-postal-code"), user, { x: 56, y: 270 }),
|
||||
createElementFromPalette(requirePaletteItem(paletteItems, "customer-city"), user, { x: 140, y: 270 }),
|
||||
createElementFromPalette(requirePaletteItem(paletteItems, "customer-number"), user, { x: 56, y: 290 }),
|
||||
horizontalLine(56, 330, 646),
|
||||
createElementFromPalette(requirePaletteItem(paletteItems, "invoice-subtotal"), user, { x: 500, y: 460 }),
|
||||
|
||||
Reference in New Issue
Block a user