style: overview revamp

This commit is contained in:
Nathnael
2026-08-13 12:44:06 +00:00
parent 3190b9bd38
commit 0df4be1820
34 changed files with 2412 additions and 644 deletions

View File

@@ -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(),
};
}