feat: add language preference for customers to support invoice locali… (#561)

* feat: add language preference for customers to support invoice localization

- Introduced language support for invoices, allowing customers to choose between Swedish and English.
- Updated invoice PDF generation to reflect the selected language for titles, labels, and messages.
- Enhanced email templates to generate content in the customer's preferred language.
- Added migration to include a language column in the customers table with a default value of Swedish.
- Updated tests to verify correct language usage in invoice emails and PDFs.

* fix: debounce API requests in InvoicePreviewCard and update F-skatt terminology in email templates
This commit is contained in:
Mattsson
2026-05-22 15:21:05 +02:00
committed by GitHub
parent 64bbeb4021
commit 78c91e00e4
21 changed files with 807 additions and 342 deletions
+1
View File
@@ -266,6 +266,7 @@ export const CreateCustomerSchema = z.object({
.regex(/^(\d{6}|\d{8})[-+]?\d{4}$/, 'Invalid personal number')
.optional()
.nullable(),
language: z.enum(['sv', 'en']).optional(),
default_payment_terms: z.number().int().positive().optional(),
notes: z.string().optional(),
})