From beed32daea353c339236e758f4443c45451a2af2 Mon Sep 17 00:00:00 2001 From: michaelschal <35957947-michaelschal@users.noreply.replit.com> Date: Mon, 1 Sep 2025 20:33:47 +0000 Subject: [PATCH] Restore pending orders card and display count Restores the pending orders card to the dashboard, displaying the count of pending orders and refactors the display of individual pending orders to remove overdue status and highlight them with an orange border. 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 | 59 +++++++++++++++++----------------- 1 file changed, 30 insertions(+), 29 deletions(-) diff --git a/client/src/pages/Dashboard.tsx b/client/src/pages/Dashboard.tsx index 3890215..50072ac 100644 --- a/client/src/pages/Dashboard.tsx +++ b/client/src/pages/Dashboard.tsx @@ -395,6 +395,19 @@ export default function Dashboard() { + + +
+
+

Commandes en attente

+

{pendingOrdersCount}

+
+
+ +
+
+
+
@@ -441,37 +454,25 @@ export default function Dashboard() { - {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}

-
-
-
- - {daysPending} jour{daysPending > 1 ? 's' : ''} - -

- {safeFormat(order.plannedDate, "d MMM")} -

+ {pendingOrders.length > 0 ? pendingOrders.map((order: any) => ( +
+
+
+
+

{order.supplier?.name}

+

{order.group?.name}

- ); - }) : ( +
+ + En attente + +

+ {safeFormat(order.plannedDate, "d MMM")} +

+
+
+ )) : (

Aucune commande en attente

)}