Generate ticket, dashboard, excess luggage rate updates

This commit is contained in:
Stephanos A
2026-07-16 08:41:35 +03:00
parent 2d2fcfbda9
commit b2b31f30bb
16 changed files with 585 additions and 315 deletions

View File

@@ -2,6 +2,21 @@ import { apiClient } from '@/lib/api-client';
import { DashboardStats, RevenueData } from '@/types';
export const dashboardApi = {
getBackofficeStats: async () => {
const response = await apiClient.get<{
totalBookings: number;
totalNormalBookings: number;
totalPackageBookings: number;
totalTickets: number;
totalNormalTickets: number;
totalPackageTickets: number;
totalPassengers: number;
revenueByCurrency: { currency: string; totalMinor: number }[];
packageRevenueByCurrency: { currency: string; totalMinor: number }[];
}>('/dashboard/backoffice-stats');
return response;
},
getStats: async () => {
try {
// Fetch bookings and passengers data in parallel