Ensure delivery and package counts display correctly

Update stats panel and storage logic to correctly cast counts to numbers, resolving display issues for palettes and packages.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: b163d4c0-de5e-4f4e-a9c0-aed4c7049718
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/b163d4c0-de5e-4f4e-a9c0-aed4c7049718/HUXctpj
This commit is contained in:
michaelschal committed 2025-08-11 21:31:49 +00:00
1 parent 64cab30834
commit 0be08e3fd5
3 files changed
+9 -9

No files matched your search

+5 -5
View File
@@ -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)),
};
}