fix temporaire en cours
This commit is contained in:
@@ -19,7 +19,7 @@ export type User = {
|
||||
id: string;
|
||||
name: string;
|
||||
last_name: string;
|
||||
allocation: Reservation[];
|
||||
allocation?: Reservation[];
|
||||
role: string;
|
||||
qualifications: string;
|
||||
};
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user