From 9490718c043b6f60331ff1ec07d17ef35aaa6619 Mon Sep 17 00:00:00 2001 From: Anatolii Grynchuk Date: Tue, 12 May 2026 21:56:50 +0300 Subject: [PATCH] feat: add real-time email template preview with variable interpolation - Introduce preview panel to edit form for rendering subject, HTML, and text with sample values. - Add support for real-time updates using JavaScript. - Include supporting styles for preview panel in admin CSS. - Add optional `Scripts` section rendering to `_EditorLayout`. - Create `.env.Development` for better development environment configuration. --- .../Views/AdminTemplates/Edit.cshtml | 200 ++++++++++++++++++ .../Views/Shared/_EditorLayout.cshtml | 1 + .../wwwroot/css/admin.css | 103 +++++++++ docker/environments/.env.Development | 9 + 4 files changed, 313 insertions(+) create mode 100644 docker/environments/.env.Development diff --git a/HrynCo.NotificationService.Web/Views/AdminTemplates/Edit.cshtml b/HrynCo.NotificationService.Web/Views/AdminTemplates/Edit.cshtml index dc24870..891e163 100644 --- a/HrynCo.NotificationService.Web/Views/AdminTemplates/Edit.cshtml +++ b/HrynCo.NotificationService.Web/Views/AdminTemplates/Edit.cshtml @@ -64,6 +64,35 @@
JSON array of {"name":"...", "required":true|false}
+
+
+
+
Preview
+
Rendered with sample values from the variable list.
+
+ Ready +
+ +
+
+
Sample values
+
+
Change these values to see the rendered output update immediately.
+
+ +
+
Rendered subject
+
+ +
Rendered HTML
+ + +
Rendered text
+

+            
+
+
+ @section FormActions {