chore: build

This commit is contained in:
2026-06-16 21:17:54 +02:00
parent 440792a066
commit ec7e59550b
11 changed files with 868 additions and 1 deletions
+15
View File
@@ -299,6 +299,21 @@ export const getDeliveryPersonDetails = async (username: string) => {
return data.deliveryman || data;
};
export const getLivreurRatings = async (username: string): Promise<{
ratings: { id: number; order_id: number; client_username: string; rating: number; comment: string; created_at: string }[];
average: number;
count: number;
}> => {
try {
const { data } = await apiClient.get(
`${V2}/admin/protected/delivery-persons/${username}/ratings`,
);
return data;
} catch {
return { ratings: [], average: 0, count: 0 };
}
};
const parseStatus = (status: any): "available" | "busy" | "offline" => {
if (!status) return "offline";
if (status === "available" || status === "busy" || status === "offline")