diff --git a/backend/migrations/core/101_add_customer_gallery_assigned_template.js b/backend/migrations/core/101_add_customer_gallery_assigned_template.js new file mode 100644 index 00000000..557c400b --- /dev/null +++ b/backend/migrations/core/101_add_customer_gallery_assigned_template.js @@ -0,0 +1,243 @@ +/** + * Migration: Add `customer_gallery_assigned` email template. + * + * Sent when an admin adds new gallery assignments to an existing + * customer via the "Manage galleries" dialog on the customer detail + * page. Digest-style — one email per save listing every newly added + * gallery, not one email per gallery (admins often set up new clients + * by adding several galleries in a single sitting). + * + * Variables: + * - customer_name greeting name (display name / first name / email local) + * - gallery_count integer (string) — number of newly added galleries + * - singular "true" when count === 1 (drives intro wording) + * - multiple "true" when count > 1 + * - gallery_list_html pre-rendered