diff --git a/client/src/pages/AdminSequences.tsx b/client/src/pages/AdminSequences.tsx index f33f490..6453ded 100644 --- a/client/src/pages/AdminSequences.tsx +++ b/client/src/pages/AdminSequences.tsx @@ -725,25 +725,53 @@ export default function AdminSequences() { -
- {sequence.dates.map((date: any) => ( -
- {date.rappels && date.rappels.length > 0 ? ( - date.rappels.map((rappel: any) => ( - - - {rappel.nom} - - )) - ) : ( - Aucun rappel - )} -
- ))} +
+ {sequence.dates.map((date: any) => { + const rappelsPre = date.rappels?.filter((r: any) => r.timing === 'pre_formation') || []; + const rappelsPost = date.rappels?.filter((r: any) => r.timing === 'post_formation') || []; + + return ( +
+ {rappelsPre.length > 0 && ( +
+
Pré-formation
+
+ {rappelsPre.map((rappel: any) => ( + + + {rappel.nom} + + ))} +
+
+ )} + {rappelsPost.length > 0 && ( +
+
Post-formation
+
+ {rappelsPost.map((rappel: any) => ( + + + {rappel.nom} + + ))} +
+
+ )} + {rappelsPre.length === 0 && rappelsPost.length === 0 && ( + Aucun rappel + )} +
+ ); + })}
{!isCompactView && ( diff --git a/todo.md b/todo.md index ca53a09..71afb47 100644 --- a/todo.md +++ b/todo.md @@ -595,3 +595,7 @@ - [x] Ajouter un bouton de basculement entre vue complète et vue réduite - [x] Masquer les colonnes Lieu, Public cible, Formateur en vue réduite - [x] Simplifier l'affichage des rappels (supprimer "Date 1:", afficher sur une ligne) + +## Séparation des rappels pré et post-formation +- [x] Séparer l'affichage des rappels en deux catégories (pré-formation et post-formation) +- [x] Ajouter des labels visuels pour distinguer les deux types de rappels