diff --git a/class/class.tsx b/class/class.tsx index a514cf8..fa744fe 100644 --- a/class/class.tsx +++ b/class/class.tsx @@ -1,4 +1,5 @@ export type Chantier = { + name: string; id: string; adresse: string; etat: string; diff --git a/components/add/addChantier.tsx b/components/add/addChantier.tsx index 6b7bd6e..1f2026f 100644 --- a/components/add/addChantier.tsx +++ b/components/add/addChantier.tsx @@ -79,6 +79,7 @@ export default function AddChantier() { chantierDate.setHours(morning ? 0 : 12, 0, 0, 0); //CREATE NEW TYPE CHANTIER FOR FIRESTORE const chantierFirestore = { + name: objet, adresse, etat: "En cours", contact, @@ -100,6 +101,7 @@ export default function AddChantier() { if (id) { //console.log("Chantier created with ID:", id); setChantier({ ...chantierFirestore, + name: objet, id, chef: chefChantier, equipe: [], diff --git a/components/chantierSummary.tsx b/components/chantierSummary.tsx index 1aad1a4..7490b63 100644 --- a/components/chantierSummary.tsx +++ b/components/chantierSummary.tsx @@ -20,6 +20,7 @@ export default function ChantierSummary({data,style , ...otherProps }: Props) { + Renovation: {data.chantier.name} Adresse: {data.chantier.adresse} Chef de chantier: {data.chantier.chef.last_name}{" "}{data.chantier.chef.name} État: {data.chantier.etat} diff --git a/components/selectChantier.tsx b/components/selectChantier.tsx index 8e2f78e..3d2d480 100644 --- a/components/selectChantier.tsx +++ b/components/selectChantier.tsx @@ -122,6 +122,7 @@ export default function SelectChantier() { + Renovation: {item.name} Adresse: {item.adresse} Chef de chantier: {item.chef.last_name}{" "}{item.chef.name} État: {item.etat} @@ -224,7 +225,7 @@ const styles = StyleSheet.create({ borderRadius: 10, //borderWidth: 1, flexDirection: 'row', - height: 100, + //height: 130, }, image:{ margin:0,