Commandes en attente
-{pendingOrdersCount}
-Commandes en attente
+{pendingOrdersCount}
+{order.supplier?.name}
-{order.group?.name}
-- {safeFormat(order.plannedDate, "d MMM")} -
+ {pendingOrders.length > 0 ? pendingOrders.map((order: any) => ( +{order.supplier?.name}
+{order.group?.name}
+ {safeFormat(order.plannedDate, "d MMM")} +
+Aucune commande en attente
)} From 38c48bd6f6bbff5721be03844b8f7a73a85ecfad Mon Sep 17 00:00:00 2001 From: michaelschal <35957947-michaelschal@users.noreply.replit.com> Date: Mon, 1 Sep 2025 20:35:37 +0000 Subject: [PATCH 4/4] Remove pending order notification and improve order alert styling Removes the top-level notification for pending orders and updates the styling for pending order alerts to use color-coded severity based on how long an order has been pending. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 98f01874-e00c-4bbe-9d71-b0b338001848 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/98f01874-e00c-4bbe-9d71-b0b338001848/XDIQsDu --- client/src/pages/Dashboard.tsx | 54 ++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 25 deletions(-) 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
)}