add objet and renovation

This commit is contained in:
tuanvu
2025-12-13 23:22:40 +01:00
parent 27503103da
commit 3d44d635a2
4 changed files with 6 additions and 1 deletions

View File

@@ -1,4 +1,5 @@
export type Chantier = {
name: string;
id: string;
adresse: string;
etat: string;

View File

@@ -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: [],

View File

@@ -20,6 +20,7 @@ export default function ChantierSummary({data,style , ...otherProps }: Props) {
<Image source={{ uri:"https://cdn.discordapp.com/attachments/1425108443571945644/1427207643180826757/raw.png?ex=69392bb2&is=6937da32&hm=dcc09e76d3dca89d2418947b46efbd38673b9dc559027724b2e51d493b173bc9&" /*chantier.urlImg*/ }} style={styles.image} />
</View>
<View>
<ThemedText>Renovation: {data.chantier.name}</ThemedText>
<ThemedText>Adresse: {data.chantier.adresse}</ThemedText>
<ThemedText>Chef de chantier: {data.chantier.chef.last_name}{" "}{data.chantier.chef.name}</ThemedText>
<ThemedText>État: {data.chantier.etat}</ThemedText>

View File

@@ -122,6 +122,7 @@ export default function SelectChantier() {
<Image source={{ uri:"https://cdn.discordapp.com/attachments/1425108443571945644/1427207643180826757/raw.png?ex=69392bb2&is=6937da32&hm=dcc09e76d3dca89d2418947b46efbd38673b9dc559027724b2e51d493b173bc9&" /*chantier.urlImg*/ }} style={styles.image} />
</View>
<View>
<ThemedText>Renovation: {item.name}</ThemedText>
<ThemedText>Adresse: {item.adresse}</ThemedText>
<ThemedText>Chef de chantier: {item.chef.last_name}{" "}{item.chef.name}</ThemedText>
<ThemedText>État: {item.etat}</ThemedText>
@@ -224,7 +225,7 @@ const styles = StyleSheet.create({
borderRadius: 10,
//borderWidth: 1,
flexDirection: 'row',
height: 100,
//height: 130,
},
image:{
margin:0,