add objet and renovation
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
export type Chantier = {
|
export type Chantier = {
|
||||||
|
name: string;
|
||||||
id: string;
|
id: string;
|
||||||
adresse: string;
|
adresse: string;
|
||||||
etat: string;
|
etat: string;
|
||||||
|
|||||||
@@ -79,6 +79,7 @@ export default function AddChantier() {
|
|||||||
chantierDate.setHours(morning ? 0 : 12, 0, 0, 0);
|
chantierDate.setHours(morning ? 0 : 12, 0, 0, 0);
|
||||||
//CREATE NEW TYPE CHANTIER FOR FIRESTORE
|
//CREATE NEW TYPE CHANTIER FOR FIRESTORE
|
||||||
const chantierFirestore = {
|
const chantierFirestore = {
|
||||||
|
name: objet,
|
||||||
adresse,
|
adresse,
|
||||||
etat: "En cours",
|
etat: "En cours",
|
||||||
contact,
|
contact,
|
||||||
@@ -100,6 +101,7 @@ export default function AddChantier() {
|
|||||||
if (id) {
|
if (id) {
|
||||||
//console.log("Chantier created with ID:", id);
|
//console.log("Chantier created with ID:", id);
|
||||||
setChantier({ ...chantierFirestore,
|
setChantier({ ...chantierFirestore,
|
||||||
|
name: objet,
|
||||||
id,
|
id,
|
||||||
chef: chefChantier,
|
chef: chefChantier,
|
||||||
equipe: [],
|
equipe: [],
|
||||||
|
|||||||
@@ -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} />
|
<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>
|
||||||
<View>
|
<View>
|
||||||
|
<ThemedText>Renovation: {data.chantier.name}</ThemedText>
|
||||||
<ThemedText>Adresse: {data.chantier.adresse}</ThemedText>
|
<ThemedText>Adresse: {data.chantier.adresse}</ThemedText>
|
||||||
<ThemedText>Chef de chantier: {data.chantier.chef.last_name}{" "}{data.chantier.chef.name}</ThemedText>
|
<ThemedText>Chef de chantier: {data.chantier.chef.last_name}{" "}{data.chantier.chef.name}</ThemedText>
|
||||||
<ThemedText>État: {data.chantier.etat}</ThemedText>
|
<ThemedText>État: {data.chantier.etat}</ThemedText>
|
||||||
|
|||||||
@@ -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} />
|
<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>
|
||||||
<View>
|
<View>
|
||||||
|
<ThemedText>Renovation: {item.name}</ThemedText>
|
||||||
<ThemedText>Adresse: {item.adresse}</ThemedText>
|
<ThemedText>Adresse: {item.adresse}</ThemedText>
|
||||||
<ThemedText>Chef de chantier: {item.chef.last_name}{" "}{item.chef.name}</ThemedText>
|
<ThemedText>Chef de chantier: {item.chef.last_name}{" "}{item.chef.name}</ThemedText>
|
||||||
<ThemedText>État: {item.etat}</ThemedText>
|
<ThemedText>État: {item.etat}</ThemedText>
|
||||||
@@ -224,7 +225,7 @@ const styles = StyleSheet.create({
|
|||||||
borderRadius: 10,
|
borderRadius: 10,
|
||||||
//borderWidth: 1,
|
//borderWidth: 1,
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
height: 100,
|
//height: 130,
|
||||||
},
|
},
|
||||||
image:{
|
image:{
|
||||||
margin:0,
|
margin:0,
|
||||||
|
|||||||
Reference in New Issue
Block a user