feat(email): WYSIWYG template editor with variable substitution

- Add emailSubject{De,En} + emailBodyHtml{De,En} to ShopSettings
- New RichTextEditor component (TipTap) with toolbar + variable insert
- Settings UI: Email templates section per language
- email.server.ts: substitute {{var}} placeholders, fall back to defaults
- Default vars: invoiceNumber, customerName, customerFirstName, orderName,
  totalGross, dueDate, companyName, ownerName
This commit is contained in:
Gerhard Scheikl
2026-05-08 23:06:40 +02:00
parent 537dfd34cb
commit 04933fcac6
8 changed files with 1120 additions and 11 deletions
+6
View File
@@ -93,6 +93,12 @@ model ShopSettings {
smtpFromEmail String @default("")
smtpReplyTo String @default("")
// Email templates (HTML, with {{var}} placeholders). Empty = use defaults.
emailSubjectDe String @default("")
emailBodyHtmlDe String @default("")
emailSubjectEn String @default("")
emailBodyHtmlEn String @default("")
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt