diff --git a/client/src/pages/Dashboard.tsx b/client/src/pages/Dashboard.tsx index 50072ac..040bfb3 100644 --- a/client/src/pages/Dashboard.tsx +++ b/client/src/pages/Dashboard.tsx @@ -351,14 +351,6 @@ export default function Dashboard() { {/* Alerts */}
{order.supplier?.name}
-{order.group?.name}
+ {pendingOrders.length > 0 ? pendingOrders.map((order: any) => { + // Calculer le nombre de jours en attente + const orderDate = safeDate(order.createdAt); + const daysPending = orderDate ? Math.floor((new Date().getTime() - orderDate.getTime()) / (1000 * 60 * 60 * 24)) : 0; + const isOverdue = daysPending > 10; + + return ( +{order.supplier?.name}
+{order.group?.name}
++ {safeFormat(order.plannedDate, "d MMM")} +
- {safeFormat(order.plannedDate, "d MMM")} -
-Aucune commande en attente
)}