feat: add reusable content fragments

This commit is contained in:
2026-08-07 14:53:34 +02:00
parent 6f8a70f864
commit 21ed6270a3
7 changed files with 192 additions and 2 deletions
+1
View File
@@ -13,6 +13,7 @@ export type TemplateType =
| "form_letter"
| "list_layout"
| "email"
| "content_fragment"
| "generic";
export type TemplateFieldType =
@@ -70,6 +70,7 @@ const TEMPLATE_TYPES: Array<{ value: TemplateType; label: string }> = [
{ value: "form_letter", label: "Form letter" },
{ value: "list_layout", label: "List layout" },
{ value: "email", label: "Email" },
{ value: "content_fragment", label: "Content fragment" },
{ value: "generic", label: "Generic" }
];
@@ -551,7 +552,11 @@ function emptyPayload(templateType: TemplateType = "form_letter"): TemplatePaylo
scope_type: "tenant",
scope_id: null,
template_type: templateType,
usages: [templateType === "email" ? "campaign.email" : "campaign.postal"],
usages: templateType === "email"
? ["campaign.email", "campaign.content"]
: templateType === "content_fragment"
? ["campaign.content"]
: ["campaign.postal"],
locale: "en",
required_fields: [],
output_profiles: [],