diff --git a/app/(tabs)/_layout.tsx b/app/(tabs)/_layout.tsx
index 6dd0f24..d8e3a20 100644
--- a/app/(tabs)/_layout.tsx
+++ b/app/(tabs)/_layout.tsx
@@ -7,8 +7,10 @@ import { HapticTab } from '@/components/haptic-tab';
import { IconSymbol } from '@/components/ui/icon-symbol';
import { Colors } from '@/constants/theme';
import { useColorScheme } from '@/hooks/use-color-scheme';
-import TabTwoScreen from './mapScreen';
-import HomeScreen from './bonjourFL';
+import TabTwoScreen from './index';
+import HomeScreen from './explore';
+import ListMateriel from './gestionnaire_ressource';
+import BonjourScreen from './bonjourFL';
const Tabs = createBottomTabNavigator();
@@ -17,27 +19,40 @@ export default function TabLayout() {
return (
+
+ (
+
+ ),
+ }}
+ />
,
}}
/>
,
}}
>
- {() => }
+
diff --git a/app/(tabs)/explore.tsx b/app/(tabs)/explore.tsx
index 341a35a..2e66b57 100644
--- a/app/(tabs)/explore.tsx
+++ b/app/(tabs)/explore.tsx
@@ -1,5 +1,5 @@
import { Image } from 'expo-image';
-import { Platform, StyleSheet } from 'react-native';
+import { Platform, StyleSheet, View } from 'react-native';
import { ExternalLink } from '@/components/external-link';
import ParallaxScrollView from '@/components/parallax-scroll-view';
@@ -8,7 +8,8 @@ import { ThemedView } from '@/components/themed-view';
import { Collapsible } from '@/components/ui/collapsible';
import { IconSymbol } from '@/components/ui/icon-symbol';
import { Fonts } from '@/constants/theme';
-import SelectChantier from './selectChantier';
+import SelectChantier from '@/components/selectChantier';
+
export default function TabTwoScreen() {
return (
@@ -21,8 +22,10 @@ export default function TabTwoScreen() {
name="chevron.left.forwardslash.chevron.right"
style={styles.headerImage}
/>
- }>
-
+ }>
+
+
+
{
+ if (!item) {
+ // optionnel : afficher un placeholder pour debug
+ // return Item manquant;
+ return null;
+ }
+ return(
+
+
+
+ {item.id}
+ {item.name}
+ {item.type}
+
+ );
+ };
+
+ return(
+
+ index.toString()}
+ contentContainerStyle={{ paddingBottom: 40 }}
+ ListHeaderComponent={
+
+
+ Bonjour {prenom} {nom}
+
+
+ {/* 🔍 Champ de recherche */}
+
+
+ }
+ ListEmptyComponent={
+ Aucun résultat trouvé 😕
+ }
+ />
+
+
+
+
+ )
+}
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ backgroundColor: '#fff',
+ },
+ header: {
+ marginTop: 60,
+ marginBottom: 20,
+ alignItems: 'center',
+ paddingHorizontal: 20,
+ },
+ text: {
+ fontSize: 22,
+ fontWeight: 'bold',
+ marginBottom: 10,
+ },
+ input: {
+ width: '100%',
+ borderWidth: 1,
+ borderColor: '#ccc',
+ borderRadius: 10,
+ padding: 10,
+ fontSize: 16,
+ },
+ card: {
+ flexDirection: 'row',
+ marginHorizontal: 20,
+ marginBottom: 15,
+ borderWidth: 1,
+ borderColor: '#ddd',
+ borderRadius: 10,
+ padding: 10,
+ backgroundColor: '#fafafa',
+ },
+ image: {
+ width: 80,
+ height: 80,
+ borderRadius: 8,
+ marginRight: 10,
+ },
+ info: {
+ flex: 1,
+ justifyContent: 'center',
+ },
+ group: {
+ fontWeight: 'bold',
+ fontSize: 16,
+ marginBottom: 5,
+ },
+ footer: {
+ padding: 20,
+ },
+ empty: {
+ textAlign: 'center',
+ marginTop: 30,
+ color: '#888',
+ },
+});
\ No newline at end of file
diff --git a/components/Theme.tsx b/components/Theme.tsx
new file mode 100644
index 0000000..e4f41ab
--- /dev/null
+++ b/components/Theme.tsx
@@ -0,0 +1,17 @@
+import {Appearance,ColorSchemeName } from "react-native";
+import {lightTheme,darkTheme} from './themeColors';
+
+
+declare global {
+ var theme: typeof lightTheme;
+}
+
+global.theme = Appearance.getColorScheme() === "light" ? lightTheme : darkTheme;
+
+
+/*Appearance.addChangeListener(({ colorScheme }) => {
+ if(colorScheme==="light"){
+ global.theme = lightTheme;
+ }
+ else global.theme = darkTheme;
+});*/
\ No newline at end of file
diff --git a/app/(tabs)/selectChantier.tsx b/components/selectChantier.tsx
similarity index 77%
rename from app/(tabs)/selectChantier.tsx
rename to components/selectChantier.tsx
index f04d1cc..ffde4a5 100644
--- a/app/(tabs)/selectChantier.tsx
+++ b/components/selectChantier.tsx
@@ -1,15 +1,27 @@
+import { ThemedView } from '@/components/themed-view';
import { useState } from 'react';
import { Button, GestureResponderEvent, ScrollView, StyleSheet, TextInput, View } from 'react-native';
+import "@/components/Theme";
export default function SelectChantier() {
const [search, setSearch] = useState('');
const [isOpen,setIsOpen] = useState(false);
+ const [chantiers,setChantiers] = useState([]);
+
function onPressOpen(event: GestureResponderEvent): void {
setIsOpen(!isOpen);
}
+
+ const renderChantier = () => {
+ return(
+
+
+ );
+ };
+
return (
{!isOpen && (
@@ -39,13 +51,23 @@ export default function SelectChantier() {
}
const styles = StyleSheet.create({
+ selectZone:{
+ position: 'absolute',
+ backgroundColor: global.theme.colors.c0,
+ width: "100%",
+ margin: 0,
+ borderRadius: 5,
+ zIndex: 9999,
+ elevation: 9999,
+ },
titleContainer: {
flexDirection: 'row',
alignItems: 'center',
gap: 8,
},
searchMenu:{
- backgroundColor: "#BB0000",
+ backgroundColor: global.theme.colors.c2,
+ borderRadius: 5,
width: "100%",
margin: 0,
@@ -57,13 +79,7 @@ const styles = StyleSheet.create({
marginTop:50,
alignItems: 'center',
},
- selectZone:{
- position: 'absolute',
- backgroundColor: "#FF0000",
- width: "100%",
- margin: 10,
- borderRadius: 5,
- zIndex: 9999,
- elevation: 9999,
+ chantier:{
+ backgroundColor:'#202020'
}
});
diff --git a/components/themeColors.tsx b/components/themeColors.tsx
new file mode 100644
index 0000000..0b5c3e0
--- /dev/null
+++ b/components/themeColors.tsx
@@ -0,0 +1,25 @@
+export const lightTheme = {
+ colors: {
+ text: '#000000',
+ text2: '#505050',
+ c0: '#FFFFFF',
+ c1: '#F0F0F0',
+ c2: '#E0E0E0',
+ c3: '#D0D0D0',
+ c4: '#C0C0C0',
+ c5: '#B0B0B0',
+ },
+};
+
+export const darkTheme = {
+ colors: {
+ text: '#FFFFFF',
+ text2: '#B0B0B0',
+ c0:'#000000',
+ c1: '#101010',
+ c2: '#202020',
+ c3: '#303030',
+ c4: '#404040',
+ c5: '#505050',
+ },
+};
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index 9742a0c..40b77ce 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -84,6 +84,7 @@
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.4.tgz",
"integrity": "sha512-2BCOP7TN8M+gVDj7/ht3hsaO/B/n5oDbiAyyvnRlNOs+u1o+JWNYTQrmpuNp1/Wq2gcFrI01JAW+paEKDMx/CA==",
"license": "MIT",
+ "peer": true,
"dependencies": {
"@babel/code-frame": "^7.27.1",
"@babel/generator": "^7.28.3",
@@ -1465,6 +1466,7 @@
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.4.tgz",
"integrity": "sha512-Q/N6JNWvIvPnLDvjlE1OUBLPQHH6l3CltCEsHIujp45zQUSSh8K+gHnaEX45yAT1nyngnINhvWtzN+Nb9D8RAQ==",
"license": "MIT",
+ "peer": true,
"engines": {
"node": ">=6.9.0"
}
@@ -3164,6 +3166,7 @@
"resolved": "https://registry.npmjs.org/@react-navigation/native/-/native-7.1.18.tgz",
"integrity": "sha512-DZgd6860dxcq3YX7UzIXeBr6m3UgXvo9acxp5jiJyIZXdR00Br9JwVkO7e0bUeTA2d3Z8dsmtAR84Y86NnH64Q==",
"license": "MIT",
+ "peer": true,
"dependencies": {
"@react-navigation/core": "^7.12.4",
"escape-string-regexp": "^4.0.0",
@@ -3366,6 +3369,7 @@
"integrity": "sha512-Qec1E3mhALmaspIrhWt9jkQMNdw6bReVu64mjvhbhq2NFPftLPVr+l1SZgmw/66WwBNpDh7ao5AT6gF5v41PFA==",
"devOptional": true,
"license": "MIT",
+ "peer": true,
"dependencies": {
"csstype": "^3.0.2"
}
@@ -3437,6 +3441,7 @@
"integrity": "sha512-n1H6IcDhmmUEG7TNVSspGmiHHutt7iVKtZwRppD7e04wha5MrkV1h3pti9xQLcCMt6YWsncpoT0HMjkH1FNwWQ==",
"dev": true,
"license": "MIT",
+ "peer": true,
"dependencies": {
"@typescript-eslint/scope-manager": "8.46.0",
"@typescript-eslint/types": "8.46.0",
@@ -3999,6 +4004,7 @@
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz",
"integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
"license": "MIT",
+ "peer": true,
"bin": {
"acorn": "bin/acorn"
},
@@ -4684,6 +4690,7 @@
}
],
"license": "MIT",
+ "peer": true,
"dependencies": {
"baseline-browser-mapping": "^2.8.9",
"caniuse-lite": "^1.0.30001746",
@@ -5823,6 +5830,7 @@
"integrity": "sha512-XyLmROnACWqSxiGYArdef1fItQd47weqB7iwtfr9JHwRrqIXZdcFMvvEcL9xHCmL0SNsOvF0c42lWyM1U5dgig==",
"dev": true,
"license": "MIT",
+ "peer": true,
"dependencies": {
"@eslint-community/eslint-utils": "^4.8.0",
"@eslint-community/regexpp": "^4.12.1",
@@ -6020,6 +6028,7 @@
"integrity": "sha512-whOE1HFo/qJDyX4SnXzP4N6zOWn79WhnCUY/iDR0mPfQZO8wcYE4JClzI2oZrhBnnMUCBCHZhO6VQyoBU95mZA==",
"dev": true,
"license": "MIT",
+ "peer": true,
"dependencies": {
"@rtsao/scc": "^1.1.0",
"array-includes": "^3.1.9",
@@ -6258,6 +6267,7 @@
"resolved": "https://registry.npmjs.org/expo/-/expo-54.0.13.tgz",
"integrity": "sha512-F1puKXzw8ESnsbvaKdXtcIiyYLQ2kUHqP8LuhgtJS1wm6w55VhtOPg8yl/0i8kPbTA0YfD+KYdXjSfhPXgUPxw==",
"license": "MIT",
+ "peer": true,
"dependencies": {
"@babel/runtime": "^7.20.0",
"@expo/cli": "54.0.11",
@@ -6325,6 +6335,7 @@
"resolved": "https://registry.npmjs.org/expo-constants/-/expo-constants-18.0.9.tgz",
"integrity": "sha512-sqoXHAOGDcr+M9NlXzj1tGoZyd3zxYDy215W6E0Z0n8fgBaqce9FAYQE2bu5X4G629AYig5go7U6sQz7Pjcm8A==",
"license": "MIT",
+ "peer": true,
"dependencies": {
"@expo/config": "~12.0.9",
"@expo/env": "~2.0.7"
@@ -6349,6 +6360,7 @@
"resolved": "https://registry.npmjs.org/expo-font/-/expo-font-14.0.9.tgz",
"integrity": "sha512-xCoQbR/36qqB6tew/LQ6GWICpaBmHLhg/Loix5Rku/0ZtNaXMJv08M9o1AcrdiGTn/Xf/BnLu6DgS45cWQEHZg==",
"license": "MIT",
+ "peer": true,
"dependencies": {
"fontfaceobserver": "^2.1.0"
},
@@ -6399,6 +6411,7 @@
"resolved": "https://registry.npmjs.org/expo-linking/-/expo-linking-8.0.8.tgz",
"integrity": "sha512-MyeMcbFDKhXh4sDD1EHwd0uxFQNAc6VCrwBkNvvvufUsTYFq3glTA9Y8a+x78CPpjNqwNAamu74yIaIz7IEJyg==",
"license": "MIT",
+ "peer": true,
"dependencies": {
"expo-constants": "~18.0.8",
"invariant": "^2.2.4"
@@ -10538,6 +10551,7 @@
"resolved": "https://registry.npmjs.org/react/-/react-19.1.0.tgz",
"integrity": "sha512-FS+XFBNvn3GTAWq26joslQgWNoFu08F4kl0J4CgdNKADkdSGXQyTCnKteIAJy96Br6YbpEU1LSzV5dYtjMkMDg==",
"license": "MIT",
+ "peer": true,
"engines": {
"node": ">=0.10.0"
}
@@ -10557,6 +10571,7 @@
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.1.0.tgz",
"integrity": "sha512-Xs1hdnE+DyKgeHJeJznQmYMIBG3TKIHJJT95Q58nHLSrElKlGQqDTR2HQ9fx5CN/Gk6Vh/kupBTDLU11/nDk/g==",
"license": "MIT",
+ "peer": true,
"dependencies": {
"scheduler": "^0.26.0"
},
@@ -10593,6 +10608,7 @@
"resolved": "https://registry.npmjs.org/react-native/-/react-native-0.81.4.tgz",
"integrity": "sha512-bt5bz3A/+Cv46KcjV0VQa+fo7MKxs17RCcpzjftINlen4ZDUl0I6Ut+brQ2FToa5oD0IB0xvQHfmsg2EDqsZdQ==",
"license": "MIT",
+ "peer": true,
"dependencies": {
"@jest/create-cache-key-function": "^29.7.0",
"@react-native/assets-registry": "0.81.4",
@@ -10650,6 +10666,7 @@
"resolved": "https://registry.npmjs.org/react-native-gesture-handler/-/react-native-gesture-handler-2.28.0.tgz",
"integrity": "sha512-0msfJ1vRxXKVgTgvL+1ZOoYw3/0z1R+Ked0+udoJhyplC2jbVKIJ8Z1bzWdpQRCV3QcQ87Op0zJVE5DhKK2A0A==",
"license": "MIT",
+ "peer": true,
"dependencies": {
"@egjs/hammerjs": "^2.0.17",
"hoist-non-react-statics": "^3.3.0",
@@ -10697,6 +10714,7 @@
"resolved": "https://registry.npmjs.org/react-native-reanimated/-/react-native-reanimated-4.1.3.tgz",
"integrity": "sha512-GP8wsi1u3nqvC1fMab/m8gfFwFyldawElCcUSBJQgfrXeLmsPPUOpDw44lbLeCpcwUuLa05WTVePdTEwCLTUZg==",
"license": "MIT",
+ "peer": true,
"dependencies": {
"react-native-is-edge-to-edge": "^1.2.1",
"semver": "7.7.2"
@@ -10725,6 +10743,7 @@
"resolved": "https://registry.npmjs.org/react-native-safe-area-context/-/react-native-safe-area-context-5.6.1.tgz",
"integrity": "sha512-/wJE58HLEAkATzhhX1xSr+fostLsK8Q97EfpfMDKo8jlOc1QKESSX/FQrhk7HhQH/2uSaox4Y86sNaI02kteiA==",
"license": "MIT",
+ "peer": true,
"peerDependencies": {
"react": "*",
"react-native": "*"
@@ -10735,6 +10754,7 @@
"resolved": "https://registry.npmjs.org/react-native-screens/-/react-native-screens-4.16.0.tgz",
"integrity": "sha512-yIAyh7F/9uWkOzCi1/2FqvNvK6Wb9Y1+Kzn16SuGfN9YFJDTbwlzGRvePCNTOX0recpLQF3kc2FmvMUhyTCH1Q==",
"license": "MIT",
+ "peer": true,
"dependencies": {
"react-freeze": "^1.0.0",
"react-native-is-edge-to-edge": "^1.2.1",
@@ -10750,6 +10770,7 @@
"resolved": "https://registry.npmjs.org/react-native-web/-/react-native-web-0.21.1.tgz",
"integrity": "sha512-BeNsgwwe4AXUFPAoFU+DKjJ+CVQa3h54zYX77p7GVZrXiiNo3vl03WYDYVEy5R2J2HOPInXtQZB5gmj3vuzrKg==",
"license": "MIT",
+ "peer": true,
"dependencies": {
"@babel/runtime": "^7.18.6",
"@react-native/normalize-colors": "^0.74.1",
@@ -10782,6 +10803,7 @@
"resolved": "https://registry.npmjs.org/react-native-worklets/-/react-native-worklets-0.5.1.tgz",
"integrity": "sha512-lJG6Uk9YuojjEX/tQrCbcbmpdLCSFxDK1rJlkDhgqkVi1KZzG7cdcBFQRqyNOOzR9Y0CXNuldmtWTGOyM0k0+w==",
"license": "MIT",
+ "peer": true,
"dependencies": {
"@babel/plugin-transform-arrow-functions": "^7.0.0-0",
"@babel/plugin-transform-class-properties": "^7.0.0-0",
@@ -10892,6 +10914,7 @@
"resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.2.tgz",
"integrity": "sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA==",
"license": "MIT",
+ "peer": true,
"engines": {
"node": ">=0.10.0"
}
@@ -12314,6 +12337,7 @@
"integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
"dev": true,
"license": "MIT",
+ "peer": true,
"engines": {
"node": ">=12"
},
@@ -12520,6 +12544,7 @@
"integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
"dev": true,
"license": "Apache-2.0",
+ "peer": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
@@ -13466,6 +13491,7 @@
"resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz",
"integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==",
"license": "MIT",
+ "peer": true,
"funding": {
"url": "https://github.com/sponsors/colinhacks"
}
diff --git a/package.json b/package.json
index 73519b6..5c10d98 100644
--- a/package.json
+++ b/package.json
@@ -31,7 +31,6 @@
"react-dom": "19.1.0",
"react-native": "0.81.4",
"react-native-gesture-handler": "~2.28.0",
- "react-native-maps": "1.20.1",
"react-native-reanimated": "~4.1.1",
"react-native-safe-area-context": "~5.6.0",
"react-native-screens": "~4.16.0",