mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 16:28:12 +00:00
style: overview revamp
This commit is contained in:
@@ -56,7 +56,14 @@ export class OverviewService {
|
||||
bookingTrend,
|
||||
statusCounts,
|
||||
paymentTrend,
|
||||
recentBookings,
|
||||
current,
|
||||
previous,
|
||||
revenueByDirection,
|
||||
revenueByFreightType,
|
||||
previousPaymentTrend,
|
||||
tonsTrend,
|
||||
revenueFlows,
|
||||
bookingHeatmap,
|
||||
] = await Promise.all([
|
||||
this.overviewRepository.getBookingKpis(dirs),
|
||||
this.overviewRepository.getContractKpis(dirs),
|
||||
@@ -67,7 +74,14 @@ export class OverviewService {
|
||||
this.overviewRepository.getBookingTrend(days, dirs),
|
||||
this.overviewRepository.getStatusCounts(dirs),
|
||||
this.overviewRepository.getPaymentTrend(days, dirs),
|
||||
this.overviewRepository.getRecentBookings(8, dirs),
|
||||
this.overviewRepository.getPeriodTotals(days, 0, dirs),
|
||||
this.overviewRepository.getPeriodTotals(days, days, dirs),
|
||||
this.overviewRepository.getRevenueByDirection(days, dirs),
|
||||
this.overviewRepository.getRevenueByFreightType(days, dirs),
|
||||
this.overviewRepository.getPaymentTrend(days, dirs, days),
|
||||
this.overviewRepository.getTonsTrend(days, dirs),
|
||||
this.overviewRepository.getRevenueFlows(days, dirs),
|
||||
this.overviewRepository.getBookingHeatmap(days, dirs),
|
||||
]);
|
||||
|
||||
const { bookingsByPipeline, bookingsByStatus } =
|
||||
@@ -86,10 +100,14 @@ export class OverviewService {
|
||||
bookingsByStatus,
|
||||
bookingsByPipeline,
|
||||
paymentTrend,
|
||||
recentBookings: recentBookings.map((row) => ({
|
||||
...row,
|
||||
createdAt: row.createdAt.toISOString(),
|
||||
})),
|
||||
current,
|
||||
previous,
|
||||
revenueByDirection,
|
||||
revenueByFreightType,
|
||||
previousPaymentTrend,
|
||||
tonsTrend,
|
||||
revenueFlows,
|
||||
bookingHeatmap,
|
||||
generatedAt: new Date().toISOString(),
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user