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