chore: build
Frontend Admin - EAS Build / build (push) Failing after 58m37s

This commit is contained in:
2026-06-27 14:50:26 +02:00
parent 304263a95e
commit 2fc6711eaa
2 changed files with 31 additions and 31 deletions
+31 -13
View File
@@ -8,7 +8,6 @@ import type {
DeliveryPerson, DeliveryPerson,
DeliveryPersonsStats, DeliveryPersonsStats,
Alert, Alert,
MonthlyStats,
} from "./types"; } from "./types";
const V2 = `${API_BASE_URL}/api/v2`; const V2 = `${API_BASE_URL}/api/v2`;
@@ -165,7 +164,38 @@ export const resetAdminStats = async (
); );
return data; return data;
}; };
// ============================================
// STATISTIQUES MENSUELLES (jour par jour)
// ============================================
export interface MonthlyDayStat {
day: string; // "2026-06-05"
label: string; // "05/06"
count: number;
revenue: number;
quantity: number;
}
export interface MonthlyStatsSummary {
total_orders: number;
total_revenue: number;
total_quantity: number;
}
export interface MonthlyStats {
month: string; // "2026-06"
summary: MonthlyStatsSummary;
by_day: MonthlyDayStat[];
}
export const getAdminStatsByMonth = async (
month?: string,
): Promise<MonthlyStats> => {
const { data } = await apiClient.get(
`${V2}/admin/protected/stats/monthly`,
{
params: month ? { month } : undefined,
},
);
return data;
};
export const getAllClients = async (): Promise<ClientResponse[]> => { export const getAllClients = async (): Promise<ClientResponse[]> => {
const { data } = await apiClient.get(`${V2}/admin/protected/all/clients`); const { data } = await apiClient.get(`${V2}/admin/protected/all/clients`);
return data.clients || []; return data.clients || [];
@@ -1252,15 +1282,3 @@ export const updateSettings = async (
}; };
} }
}; };
export const getAdminStatsByMonth = async (
month?: string,
): Promise<MonthlyStats> => {
const { data } = await apiClient.get(
`${V2}/admin/protected/stats/monthly`,
{
params: month ? { month } : undefined,
},
);
return data;
};
-18
View File
@@ -174,21 +174,3 @@ export interface MapLinks {
apple_maps: string; apple_maps: string;
openstreetmap: string; openstreetmap: string;
} }
export interface MonthlyDayStat {
day: string; // "2026-06-05"
label: string; // "05/06"
count: number;
revenue: number;
quantity: number;
}
export interface MonthlyStatsSummary {
total_orders: number;
total_revenue: number;
total_quantity: number;
}
export interface MonthlyStats {
month: string; // "2026-06"
summary: MonthlyStatsSummary;
by_day: MonthlyDayStat[];
}