fix temporaire en cours

This commit is contained in:
Rochas
2025-12-14 10:58:30 +01:00
parent 27d13ace9d
commit a2e5b1e9cf
2 changed files with 8 additions and 6 deletions

View File

@@ -19,7 +19,7 @@ export type User = {
id: string;
name: string;
last_name: string;
allocation: Reservation[];
allocation?: Reservation[];
role: string;
qualifications: string;
};

View File

@@ -12,7 +12,7 @@ export async function getUsers(): Promise<User[]> {
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<Ressources[]> {
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<Chantier[]> {
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<Chantier[]> {
})
).then(list => list.filter(x => x !== null)) as Reservation[];
}
*/
var equipe:Reservation[] = [];
var vehicules:Reservation[] = [];
var materiel:Reservation[] = [];
chantiers.push({
...data,
id: docSnap.id,