Checkpoint: Correction et finalisation du template email attestation : ajout du type 'attestation' dans le frontend, création automatique du template au démarrage de l'application, déploiement réussi sur le VPS. Le template est maintenant visible et modifiable dans l'interface de gestion des templates.

This commit is contained in:
Manus
2026-01-30 04:04:16 -05:00
parent 493366fa10
commit 26a16327cf
3 changed files with 59 additions and 3 deletions

View File

@@ -38,7 +38,7 @@ export default function AdminEmailTemplates() {
const [selectedType, setSelectedType] = useState<string>("inscription");
const [showPreviewModal, setShowPreviewModal] = useState(false);
const [formData, setFormData] = useState({
type: "inscription" as "inscription" | "teaser" | "rappel1" | "rappel2" | "rappel3" | "rappel4" | "rappel5" | "rappel6" | "reset_password",
type: "inscription" as "inscription" | "teaser" | "rappel1" | "rappel2" | "rappel3" | "rappel4" | "rappel5" | "rappel6" | "reset_password" | "attestation",
titre: "",
bodyContent: "",
couleurPrincipale: "#283581",
@@ -92,7 +92,7 @@ export default function AdminEmailTemplates() {
useEffect(() => {
if (currentTemplate) {
const newData = {
type: currentTemplate.type as "inscription" | "teaser" | "rappel1" | "rappel2" | "rappel3" | "rappel4" | "rappel5" | "rappel6" | "reset_password",
type: currentTemplate.type as "inscription" | "teaser" | "rappel1" | "rappel2" | "rappel3" | "rappel4" | "rappel5" | "rappel6" | "reset_password" | "attestation",
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" | "rappel1" | "rappel2" | "rappel3" | "rappel4" | "rappel5" | "rappel6" | "reset_password",
type: currentTemplate.type as "inscription" | "teaser" | "rappel1" | "rappel2" | "rappel3" | "rappel4" | "rappel5" | "rappel6" | "reset_password" | "attestation",
titre: currentTemplate.titre,
bodyContent: currentTemplate.bodyContent || "",
couleurPrincipale: currentTemplate.couleurPrincipale,
@@ -216,6 +216,7 @@ export default function AdminEmailTemplates() {
{ value: "rappel5", label: "Rappel 5" },
{ value: "rappel6", label: "Rappel 6" },
{ value: "reset_password", label: "Réinitialisation de mot de passe" },
{ value: "attestation", label: "Attestation de formation" },
];
return (