From 62644d544ee95e1e084353eecff44b7ab3f2615a Mon Sep 17 00:00:00 2001 From: Manus Sandbox Date: Sun, 23 Nov 2025 14:57:58 -0500 Subject: [PATCH] =?UTF-8?q?Checkpoint:=20Ajout=20du=20champ=20"Corps=20du?= =?UTF-8?q?=20message"=20dans=20l'interface=20de=20gestion=20des=20templat?= =?UTF-8?q?es=20d'emails.=20Les=20utilisateurs=20peuvent=20maintenant=20pe?= =?UTF-8?q?rsonnaliser=20le=20contenu=20principal=20de=20leurs=20emails=20?= =?UTF-8?q?automatiques=20(confirmation,=20teaser,=20rappel)=20en=20plus?= =?UTF-8?q?=20du=20titre,=20des=20couleurs=20et=20du=20pied=20de=20page.?= =?UTF-8?q?=20Le=20champ=20accepte=20du=20texte=20simple=20et=20affiche=20?= =?UTF-8?q?une=20pr=C3=A9visualisation=20en=20temps=20r=C3=A9el.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .manus/db/db-query-1763927802607.json | 9 + client/src/const.ts | 2 +- client/src/pages/AdminEmailTemplates.tsx | 20 + drizzle/0013_demonic_trish_tilby.sql | 1 + drizzle/meta/0013_snapshot.json | 861 +++++++++++++++++++++++ drizzle/meta/_journal.json | 7 + drizzle/schema.ts | 2 + server/_core/cookies.ts | 2 +- todo.md | 14 + 9 files changed, 916 insertions(+), 2 deletions(-) create mode 100644 .manus/db/db-query-1763927802607.json create mode 100644 drizzle/0013_demonic_trish_tilby.sql create mode 100644 drizzle/meta/0013_snapshot.json diff --git a/.manus/db/db-query-1763927802607.json b/.manus/db/db-query-1763927802607.json new file mode 100644 index 0000000..9d4178e --- /dev/null +++ b/.manus/db/db-query-1763927802607.json @@ -0,0 +1,9 @@ +{ + "query": "ALTER TABLE emailTemplates ADD COLUMN bodyContent TEXT AFTER footerText;", + "command": "mysql --batch --raw --column-names --default-character-set=utf8mb4 --host gateway02.us-east-1.prod.aws.tidbcloud.com --port 4000 --user 4CrrYuB5tme73Qo.root --database 7PAT67UmWoxv8vwp8Bbcv6 --execute ALTER TABLE emailTemplates ADD COLUMN bodyContent TEXT AFTER footerText;", + "rows": [], + "messages": [], + "stdout": "", + "stderr": "", + "execution_time_ms": 602 +} \ No newline at end of file diff --git a/client/src/const.ts b/client/src/const.ts index 08f9c00..fc72d42 100644 --- a/client/src/const.ts +++ b/client/src/const.ts @@ -2,7 +2,7 @@ export { COOKIE_NAME, ONE_YEAR_MS } from "@shared/const"; export const APP_TITLE = import.meta.env.VITE_APP_TITLE || "App"; -export const APP_LOGO = "https://placehold.co/128x128/E1E7EF/1F2937?text=App"; +export const APP_LOGO = "/itinova-logo.png"; // Generate login URL at runtime so redirect URI reflects the current origin. export const getLoginUrl = () => { diff --git a/client/src/pages/AdminEmailTemplates.tsx b/client/src/pages/AdminEmailTemplates.tsx index 148ebc9..8b6acb9 100644 --- a/client/src/pages/AdminEmailTemplates.tsx +++ b/client/src/pages/AdminEmailTemplates.tsx @@ -32,6 +32,7 @@ export default function AdminEmailTemplates() { headerBgColor: "#2563eb", headerTextColor: "#ffffff", headerTitle: "Formation Manager Itinova", + bodyContent: "", footerText: "", active: true, }); @@ -73,6 +74,7 @@ export default function AdminEmailTemplates() { headerBgColor: currentTemplate.headerBgColor, headerTextColor: currentTemplate.headerTextColor, headerTitle: currentTemplate.headerTitle, + bodyContent: currentTemplate.bodyContent || "", footerText: currentTemplate.footerText || "", active: currentTemplate.active, }); @@ -83,6 +85,7 @@ export default function AdminEmailTemplates() { upsertMutation.mutate({ ...formData, logoUrl: formData.logoUrl || null, + bodyContent: formData.bodyContent || null, footerText: formData.footerText || null, }); }; @@ -97,6 +100,7 @@ export default function AdminEmailTemplates() { headerBgColor: currentTemplate.headerBgColor, headerTextColor: currentTemplate.headerTextColor, headerTitle: currentTemplate.headerTitle, + bodyContent: currentTemplate.bodyContent || "", footerText: currentTemplate.footerText || "", active: currentTemplate.active, }); @@ -136,9 +140,11 @@ export default function AdminEmailTemplates() {

${formData.headerTitle}

+ ${formData.bodyContent ? formData.bodyContent.replace(/\n/g, '
') : `

Exemple de contenu

Bonjour,

Ceci est un exemple de prévisualisation de votre template d'email personnalisé.

+ `}

Information importante

Ce bloc utilise la couleur principale que vous avez choisie.

@@ -313,6 +319,20 @@ export default function AdminEmailTemplates() { />
+
+ +