diff --git a/client/src/components/AnnouncementCard.tsx b/client/src/components/AnnouncementCard.tsx index d04e6b1..8dbf000 100644 --- a/client/src/components/AnnouncementCard.tsx +++ b/client/src/components/AnnouncementCard.tsx @@ -36,7 +36,7 @@ import { Info, AlertTriangle, CheckCircle, - XCircle + AlertCircle } from "lucide-react"; import { useAuthUnified } from "@/hooks/useAuthUnified"; import { useStore } from "@/components/Layout"; @@ -62,18 +62,38 @@ type AnnouncementWithRelations = DashboardMessage & { }; }; -// Configuration des priorités +// Configuration des priorités avec icônes const getPriorityConfig = (type: string) => { switch (type) { case 'error': - return { label: 'Erreur', color: 'bg-red-100 text-red-800' }; + return { + label: 'Erreur', + color: 'bg-red-100 text-red-800', + icon: AlertCircle, + iconColor: 'text-red-600' + }; case 'warning': - return { label: 'Attention', color: 'bg-orange-100 text-orange-800' }; + return { + label: 'Attention', + color: 'bg-orange-100 text-orange-800', + icon: AlertTriangle, + iconColor: 'text-orange-600' + }; case 'success': - return { label: 'Succès', color: 'bg-green-100 text-green-800' }; + return { + label: 'Succès', + color: 'bg-green-100 text-green-800', + icon: CheckCircle, + iconColor: 'text-green-600' + }; case 'info': default: - return { label: 'Information', color: 'bg-blue-100 text-blue-800' }; + return { + label: 'Information', + color: 'bg-blue-100 text-blue-800', + icon: Info, + iconColor: 'text-blue-600' + }; } }; @@ -293,13 +313,16 @@ export default function AnnouncementCard() { const priorityConfig = getPriorityConfig(announcement.type); return ( -
-
-
-
-

{announcement.title}

+
+
+
+
+
+ +

{announcement.title}

+
{announcement.content && ( -

{announcement.content}

+

{announcement.content}

)}

{announcement.author?.firstName} {announcement.author?.lastName}