clean des composants, dossiers
This commit is contained in:
@@ -3,7 +3,7 @@ import { } from 'expo-router';
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
|
|
||||||
import { HapticTab } from '@/components/haptic-tab';
|
import { HapticTab } from '@/components/expoExempleComponents/haptic-tab';
|
||||||
import { IconSymbol } from '@/components/ui/icon-symbol';
|
import { IconSymbol } from '@/components/ui/icon-symbol';
|
||||||
import { Colors } from '@/constants/theme';
|
import { Colors } from '@/constants/theme';
|
||||||
import { useColorScheme } from '@/hooks/use-color-scheme';
|
import { useColorScheme } from '@/hooks/use-color-scheme';
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import ChantierSummary from '@/components/chantierSummary';
|
import ChantierSummary from '@/components/chantierSummary';
|
||||||
import SelectChantier from '@/components/selectChantier';
|
import SelectChantier from '@/components/selectChantier';
|
||||||
import SetStatus from '@/components/setStatus';
|
import SetStatus from '@/components/setStatus';
|
||||||
import { ThemedView } from '@/components/themed-view';
|
import { ThemedView } from '@/components/theme/themed-view';
|
||||||
import React, { useEffect, useState } from 'react';
|
import React, { useEffect, useState } from 'react';
|
||||||
import { StyleSheet, ScrollView, Button, TextInput, Text } from 'react-native';
|
import { StyleSheet, ScrollView, Button, TextInput, Text } from 'react-native';
|
||||||
import { useChantier } from '../ContextChantier';
|
import { useChantier } from '../ContextChantier';
|
||||||
@@ -9,9 +9,9 @@ import { useRessources } from '../ContextRessource';
|
|||||||
import { useUser } from '../ContextUser';
|
import { useUser } from '../ContextUser';
|
||||||
import { getRessources, getUsers, addChantier } from '@/services/ressourcesService';
|
import { getRessources, getUsers, addChantier } from '@/services/ressourcesService';
|
||||||
import { Chantier, Ressources } from '@/class/class';
|
import { Chantier, Ressources } from '@/class/class';
|
||||||
import { ThemedText } from '@/components/themed-text';
|
import { ThemedText } from '@/components/theme/themed-text';
|
||||||
import { ThemedButton } from '@/components/themed-button';
|
import { ThemedButton } from '@/components/theme/themed-button';
|
||||||
import { ThemedTextInput } from '@/components/themed-textinput';
|
import { ThemedTextInput } from '@/components/theme/themed-textinput';
|
||||||
|
|
||||||
export default function AddChantier() {
|
export default function AddChantier() {
|
||||||
const { chantier, setChantier } = useChantier();
|
const { chantier, setChantier } = useChantier();
|
||||||
@@ -96,19 +96,11 @@ export default function AddChantier() {
|
|||||||
<ThemedTextInput lvl = {0} style = {styles.input} placeholder='chef de chantier' value= {chefChantier} onChangeText={setChefChantier}/>
|
<ThemedTextInput lvl = {0} style = {styles.input} placeholder='chef de chantier' value= {chefChantier} onChangeText={setChefChantier}/>
|
||||||
<ThemedText style={{ fontWeight: "bold", marginTop: 15 }}>Équipe</ThemedText>
|
<ThemedText style={{ fontWeight: "bold", marginTop: 15 }}>Équipe</ThemedText>
|
||||||
<SelectChantier
|
<SelectChantier
|
||||||
data={user}
|
|
||||||
multiple
|
|
||||||
selected={userSelect}
|
|
||||||
onChange={setUserSelect}
|
|
||||||
placeholder="Sélectionner l'équipe"
|
|
||||||
/>
|
/>
|
||||||
<Text style={{ fontWeight: "bold", marginTop: 15 }}>Ressources</Text>
|
<Text style={{ fontWeight: "bold", marginTop: 15 }}>Ressources</Text>
|
||||||
<SelectChantier
|
<SelectChantier
|
||||||
data={ressources}
|
|
||||||
multiple
|
|
||||||
selected={ressourcesSelect}
|
|
||||||
onChange={setRessourcesSelect}
|
|
||||||
placeholder="Sélectionner les ressources"
|
|
||||||
/>
|
/>
|
||||||
<ThemedButton
|
<ThemedButton
|
||||||
lvl={1}
|
lvl={1}
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import { Image } from 'expo-image';
|
import { Image } from 'expo-image';
|
||||||
import { Platform, StyleSheet } from 'react-native';
|
import { Platform, StyleSheet } from 'react-native';
|
||||||
|
|
||||||
import { ExternalLink } from '@/components/external-link';
|
import { ExternalLink } from '@/components/expoExempleComponents/external-link';
|
||||||
import ParallaxScrollView from '@/components/parallax-scroll-view';
|
import ParallaxScrollView from '@/components/expoExempleComponents/parallax-scroll-view';
|
||||||
import SelectChantier from '@/components/selectChantier';
|
import SelectChantier from '@/components/selectChantier';
|
||||||
import { ThemedText } from '@/components/themed-text';
|
import { ThemedText } from '@/components/theme/themed-text';
|
||||||
import { ThemedView } from '@/components/themed-view';
|
import { ThemedView } from '@/components/theme/themed-view';
|
||||||
import { Collapsible } from '@/components/ui/collapsible';
|
import { Collapsible } from '@/components/ui/collapsible';
|
||||||
import { IconSymbol } from '@/components/ui/icon-symbol';
|
import { IconSymbol } from '@/components/ui/icon-symbol';
|
||||||
import { Fonts } from '@/constants/theme';
|
import { Fonts } from '@/constants/theme';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { ThemedText } from "@/components/themed-text";
|
import { ThemedText } from "@/components/theme/themed-text";
|
||||||
import { ThemedTextInput } from "@/components/themed-textinput";
|
import { ThemedTextInput } from "@/components/theme/themed-textinput";
|
||||||
import { ThemedView } from "@/components/themed-view";
|
import { ThemedView } from "@/components/theme/themed-view";
|
||||||
import Constants from "expo-constants"; //pour connaître la taille de la barre menu de l'OS en haut
|
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 { useLocalSearchParams, useRouter } from "expo-router";
|
||||||
import React, { useMemo, useState } from "react";
|
import React, { useMemo, useState } from "react";
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { ThemedText } from "@/components/themed-text";
|
import { ThemedText } from "@/components/theme/themed-text";
|
||||||
import { ThemedTextInput } from "@/components/themed-textinput";
|
import { ThemedTextInput } from "@/components/theme/themed-textinput";
|
||||||
import { ThemedView } from "@/components/themed-view";
|
import { ThemedView } from "@/components/theme/themed-view";
|
||||||
import Constants from "expo-constants"; //pour connaître la taille de la barre menu de l'OS en haut
|
import Constants from "expo-constants"; //pour connaître la taille de la barre menu de l'OS en haut
|
||||||
|
|
||||||
import { ThemedButton } from "@/components/themed-button";
|
import { ThemedButton } from "@/components/theme/themed-button";
|
||||||
import { useLocalSearchParams, useRouter } from "expo-router";
|
import { useLocalSearchParams, useRouter } from "expo-router";
|
||||||
import React, { useEffect, useState } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
import { FlatList, Image, StyleSheet, Text, View } from "react-native";
|
import { FlatList, Image, StyleSheet, Text, View } from "react-native";
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import ChantierSummary from '@/components/chantierSummary';
|
import ChantierSummary from '@/components/chantierSummary';
|
||||||
import SelectChantier from '@/components/selectChantier';
|
import SelectChantier from '@/components/selectChantier';
|
||||||
import SetStatus from '@/components/setStatus';
|
import SetStatus from '@/components/setStatus';
|
||||||
import { ThemedView, } from '@/components/themed-view';
|
import { ThemedView, } from '@/components/theme/themed-view';
|
||||||
import Constants from 'expo-constants'; //pour connaître la taille de la barre menu de l'OS en haut
|
import Constants from 'expo-constants'; //pour connaître la taille de la barre menu de l'OS en haut
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { StyleSheet, View,Text } from 'react-native';
|
import { StyleSheet, View,Text } from 'react-native';
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import { Image } from 'expo-image';
|
import { Image } from 'expo-image';
|
||||||
import { Platform, StyleSheet } from 'react-native';
|
import { Platform, StyleSheet } from 'react-native';
|
||||||
|
|
||||||
import { HelloWave } from '@/components/hello-wave';
|
import { HelloWave } from '@/components/expoExempleComponents/hello-wave';
|
||||||
import ParallaxScrollView from '@/components/parallax-scroll-view';
|
import ParallaxScrollView from '@/components/expoExempleComponents/parallax-scroll-view';
|
||||||
import { ThemedText } from '@/components/themed-text';
|
import { ThemedText } from '@/components/theme/themed-text';
|
||||||
import { ThemedView } from '@/components/themed-view';
|
import { ThemedView } from '@/components/theme/themed-view';
|
||||||
import { Link } from 'expo-router';
|
import { Link } from 'expo-router';
|
||||||
|
|
||||||
export default function HomeScreen() {
|
export default function HomeScreen() {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// MapScreen.tsx
|
// MapScreen.tsx
|
||||||
import { ThemedMapView } from '@/components/themed-mapview';
|
import { ThemedMapView } from '@/components/theme/themed-mapview';
|
||||||
import React, { useEffect, useState } from 'react';
|
import React, { useEffect, useState } from 'react';
|
||||||
import { StyleSheet, View, Dimensions, Image, Text } from 'react-native';
|
import { StyleSheet, View, Dimensions, Image, Text } from 'react-native';
|
||||||
import MapView, { Marker, Callout, CalloutSubview, PROVIDER_DEFAULT } from 'react-native-maps';
|
import MapView, { Marker, Callout, CalloutSubview, PROVIDER_DEFAULT } from 'react-native-maps';
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { ThemedView } from "@/components/themed-view";
|
import { ThemedView } from "@/components/theme/themed-view";
|
||||||
import Constants from "expo-constants"; //pour connaître la taille de la barre menu de l'OS en haut
|
import Constants from "expo-constants"; //pour connaître la taille de la barre menu de l'OS en haut
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import {StyleSheet, View } from "react-native";
|
import {StyleSheet, View } from "react-native";
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { ThemedText } from "@/components/themed-text";
|
import { ThemedText } from "@/components/theme/themed-text";
|
||||||
import { ThemedTextInput } from "@/components/themed-textinput";
|
import { ThemedTextInput } from "@/components/theme/themed-textinput";
|
||||||
import { ThemedView } from "@/components/themed-view";
|
import { ThemedView } from "@/components/theme/themed-view";
|
||||||
import { router } from "expo-router";
|
import { router } from "expo-router";
|
||||||
import {
|
import {
|
||||||
signInWithEmailAndPassword
|
signInWithEmailAndPassword
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { Link } from 'expo-router';
|
import { Link } from 'expo-router';
|
||||||
import { StyleSheet } from 'react-native';
|
import { StyleSheet } from 'react-native';
|
||||||
|
|
||||||
import { ThemedText } from '@/components/themed-text';
|
import { ThemedText } from '@/components/theme/themed-text';
|
||||||
import { ThemedView } from '@/components/themed-view';
|
import { ThemedView } from '@/components/theme/themed-view';
|
||||||
|
|
||||||
export default function ModalScreen() {
|
export default function ModalScreen() {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { Chantier } from '@/class/class';
|
import { Chantier } from '@/class/class';
|
||||||
import { ThemedView, } from '@/components/themed-view';
|
import { ThemedView, } from '@/components/theme/themed-view';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Image, StyleProp, StyleSheet, View, ViewStyle } from 'react-native';
|
import { Image, StyleProp, StyleSheet, View, ViewStyle } from 'react-native';
|
||||||
import { ThemedText } from './themed-text';
|
import { ThemedText } from './theme/themed-text';
|
||||||
|
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { Chantier } from '@/class/class';
|
import { Chantier } from '@/class/class';
|
||||||
import { ThemedView, } from '@/components/themed-view';
|
import { ThemedView, } from '@/components/theme/themed-view';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Image, StyleProp, StyleSheet, View, ViewStyle } from 'react-native';
|
import { Image, StyleProp, StyleSheet, View, ViewStyle } from 'react-native';
|
||||||
import { ThemedText } from './themed-text';
|
import { ThemedText } from './theme/themed-text';
|
||||||
|
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import Animated, {
|
|||||||
useScrollOffset,
|
useScrollOffset,
|
||||||
} from 'react-native-reanimated';
|
} from 'react-native-reanimated';
|
||||||
|
|
||||||
import { ThemedView } from '@/components/themed-view';
|
import { ThemedView } from '@/components/theme/themed-view';
|
||||||
import { useColorScheme } from '@/hooks/use-color-scheme';
|
import { useColorScheme } from '@/hooks/use-color-scheme';
|
||||||
import { useThemeColor } from '@/hooks/use-theme-color';
|
import { useThemeColor } from '@/hooks/use-theme-color';
|
||||||
|
|
||||||
@@ -23,7 +23,7 @@ export default function ParallaxScrollView({
|
|||||||
headerImage,
|
headerImage,
|
||||||
headerBackgroundColor,
|
headerBackgroundColor,
|
||||||
}: Props) {
|
}: Props) {
|
||||||
const backgroundColor = useThemeColor({}, 'background');
|
const backgroundColor = useThemeColor({}, 'background3');
|
||||||
const colorScheme = useColorScheme() ?? 'light';
|
const colorScheme = useColorScheme() ?? 'light';
|
||||||
const scrollRef = useAnimatedRef<Animated.ScrollView>();
|
const scrollRef = useAnimatedRef<Animated.ScrollView>();
|
||||||
const scrollOffset = useScrollOffset(scrollRef);
|
const scrollOffset = useScrollOffset(scrollRef);
|
||||||
@@ -15,10 +15,10 @@ import {
|
|||||||
import Animated, {
|
import Animated, {
|
||||||
LinearTransition
|
LinearTransition
|
||||||
} from "react-native-reanimated";
|
} from "react-native-reanimated";
|
||||||
import { ThemedButton } from "./themed-button";
|
import { ThemedButton } from "./theme/themed-button";
|
||||||
import { ThemedText } from "./themed-text";
|
import { ThemedText } from "./theme/themed-text";
|
||||||
import { ThemedTextInput } from "./themed-textinput";
|
import { ThemedTextInput } from "./theme/themed-textinput";
|
||||||
import { ThemedView } from "./themed-view";
|
import { ThemedView } from "./theme/themed-view";
|
||||||
|
|
||||||
const screenHeight = Dimensions.get("window").height;
|
const screenHeight = Dimensions.get("window").height;
|
||||||
const { width, height } = Dimensions.get("window");
|
const { width, height } = Dimensions.get("window");
|
||||||
@@ -57,7 +57,7 @@ export default function SelectChantier() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function onPressAddChantier(){
|
function onPressAddChantier(){
|
||||||
router.push('/(tabs)/ajoute_chantier')
|
router.push('/(tabs)/addChantier')
|
||||||
setIsOpen(false)
|
setIsOpen(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ import { changeChantierStatus } from "@/services/ressourcesService";
|
|||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import { Dimensions, LayoutAnimation, Modal, Pressable, StyleSheet, View } from 'react-native';
|
import { Dimensions, LayoutAnimation, Modal, Pressable, StyleSheet, View } from 'react-native';
|
||||||
import Animated, { LinearTransition } from 'react-native-reanimated';
|
import Animated, { LinearTransition } from 'react-native-reanimated';
|
||||||
import { ThemedButton } from './themed-button';
|
import { ThemedButton } from './theme/themed-button';
|
||||||
import { ThemedText } from './themed-text';
|
import { ThemedText } from './theme/themed-text';
|
||||||
import { ThemedView } from "./themed-view";
|
import { ThemedView } from "./theme/themed-view";
|
||||||
|
|
||||||
const { width, height } = Dimensions.get("window");
|
const { width, height } = Dimensions.get("window");
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { PropsWithChildren, useState } from 'react';
|
import { PropsWithChildren, useState } from 'react';
|
||||||
import { StyleSheet, TouchableOpacity } from 'react-native';
|
import { StyleSheet, TouchableOpacity } from 'react-native';
|
||||||
|
|
||||||
import { ThemedText } from '@/components/themed-text';
|
import { ThemedText } from '@/components/theme/themed-text';
|
||||||
import { ThemedView } from '@/components/themed-view';
|
import { ThemedView } from '@/components/theme/themed-view';
|
||||||
import { IconSymbol } from '@/components/ui/icon-symbol';
|
import { IconSymbol } from '@/components/ui/icon-symbol';
|
||||||
import { Colors } from '@/constants/theme';
|
import { Colors } from '@/constants/theme';
|
||||||
import { useColorScheme } from '@/hooks/use-color-scheme';
|
import { useColorScheme } from '@/hooks/use-color-scheme';
|
||||||
|
|||||||
Reference in New Issue
Block a user