feat: add reusable content fragments
This commit is contained in:
@@ -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: [],
|
||||
|
||||
Reference in New Issue
Block a user