add metrics

This commit is contained in:
ludo
2024-01-30 23:24:00 +01:00
parent c0c4146c9c
commit 79af996c63
12 changed files with 226 additions and 70 deletions

View File

@@ -10,12 +10,15 @@ class Dashboards
'orders_count' => OrderMetrics::countByPeriod($start, $end),
'orders_sum' => OrderMetrics::sumByPeriod($start, $end, 'total_shipped'),
'orders_avg' => OrderMetrics::avgByPeriod($start, $end, 'total_shipped'),
'offers_count' => Offers::count(),
'clients_count' => Customers::count(),
'countClients' => CustomerMetrics::countByPeriod($start, $end),
'waitingOrders' => OrderMetrics::countWaiting(),
'preparationLess24H' => OrderMetrics::countPreparationLess24h(),
'preparationLess48H' => OrderMetrics::countPreparationLess48h(),
'preparationMore48H' => OrderMetrics::countPreparationMore48h(),
'offers_count' => Offers::count(),
'stocksWarning' => OfferStocks::countAlerts(),
'countCustomers' => Customers::count(),
'lastOrders' => Orders::getLast(),
];
}
}