Checkpoint: Rappels automatiques J-7 et J-1 finalisés avec templates personnalisés Itinova

- Correction du bug d'insertion SQL des rappels (champ derniereExecution)
- Création de la table rappels et des fonctions CRUD
- Implémentation du scheduler automatique (vérification toutes les heures)
- Personnalisation des templates J-7 et J-1 avec logo et couleurs Itinova (Bleu #283581, Bleu clair #0578BE, Orange #E94E1B, Vert #45ac34)
- Style sobre et professionnel appliqué
- Variable {{datesHTML}} pour afficher toutes les dates de chaque séquence
This commit is contained in:
Manus Sandbox
2025-12-01 03:34:08 -05:00
parent 548dbc12b9
commit 1255124c3d
6 changed files with 235 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
{
"query": "DROP TABLE IF EXISTS rappels;",
"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 DROP TABLE IF EXISTS rappels;",
"rows": [],
"messages": [],
"stdout": "",
"stderr": "",
"execution_time_ms": 1191
}

View File

@@ -0,0 +1,9 @@
{
"query": "CREATE TABLE IF NOT EXISTS `rappels` (\n `id` int AUTO_INCREMENT NOT NULL,\n `nom` varchar(255) NOT NULL,\n `templateType` varchar(50) NOT NULL,\n `joursAvant` int NOT NULL,\n `heureEnvoi` varchar(5) NOT NULL DEFAULT '09:00',\n `actif` boolean NOT NULL DEFAULT true,\n `derniereExecution` timestamp NULL,\n `createdAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,\n `updatedAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,\n CONSTRAINT `rappels_id` PRIMARY KEY(`id`)\n);",
"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 CREATE TABLE IF NOT EXISTS `rappels` (\n `id` int AUTO_INCREMENT NOT NULL,\n `nom` varchar(255) NOT NULL,\n `templateType` varchar(50) NOT NULL,\n `joursAvant` int NOT NULL,\n `heureEnvoi` varchar(5) NOT NULL DEFAULT '09:00',\n `actif` boolean NOT NULL DEFAULT true,\n `derniereExecution` timestamp NULL,\n `createdAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,\n `updatedAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,\n CONSTRAINT `rappels_id` PRIMARY KEY(`id`)\n);",
"rows": [],
"messages": [],
"stdout": "",
"stderr": "",
"execution_time_ms": 188
}

View File

@@ -0,0 +1,19 @@
{
"query": "SELECT type, name, LEFT(bodyContent, 200) as preview FROM emailTemplates WHERE type IN ('rappel', 'rappelJ1')",
"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 SELECT type, name, LEFT(bodyContent, 200) as preview FROM emailTemplates WHERE type IN ('rappel', 'rappelJ1')",
"rows": [
{
"type": "rappel",
"name": "Rappel J-7",
"preview": ""
}
],
"messages": [
"<div style=\"font-family: Arial, sans-serif; max-width: 600px; margin: 0 auto; background-color: #ffffff;\">",
" <!-- En-tête avec logo -->",
" <div style=\"background-color: #283581; padding: 30px 20px; te"
],
"stdout": "type\tname\tpreview\nrappel\tRappel J-7\t\n<div style=\"font-family: Arial, sans-serif; max-width: 600px; margin: 0 auto; background-color: #ffffff;\">\n <!-- En-tête avec logo -->\n <div style=\"background-color: #283581; padding: 30px 20px; te\n",
"stderr": "",
"execution_time_ms": 55
}