diff --git a/attached_assets/image_1754947823130.png b/attached_assets/image_1754947823130.png new file mode 100644 index 0000000..11db6a4 Binary files /dev/null and b/attached_assets/image_1754947823130.png differ diff --git a/client/src/components/StatsPanel.tsx b/client/src/components/StatsPanel.tsx index 6d0f704..003c1e2 100644 --- a/client/src/components/StatsPanel.tsx +++ b/client/src/components/StatsPanel.tsx @@ -63,26 +63,26 @@ export default function StatsPanel({ currentDate = new Date() }: StatsPanelProps
- {stats?.ordersCount || 0} + {Number(stats?.ordersCount) || 0}
Commandes
- {stats?.deliveriesCount || 0} + {Number(stats?.deliveriesCount) || 0}
Livraisons
- {stats?.totalPalettes || 0} + {Number(stats?.totalPalettes) || 0}
Palettes
- {stats?.totalPackages || 0} + {Number(stats?.totalPackages) || 0}
Colis
diff --git a/server/storage.ts b/server/storage.ts index facf1ac..c47807c 100644 --- a/server/storage.ts +++ b/server/storage.ts @@ -864,12 +864,12 @@ export class DatabaseStorage implements IStorage { } return { - ordersCount: orderStats?.count || 0, - deliveriesCount: deliveryStats?.count || 0, - pendingOrdersCount: orderStats?.pendingCount || 0, + ordersCount: Number(orderStats?.count || 0), + deliveriesCount: Number(deliveryStats?.count || 0), + pendingOrdersCount: Number(orderStats?.pendingCount || 0), averageDeliveryTime: Math.round(averageDeliveryTime * 10) / 10, - totalPalettes: (orderStats?.totalPalettes || 0) + (deliveryStats?.totalPalettes || 0), - totalPackages: (orderStats?.totalPackages || 0) + (deliveryStats?.totalPackages || 0), + totalPalettes: Number((orderStats?.totalPalettes || 0)) + Number((deliveryStats?.totalPalettes || 0)), + totalPackages: Number((orderStats?.totalPackages || 0)) + Number((deliveryStats?.totalPackages || 0)), }; }