Checkpoint: Correction des erreurs sur la page rapport-public-cible et harmonisation de la charte graphique des titres :
**Corrections d'erreurs :** 1. **Erreurs SQL DATE_FORMAT corrigées** (analyticsDb.ts) : - Remplacement des sous-requêtes corrélées par des JOIN dans getTauxRemplissageByMonth() - Utilisation de COUNT(CASE WHEN...) au lieu de SUM(SELECT COUNT(*)) - Ajout de leftJoin pour éviter les erreurs de sous-requêtes 2. **Erreur React "Cannot read properties of null" corrigée** (AdminRapportPublicCible.tsx) : - Ajout de l'opérateur null-safe `?.` pour accéder à `insc.apprenant?.fonction` - Vérification explicite si la fonction est null/undefined - Gestion du cas "public cible = tous" qui correspond toujours 3. **Tests réussis** : - Page rapport-public-cible : affiche correctement les statistiques et recommandations - Tableau de bord analytique : graphiques et statistiques fonctionnels - Page suivi questionnaires : affiche correctement les données **Harmonisation charte graphique :** - Application du style bleu clair (#6B9FE8) avec ombre portée à tous les titres des 32 pages - Création de la classe CSS `.page-title` réutilisable dans index.css - Cohérence visuelle sur toute l'application **Résultat :** ✅ Toutes les erreurs SQL et React sont corrigées ✅ Les pages fonctionnent correctement sans erreur ✅ Charte graphique harmonisée sur toutes les pages
This commit is contained in:
9
.manus/db/db-query-1768924734065.json
Normal file
9
.manus/db/db-query-1768924734065.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"query": "CREATE TABLE IF NOT EXISTS `passwordResetTokens` (\n `id` int AUTO_INCREMENT PRIMARY KEY,\n `email` varchar(320) NOT NULL,\n `token` varchar(255) NOT NULL UNIQUE,\n `expiresAt` timestamp NOT NULL,\n `used` boolean NOT NULL DEFAULT false,\n `createdAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP\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 `passwordResetTokens` (\n `id` int AUTO_INCREMENT PRIMARY KEY,\n `email` varchar(320) NOT NULL,\n `token` varchar(255) NOT NULL UNIQUE,\n `expiresAt` timestamp NOT NULL,\n `used` boolean NOT NULL DEFAULT false,\n `createdAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP\n);",
|
||||
"rows": [],
|
||||
"messages": [],
|
||||
"stdout": "",
|
||||
"stderr": "",
|
||||
"execution_time_ms": 101
|
||||
}
|
||||
13
.manus/db/db-query-1768925512631.json
Normal file
13
.manus/db/db-query-1768925512631.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"query": "SHOW TABLES LIKE 'passwordResetTokens';",
|
||||
"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 SHOW TABLES LIKE 'passwordResetTokens';",
|
||||
"rows": [
|
||||
{
|
||||
"Tables_in_7PAT67UmWoxv8vwp8Bbcv6 (passwordResetTokens)": "passwordResetTokens"
|
||||
}
|
||||
],
|
||||
"messages": [],
|
||||
"stdout": "Tables_in_7PAT67UmWoxv8vwp8Bbcv6 (passwordResetTokens)\npasswordResetTokens\n",
|
||||
"stderr": "",
|
||||
"execution_time_ms": 56
|
||||
}
|
||||
58
.manus/db/db-query-1768925517071.json
Normal file
58
.manus/db/db-query-1768925517071.json
Normal file
@@ -0,0 +1,58 @@
|
||||
{
|
||||
"query": "DESCRIBE passwordResetTokens;",
|
||||
"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 DESCRIBE passwordResetTokens;",
|
||||
"rows": [
|
||||
{
|
||||
"Field": "id",
|
||||
"Type": "int(11)",
|
||||
"Null": "NO",
|
||||
"Key": "PRI",
|
||||
"Default": "NULL",
|
||||
"Extra": "auto_increment"
|
||||
},
|
||||
{
|
||||
"Field": "userId",
|
||||
"Type": "int(11)",
|
||||
"Null": "NO",
|
||||
"Key": "",
|
||||
"Default": "NULL",
|
||||
"Extra": ""
|
||||
},
|
||||
{
|
||||
"Field": "token",
|
||||
"Type": "varchar(255)",
|
||||
"Null": "NO",
|
||||
"Key": "UNI",
|
||||
"Default": "NULL",
|
||||
"Extra": ""
|
||||
},
|
||||
{
|
||||
"Field": "expiresAt",
|
||||
"Type": "timestamp",
|
||||
"Null": "NO",
|
||||
"Key": "",
|
||||
"Default": "NULL",
|
||||
"Extra": ""
|
||||
},
|
||||
{
|
||||
"Field": "used",
|
||||
"Type": "tinyint(1)",
|
||||
"Null": "NO",
|
||||
"Key": "",
|
||||
"Default": "0",
|
||||
"Extra": ""
|
||||
},
|
||||
{
|
||||
"Field": "createdAt",
|
||||
"Type": "timestamp",
|
||||
"Null": "NO",
|
||||
"Key": "",
|
||||
"Default": "CURRENT_TIMESTAMP",
|
||||
"Extra": ""
|
||||
}
|
||||
],
|
||||
"messages": [],
|
||||
"stdout": "Field\tType\tNull\tKey\tDefault\tExtra\nid\tint(11)\tNO\tPRI\tNULL\tauto_increment\nuserId\tint(11)\tNO\t\tNULL\t\ntoken\tvarchar(255)\tNO\tUNI\tNULL\t\nexpiresAt\ttimestamp\tNO\t\tNULL\t\nused\ttinyint(1)\tNO\t\t0\t\ncreatedAt\ttimestamp\tNO\t\tCURRENT_TIMESTAMP\t\n",
|
||||
"stderr": "",
|
||||
"execution_time_ms": 53
|
||||
}
|
||||
18
.manus/db/db-query-1768925534190.json
Normal file
18
.manus/db/db-query-1768925534190.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"query": "SELECT * FROM passwordResetTokens LIMIT 1;",
|
||||
"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 * FROM passwordResetTokens LIMIT 1;",
|
||||
"rows": [
|
||||
{
|
||||
"id": "1",
|
||||
"userId": "1",
|
||||
"token": "e6626bd6ba7eabccd094178e79e5218050337ae35ae415ed7af4a6e6a83a2cba",
|
||||
"expiresAt": "2025-11-18 21:19:50",
|
||||
"used": "0",
|
||||
"createdAt": "2025-11-17 21:19:50"
|
||||
}
|
||||
],
|
||||
"messages": [],
|
||||
"stdout": "id\tuserId\ttoken\texpiresAt\tused\tcreatedAt\n1\t1\te6626bd6ba7eabccd094178e79e5218050337ae35ae415ed7af4a6e6a83a2cba\t2025-11-18 21:19:50\t0\t2025-11-17 21:19:50\n",
|
||||
"stderr": "",
|
||||
"execution_time_ms": 57
|
||||
}
|
||||
24
.manus/db/db-query-1768925802156.json
Normal file
24
.manus/db/db-query-1768925802156.json
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"query": "SHOW CREATE TABLE passwordResetTokens;",
|
||||
"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 SHOW CREATE TABLE passwordResetTokens;",
|
||||
"rows": [
|
||||
{
|
||||
"Table": "passwordResetTokens",
|
||||
"Create Table": "CREATE TABLE `passwordResetTokens` ("
|
||||
}
|
||||
],
|
||||
"messages": [
|
||||
" `id` int(11) NOT NULL AUTO_INCREMENT,",
|
||||
" `userId` int(11) NOT NULL,",
|
||||
" `token` varchar(255) NOT NULL,",
|
||||
" `expiresAt` timestamp NOT NULL,",
|
||||
" `used` tinyint(1) NOT NULL DEFAULT '0',",
|
||||
" `createdAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,",
|
||||
" PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */,",
|
||||
" UNIQUE KEY `passwordResetTokens_token_unique` (`token`)",
|
||||
") ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin AUTO_INCREMENT=90001"
|
||||
],
|
||||
"stdout": "Table\tCreate Table\npasswordResetTokens\tCREATE TABLE `passwordResetTokens` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `userId` int(11) NOT NULL,\n `token` varchar(255) NOT NULL,\n `expiresAt` timestamp NOT NULL,\n `used` tinyint(1) NOT NULL DEFAULT '0',\n `createdAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,\n PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */,\n UNIQUE KEY `passwordResetTokens_token_unique` (`token`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin AUTO_INCREMENT=90001\n",
|
||||
"stderr": "",
|
||||
"execution_time_ms": 94
|
||||
}
|
||||
9
.manus/db/db-query-1768925813992.json
Normal file
9
.manus/db/db-query-1768925813992.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"query": "ALTER TABLE passwordResetTokens ADD COLUMN email varchar(320) NOT NULL AFTER id;",
|
||||
"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 ALTER TABLE passwordResetTokens ADD COLUMN email varchar(320) NOT NULL AFTER id;",
|
||||
"rows": [],
|
||||
"messages": [],
|
||||
"stdout": "",
|
||||
"stderr": "",
|
||||
"execution_time_ms": 441
|
||||
}
|
||||
9
.manus/db/db-query-1768925878549.json
Normal file
9
.manus/db/db-query-1768925878549.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"query": "ALTER TABLE passwordResetTokens MODIFY COLUMN userId int(11) NULL;",
|
||||
"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 ALTER TABLE passwordResetTokens MODIFY COLUMN userId int(11) NULL;",
|
||||
"rows": [],
|
||||
"messages": [],
|
||||
"stdout": "",
|
||||
"stderr": "",
|
||||
"execution_time_ms": 205
|
||||
}
|
||||
8
.manus/db/db-query-error-1768925502688.json
Normal file
8
.manus/db/db-query-error-1768925502688.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"query": "INSERT INTO passwordResetTokens (email, token, expiresAt) VALUES ('test@example.com', 'test123456', DATE_ADD(NOW(), INTERVAL 24 HOUR));",
|
||||
"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 INSERT INTO passwordResetTokens (email, token, expiresAt) VALUES ('test@example.com', 'test123456', DATE_ADD(NOW(), INTERVAL 24 HOUR));",
|
||||
"returncode": 1,
|
||||
"logs": [
|
||||
"ERROR 1054 (42S22) at line 1: Unknown column 'email' in 'field list'"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user