fix temporaire en cours
This commit is contained in:
@@ -19,7 +19,7 @@ export type User = {
|
|||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
last_name: string;
|
last_name: string;
|
||||||
allocation: Reservation[];
|
allocation?: Reservation[];
|
||||||
role: string;
|
role: string;
|
||||||
qualifications: string;
|
qualifications: string;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ export async function getUsers(): Promise<User[]> {
|
|||||||
return {
|
return {
|
||||||
id: doc.id,
|
id: doc.id,
|
||||||
...data,
|
...data,
|
||||||
allocation: data.allocation?.map(convertReservation) || [],
|
//allocation: data.allocation?.map(convertReservation) || [],
|
||||||
} as User;
|
} as User;
|
||||||
});
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
@@ -30,7 +30,7 @@ export async function getRessources(): Promise<Ressources[]> {
|
|||||||
return {
|
return {
|
||||||
id: doc.id,
|
id: doc.id,
|
||||||
...data,
|
...data,
|
||||||
allocation: data.allocation?.map(convertReservation) || [],
|
//allocation: data.allocation?.map(convertReservation) || [],
|
||||||
} as Ressources;
|
} as Ressources;
|
||||||
});
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
@@ -67,7 +67,7 @@ export async function getChantiers(): Promise<Chantier[]> {
|
|||||||
chef = chefSnap.data() as User;
|
chef = chefSnap.data() as User;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
let equipe: Reservation[] = [];
|
let equipe: Reservation[] = [];
|
||||||
if (Array.isArray(data.equipe)) {
|
if (Array.isArray(data.equipe)) {
|
||||||
equipe = await Promise.all(
|
equipe = await Promise.all(
|
||||||
@@ -97,8 +97,10 @@ export async function getChantiers(): Promise<Chantier[]> {
|
|||||||
})
|
})
|
||||||
).then(list => list.filter(x => x !== null)) as Reservation[];
|
).then(list => list.filter(x => x !== null)) as Reservation[];
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
var equipe:Reservation[] = [];
|
||||||
|
var vehicules:Reservation[] = [];
|
||||||
|
var materiel:Reservation[] = [];
|
||||||
chantiers.push({
|
chantiers.push({
|
||||||
...data,
|
...data,
|
||||||
id: docSnap.id,
|
id: docSnap.id,
|
||||||
|
|||||||
Reference in New Issue
Block a user