diff --git a/.manus/db/db-query-1769089721346.json b/.manus/db/db-query-1769089721346.json new file mode 100644 index 0000000..f35924d --- /dev/null +++ b/.manus/db/db-query-1769089721346.json @@ -0,0 +1,9 @@ +{ + "query": "SELECT i.id, i.apprenantId, i.statut, a.nom, a.prenom, a.email \nFROM inscriptions i \nLEFT JOIN apprenants a ON i.apprenantId = a.id \nWHERE i.sequenceId = 330001 AND i.statut = 'confirme';", + "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 i.id, i.apprenantId, i.statut, a.nom, a.prenom, a.email \nFROM inscriptions i \nLEFT JOIN apprenants a ON i.apprenantId = a.id \nWHERE i.sequenceId = 330001 AND i.statut = 'confirme';", + "rows": [], + "messages": [], + "stdout": "", + "stderr": "", + "execution_time_ms": 80 +} \ No newline at end of file diff --git a/.manus/db/db-query-1769089734156.json b/.manus/db/db-query-1769089734156.json new file mode 100644 index 0000000..3b047f2 --- /dev/null +++ b/.manus/db/db-query-1769089734156.json @@ -0,0 +1,73 @@ +{ + "query": "SELECT i.id, i.apprenantId, i.statut, i.dateInscription, a.nom, a.prenom, a.email \nFROM inscriptions i \nLEFT JOIN apprenants a ON i.apprenantId = a.id \nWHERE i.sequenceId = 330001;", + "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 i.id, i.apprenantId, i.statut, i.dateInscription, a.nom, a.prenom, a.email \nFROM inscriptions i \nLEFT JOIN apprenants a ON i.apprenantId = a.id \nWHERE i.sequenceId = 330001;", + "rows": [ + { + "id": "300001", + "apprenantId": "1", + "statut": "confirmee", + "dateInscription": "2025-11-30 21:54:11", + "nom": "JOHANSSON ", + "prenom": "Scarlett", + "email": "opareige@gmail.com" + }, + { + "id": "450001", + "apprenantId": "60001", + "statut": "confirmee", + "dateInscription": "2026-01-22 12:39:20", + "nom": "PITT", + "prenom": "Brad", + "email": "test2@gmail.com" + }, + { + "id": "420003", + "apprenantId": "240001", + "statut": "confirmee", + "dateInscription": "2025-12-03 09:32:09", + "nom": "monroe", + "prenom": "marylin", + "email": "o.pareige@itinova.org" + }, + { + "id": "420002", + "apprenantId": "240001", + "statut": "annulee", + "dateInscription": "2025-12-03 09:23:59", + "nom": "monroe", + "prenom": "marylin", + "email": "o.pareige@itinova.org" + }, + { + "id": "330001", + "apprenantId": "180001", + "statut": "annulee", + "dateInscription": "2025-12-01 08:40:38", + "nom": "NULL", + "prenom": "NULL", + "email": "NULL" + }, + { + "id": "360001", + "apprenantId": "180001", + "statut": "annulee", + "dateInscription": "2025-12-01 09:47:25", + "nom": "NULL", + "prenom": "NULL", + "email": "NULL" + }, + { + "id": "360002", + "apprenantId": "180001", + "statut": "confirmee", + "dateInscription": "2025-12-01 09:48:55", + "nom": "NULL", + "prenom": "NULL", + "email": "NULL" + } + ], + "messages": [], + "stdout": "id\tapprenantId\tstatut\tdateInscription\tnom\tprenom\temail\n300001\t1\tconfirmee\t2025-11-30 21:54:11\tJOHANSSON \tScarlett\topareige@gmail.com\n450001\t60001\tconfirmee\t2026-01-22 12:39:20\tPITT\tBrad\ttest2@gmail.com\n420003\t240001\tconfirmee\t2025-12-03 09:32:09\tmonroe\tmarylin\to.pareige@itinova.org\n420002\t240001\tannulee\t2025-12-03 09:23:59\tmonroe\tmarylin\to.pareige@itinova.org\n330001\t180001\tannulee\t2025-12-01 08:40:38\tNULL\tNULL\tNULL\n360001\t180001\tannulee\t2025-12-01 09:47:25\tNULL\tNULL\tNULL\n360002\t180001\tconfirmee\t2025-12-01 09:48:55\tNULL\tNULL\tNULL\n", + "stderr": "", + "execution_time_ms": 54 +} \ No newline at end of file diff --git a/client/src/pages/AdminSequences.tsx b/client/src/pages/AdminSequences.tsx index ef5a935..ca67dc3 100644 --- a/client/src/pages/AdminSequences.tsx +++ b/client/src/pages/AdminSequences.tsx @@ -36,6 +36,7 @@ export default function AdminSequences() { const [isConfirmTestOpen, setIsConfirmTestOpen] = useState(false); const [sequenceToTest, setSequenceToTest] = useState(null); const [testEmail, setTestEmail] = useState(""); + const [sendingProgress, setSendingProgress] = useState<{ current: number; total: number } | null>(null); const [formData, setFormData] = useState({ formationId: "", @@ -91,13 +92,15 @@ export default function AdminSequences() { }); const testerRappelMutation = trpc.rappels.testerRappel.useMutation({ - onSuccess: () => { - toast.success("Email de test envoyé avec succès"); + onSuccess: (data) => { + setSendingProgress(null); + toast.success(`${data.nbEnvoyes} email(s) de test envoyé(s) avec succès`); setIsConfirmTestOpen(false); setSequenceToTest(null); setTestEmail(""); }, onError: (error) => { + setSendingProgress(null); toast.error(`Erreur lors de l'envoi du test : ${error.message}`); setIsConfirmTestOpen(false); setSequenceToTest(null); @@ -1104,6 +1107,27 @@ export default function AdminSequences() { disabled={testerRappelMutation.isPending} /> + + {/* Indicateur de progression */} + {testerRappelMutation.isPending && ( +
+
+
+ + + + + + + +
+
+

Envoi en cours...

+

Veuillez patienter pendant l'envoi des emails de test

+
+
+
+ )}