diff --git a/client/src/pages/AdminRappels.tsx b/client/src/pages/AdminRappels.tsx index 509e443..8e6cc89 100644 --- a/client/src/pages/AdminRappels.tsx +++ b/client/src/pages/AdminRappels.tsx @@ -21,8 +21,9 @@ import { SelectValue, } from "@/components/ui/select"; import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table"; +import { Badge } from "@/components/ui/badge"; import { trpc } from "@/lib/trpc"; -import { Bell, Download, Edit, Plus, Trash2 } from "lucide-react"; +import { Bell, Download, Edit, Plus, Trash2, GraduationCap, Calendar, CalendarDays } from "lucide-react"; import { toast } from "sonner"; import { FileUpload } from "@/components/FileUpload"; import { DateFormationMultiSelect } from "@/components/DateFormationMultiSelect"; @@ -257,30 +258,53 @@ export default function AdminRappels() { const formatDatesInfo = (rappel: any) => { if (!rappel.datesDetails || rappel.datesDetails.length === 0) { - return Toutes les dates; + return ( +
+ + + Toutes les dates + +
+ ); } // Grouper par formation et séquence const grouped = rappel.datesDetails.reduce((acc: any, date: any) => { - const key = `${date.formationNom} - ${date.sequenceNom}`; + const key = `${date.formationNom}|||${date.sequenceNom}`; if (!acc[key]) { - acc[key] = []; + acc[key] = { + formationNom: date.formationNom, + sequenceNom: date.sequenceNom, + dates: [] + }; } - acc[key].push(date); + acc[key].dates.push(date); return acc; }, {}); return ( -
- {Object.entries(grouped).map(([key, dates]: [string, any]) => ( -
-
{key}
-
- {dates.map((d: any, idx: number) => ( - +
+ {Object.values(grouped).map((group: any, groupIdx: number) => ( +
+
+ + + {group.formationNom} + + + + {group.sequenceNom} + +
+
+ {group.dates.map((d: any, idx: number) => ( + Date {d.ordre} - {idx < dates.length - 1 && ", "} - + ))}
diff --git a/todo.md b/todo.md index ef4c810..00b8f10 100644 --- a/todo.md +++ b/todo.md @@ -580,3 +580,8 @@ ## Colorisation des icônes du menu latéral - [x] Appliquer des couleurs par catégorie aux icônes du menu (Tableau de bord: bleu, Gestion: vert, Configuration: orange, Traçabilité: violet, Analyses: rose) - [x] Vérifier l'affichage visuel du menu colorisé + +## Amélioration visuelle de la colonne Dates concernées dans les rappels +- [x] Ajouter des badges colorés pour distinguer formations, séquences et dates +- [x] Utiliser des icônes pour identifier chaque type d'élément +- [x] Améliorer la hiérarchie typographique pour faciliter la lecture