From a2e5b1e9cffceb8596463c58f1d4fb9357b9b867 Mon Sep 17 00:00:00 2001 From: Rochas Date: Sun, 14 Dec 2025 10:58:30 +0100 Subject: [PATCH] fix temporaire en cours --- class/class.tsx | 2 +- services/ressourcesService.ts | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/class/class.tsx b/class/class.tsx index 885a4c3..0bb40f2 100644 --- a/class/class.tsx +++ b/class/class.tsx @@ -19,7 +19,7 @@ export type User = { id: string; name: string; last_name: string; - allocation: Reservation[]; + allocation?: Reservation[]; role: string; qualifications: string; }; diff --git a/services/ressourcesService.ts b/services/ressourcesService.ts index eb9b13a..ac7ed0d 100644 --- a/services/ressourcesService.ts +++ b/services/ressourcesService.ts @@ -12,7 +12,7 @@ export async function getUsers(): Promise { return { id: doc.id, ...data, - allocation: data.allocation?.map(convertReservation) || [], + //allocation: data.allocation?.map(convertReservation) || [], } as User; }); } catch (err) { @@ -30,7 +30,7 @@ export async function getRessources(): Promise { return { id: doc.id, ...data, - allocation: data.allocation?.map(convertReservation) || [], + //allocation: data.allocation?.map(convertReservation) || [], } as Ressources; }); } catch (err) { @@ -67,7 +67,7 @@ export async function getChantiers(): Promise { chef = chefSnap.data() as User; } } - + /* let equipe: Reservation[] = []; if (Array.isArray(data.equipe)) { equipe = await Promise.all( @@ -97,8 +97,10 @@ export async function getChantiers(): Promise { }) ).then(list => list.filter(x => x !== null)) as Reservation[]; } - - + */ + var equipe:Reservation[] = []; + var vehicules:Reservation[] = []; + var materiel:Reservation[] = []; chantiers.push({ ...data, id: docSnap.id,