mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 11:08:12 +00:00
Generate ticket, dashboard, excess luggage rate updates
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user