clean gestionnaire_ressource et ouvrier, ajout de select Chantier + templateScreen
This commit is contained in:
@@ -4,10 +4,11 @@ import { ThemedView } from "@/components/themed-view";
|
||||
import Constants from "expo-constants"; //pour connaître la taille de la barre menu de l'OS en haut
|
||||
import { useLocalSearchParams, useRouter } from "expo-router";
|
||||
import React, { useMemo, useState } from "react";
|
||||
import { FlatList, Image, StyleSheet, Text } from "react-native";
|
||||
import { FlatList, Image, StyleSheet, Text, View } from "react-native";
|
||||
import rawConcerts from "../../data/concerts.json";
|
||||
|
||||
import { useChantier } from "../ContextChantier";
|
||||
import SelectChantier from "@/components/selectChantier";
|
||||
|
||||
type Concert = {
|
||||
group: string;
|
||||
@@ -56,36 +57,45 @@ export default function GestionOuvrier() {
|
||||
};
|
||||
|
||||
return (
|
||||
<ThemedView lvl={3} style={styles.container}>
|
||||
<FlatList
|
||||
data={filteredData}
|
||||
renderItem={renderItem}
|
||||
keyExtractor={(_, index) => index.toString()}
|
||||
contentContainerStyle={{ paddingBottom: 40 }}
|
||||
ListHeaderComponent={
|
||||
<ThemedView opacity="00" style={styles.header}>
|
||||
<ThemedView lvl={3} style={styles.back}>
|
||||
<View style={styles.container}>
|
||||
<View style={{width:"100%", position: 'absolute'}}>
|
||||
<SelectChantier></SelectChantier>
|
||||
</View>
|
||||
|
||||
<ThemedView style={styles.inputBack} shadow={true}>
|
||||
<ThemedTextInput
|
||||
lvl={0}
|
||||
style={styles.input}
|
||||
placeholder="Rechercher un artisant..."
|
||||
value={search}
|
||||
onChangeText={setSearch}
|
||||
/>
|
||||
</ThemedView>
|
||||
</ThemedView>
|
||||
}
|
||||
ListEmptyComponent={
|
||||
<Text style={styles.empty}>Aucun résultat n'a été trouvé</Text>
|
||||
}
|
||||
/>
|
||||
|
||||
<FlatList
|
||||
data={filteredData}
|
||||
renderItem={renderItem}
|
||||
keyExtractor={(_, index) => index.toString()}
|
||||
contentContainerStyle={{ paddingBottom: 40 }}
|
||||
ListHeaderComponent={
|
||||
<View style={styles.header}>
|
||||
<ThemedView style={styles.inputBack} shadow={true}>
|
||||
<ThemedTextInput
|
||||
lvl={0}
|
||||
style={styles.input}
|
||||
placeholder="Rechercher un artisant..."
|
||||
value={search}
|
||||
onChangeText={setSearch}
|
||||
/>
|
||||
</ThemedView>
|
||||
</View>
|
||||
}
|
||||
ListEmptyComponent={
|
||||
<Text style={styles.empty}>Aucun résultat n'a été trouvé</Text>
|
||||
}
|
||||
/>
|
||||
</View>
|
||||
</ThemedView>
|
||||
);
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
back:{
|
||||
height:"100%",
|
||||
width:"100%",
|
||||
},
|
||||
container: {
|
||||
flex: 1,
|
||||
marginTop: Constants.statusBarHeight, //pour la barre menu du haut
|
||||
@@ -93,7 +103,7 @@ const styles = StyleSheet.create({
|
||||
},
|
||||
header: {
|
||||
marginTop: 60,
|
||||
marginBottom: 20,
|
||||
marginBottom: 10,
|
||||
alignItems: "center",
|
||||
paddingHorizontal: 20,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user