Checkpoint: Ajout d'un template d'email personnalisable pour l'envoi des attestations de formation. Le template utilise des variables dynamiques ({{prenomApprenant}}, {{nomApprenant}}, {{nomFormation}}) et peut être modifié depuis l'interface de gestion des templates. Déployé sur le VPS avec migration SQL.

This commit is contained in:
Manus
2026-01-29 11:58:20 -05:00
parent a221deb4f1
commit 493366fa10
12 changed files with 6931 additions and 20 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -71,6 +71,27 @@
"when": 1769704162958,
"tag": "0009_nervous_nomad",
"breakpoints": true
},
{
"idx": 10,
"version": "5",
"when": 1769705449970,
"tag": "0010_fixed_slipstream",
"breakpoints": true
},
{
"idx": 11,
"version": "5",
"when": 1769705509311,
"tag": "0011_lucky_the_liberteens",
"breakpoints": true
},
{
"idx": 12,
"version": "5",
"when": 1769705546694,
"tag": "0012_puzzling_baron_zemo",
"breakpoints": true
}
]
}

View File

@@ -191,7 +191,7 @@ export type InsertEmailConfig = typeof emailConfig.$inferInsert;
export const emailTemplates = mysqlTable("emailTemplates", {
id: int("id").autoincrement().primaryKey(),
/** Type de template (inscription, teaser, rappel1, rappel2, rappel3, rappel4, rappel5, rappel6, reset_password) */
type: mysqlEnum("type", ["inscription", "teaser", "rappel1", "rappel2", "rappel3", "rappel4", "rappel5", "rappel6", "reset_password"]).notNull().unique(),
type: mysqlEnum("type", ["inscription", "teaser", "rappel", "rappelJ1", "rappel1", "rappel2", "rappel3", "rappel4", "rappel5", "rappel6", "reset_password", "attestation"]).notNull().unique(),
titre: varchar("titre", { length: 255 }).notNull(),
/** Corps du message avec variables dynamiques */
bodyContent: text("bodyContent").notNull(),