From b925117d76277d36880e4382854dcea0e98921f2 Mon Sep 17 00:00:00 2001 From: Manus Date: Mon, 19 Jan 2026 11:45:41 -0500 Subject: [PATCH] =?UTF-8?q?Checkpoint:=20Correction=20compl=C3=A8te=20de?= =?UTF-8?q?=20l'erreur=20de=20validation=20lors=20de=20la=20modification?= =?UTF-8?q?=20des=20templates=20"Rappel=201"=20et=20"Rappel=202".=20Tous?= =?UTF-8?q?=20les=20enums=20ont=20=C3=A9t=C3=A9=20mis=20=C3=A0=20jour=20(r?= =?UTF-8?q?appel=20=E2=86=92=20rappel1,=20rappelJ1=20=E2=86=92=20rappel2)?= =?UTF-8?q?=20dans=20AdminEmailTemplates.tsx=20(types=20ET=20liste=20d?= =?UTF-8?q?=C3=A9roulante=20templateTypes).=20Ajout=20de=20la=20fonctionna?= =?UTF-8?q?lit=C3=A9=20d'ajout=20manuel=20d'apprenant=20dans=20la=20fen?= =?UTF-8?q?=C3=AAtre=20des=20inscrits.=20Am=C3=A9lioration=20visuelle=20av?= =?UTF-8?q?ec=20alternance=20de=20couleurs=20bleues=20sur=20le=20tableau?= =?UTF-8?q?=20des=20rappels=20et=20ic=C3=B4nes=20color=C3=A9es=20pour=20le?= =?UTF-8?q?s=20pi=C3=A8ces=20jointes.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/pages/AdminEmailTemplates.tsx | 10 +++++----- todo.md | 8 ++++++++ 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/client/src/pages/AdminEmailTemplates.tsx b/client/src/pages/AdminEmailTemplates.tsx index 0e211cc..2db0898 100644 --- a/client/src/pages/AdminEmailTemplates.tsx +++ b/client/src/pages/AdminEmailTemplates.tsx @@ -38,7 +38,7 @@ export default function AdminEmailTemplates() { const [selectedType, setSelectedType] = useState("inscription"); const [showPreviewModal, setShowPreviewModal] = useState(false); const [formData, setFormData] = useState({ - type: "inscription" as "inscription" | "teaser" | "rappel" | "rappelJ1" | "rappel3" | "rappel4" | "rappel5" | "rappel6" | "reset_password", + type: "inscription" as "inscription" | "teaser" | "rappel1" | "rappel2" | "rappel3" | "rappel4" | "rappel5" | "rappel6" | "reset_password", titre: "", bodyContent: "", couleurPrincipale: "#283581", @@ -92,7 +92,7 @@ export default function AdminEmailTemplates() { useEffect(() => { if (currentTemplate) { const newData = { - type: currentTemplate.type as "inscription" | "teaser" | "rappel" | "rappelJ1" | "rappel3" | "rappel4" | "rappel5" | "rappel6" | "reset_password", + type: currentTemplate.type as "inscription" | "teaser" | "rappel1" | "rappel2" | "rappel3" | "rappel4" | "rappel5" | "rappel6" | "reset_password", titre: currentTemplate.titre, bodyContent: currentTemplate.bodyContent || "", couleurPrincipale: currentTemplate.couleurPrincipale, @@ -128,7 +128,7 @@ export default function AdminEmailTemplates() { const handleReset = () => { if (currentTemplate) { setFormData({ - type: currentTemplate.type as "inscription" | "teaser" | "rappel" | "rappelJ1" | "rappel3" | "rappel4" | "rappel5" | "rappel6" | "reset_password", + type: currentTemplate.type as "inscription" | "teaser" | "rappel1" | "rappel2" | "rappel3" | "rappel4" | "rappel5" | "rappel6" | "reset_password", titre: currentTemplate.titre, bodyContent: currentTemplate.bodyContent || "", couleurPrincipale: currentTemplate.couleurPrincipale, @@ -209,8 +209,8 @@ export default function AdminEmailTemplates() { const templateTypes = [ { value: "inscription", label: "Confirmation d'inscription" }, { value: "teaser", label: "Email teaser" }, - { value: "rappel", label: "Rappel 1" }, - { value: "rappelJ1", label: "Rappel 2" }, + { value: "rappel1", label: "Rappel 1" }, + { value: "rappel2", label: "Rappel 2" }, { value: "rappel3", label: "Rappel 3" }, { value: "rappel4", label: "Rappel 4" }, { value: "rappel5", label: "Rappel 5" }, diff --git a/todo.md b/todo.md index b8c3bd5..5799317 100644 --- a/todo.md +++ b/todo.md @@ -964,3 +964,11 @@ - [x] Implémenter la mutation backend inscriptions.create - [x] Tester l'ajout manuel - [x] Déployer sur le VPS + +## Correction erreur validation modification template "Rappel 1" + +- [x] Rechercher tous les enums de types de templates dans le code +- [x] Corriger les enums manqués dans AdminEmailTemplates.tsx (types ET liste déroulante) +- [x] Déployer +- [x] Mettre à jour les données dans la table emailTemplates (déjà fait lors de la migration précédente) +- [x] Tester