img chantier
This commit is contained in:
@@ -1,13 +1,12 @@
|
||||
import { useChantier } from '@/app/ContextChantier';
|
||||
import { Chantier, exempleChantier } from '@/class/class';
|
||||
import { useState } from 'react';
|
||||
import { Button, GestureResponderEvent, Pressable, ScrollView, StyleSheet, View, LayoutAnimation } from 'react-native';
|
||||
import { ThemedTextInput } from './themed-textinpute';
|
||||
import { ThemedView } from "./themed-view";
|
||||
import { ThemedText } from './themed-text';
|
||||
import { Dimensions, Image, LayoutAnimation, Pressable, ScrollView, StyleSheet, View } from 'react-native';
|
||||
import Animated, { LinearTransition } from 'react-native-reanimated';
|
||||
import { ThemedButton } from './themed-button';
|
||||
import { Chantier, Chef, exempleChantier } from '@/class/class';
|
||||
import { Dimensions } from "react-native";
|
||||
import Animated, { Layout,LinearTransition,Easing,runOnJS } from 'react-native-reanimated';
|
||||
import { useChantier } from '@/app/Context';
|
||||
import { ThemedText } from './themed-text';
|
||||
import { ThemedTextInput } from './themed-textinput';
|
||||
import { ThemedView } from "./themed-view";
|
||||
|
||||
const screenHeight = Dimensions.get("window").height;
|
||||
|
||||
@@ -50,10 +49,16 @@ export default function SelectChantier() {
|
||||
return(
|
||||
<Pressable key={index} onPress={() => selectChantier(chantier)}>
|
||||
<ThemedView lvl={4} style={styles.chantier}>
|
||||
<ThemedText>adresse: {chantier.adresse}</ThemedText>
|
||||
<ThemedText>chef de chantier: {chantier.chef.prenom} {chantier.chef.nom}</ThemedText>
|
||||
<ThemedText >date de début: {chantier.dateDep}</ThemedText>
|
||||
<ThemedText>etat: {chantier.etat}</ThemedText>
|
||||
<View>
|
||||
<Image source={{ uri: chantier.urlImg }} style={styles.image} />
|
||||
|
||||
</View>
|
||||
<View>
|
||||
<ThemedText>Adresse: {chantier.adresse}</ThemedText>
|
||||
<ThemedText>Chef de chantier: {chantier.chef.prenom} {chantier.chef.nom}</ThemedText>
|
||||
<ThemedText >Date de début: {chantier.dateDep}</ThemedText>
|
||||
<ThemedText>Etat: {chantier.etat}</ThemedText>
|
||||
</View>
|
||||
</ThemedView >
|
||||
</Pressable>
|
||||
);
|
||||
@@ -80,15 +85,15 @@ export default function SelectChantier() {
|
||||
value={search}
|
||||
onChangeText={setSearch}
|
||||
/>
|
||||
<ThemedView lvl={2} style={styles.list}>
|
||||
<ScrollView contentContainerStyle={styles.chantiersList} >
|
||||
|
||||
{chantiers.map((chantier, index) => (
|
||||
renderChantier(chantier, index)
|
||||
))
|
||||
}
|
||||
</ScrollView>
|
||||
</ThemedView>
|
||||
<ThemedView lvl={2} style={styles.list}>
|
||||
<ScrollView contentContainerStyle={styles.chantiersList} >
|
||||
|
||||
{chantiers.map((chantier, index) => (
|
||||
renderChantier(chantier, index)
|
||||
))
|
||||
}
|
||||
</ScrollView>
|
||||
</ThemedView>
|
||||
</View>
|
||||
}
|
||||
</AnimatedThemedView>
|
||||
@@ -146,7 +151,15 @@ const styles = StyleSheet.create({
|
||||
//margin:5,
|
||||
borderRadius:10,
|
||||
//borderWidth: 1,
|
||||
|
||||
flexDirection: 'row',
|
||||
height: 100,
|
||||
},
|
||||
image:{
|
||||
margin:0,
|
||||
width: 60,
|
||||
height: 90,
|
||||
borderRadius: 5,
|
||||
marginRight: 10,
|
||||
},
|
||||
input: {
|
||||
width: '100%',
|
||||
|
||||
Reference in New Issue
Block a user