From 3d44d635a26d09f85cf2576f08f9d016fc2d7ea0 Mon Sep 17 00:00:00 2001 From: tuanvu Date: Sat, 13 Dec 2025 23:22:40 +0100 Subject: [PATCH] add objet and renovation --- class/class.tsx | 1 + components/add/addChantier.tsx | 2 ++ components/chantierSummary.tsx | 1 + components/selectChantier.tsx | 3 ++- 4 files changed, 6 insertions(+), 1 deletion(-) 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,