diff --git a/app/(tabs)/home.tsx b/app/(tabs)/home.tsx
index e5573a9..e1b9b02 100644
--- a/app/(tabs)/home.tsx
+++ b/app/(tabs)/home.tsx
@@ -14,14 +14,11 @@ export default function Home() {
return(
-
-
-
-
-
-
+
-
+
+
+
diff --git a/components/selectChantier.tsx b/components/selectChantier.tsx
index 5a357e8..a821ca5 100644
--- a/components/selectChantier.tsx
+++ b/components/selectChantier.tsx
@@ -68,6 +68,7 @@ export default function SelectChantier() {
+ {chantier.chef != null ? "true" : "false"}
Adresse: {chantier.adresse}
Chef de chantier: {chantier.chef.last_name}{" "}{chantier.chef.name}
État: {chantier.etat}
@@ -104,7 +105,7 @@ export default function SelectChantier() {
const styles = StyleSheet.create({
windowClose: {
- //backgroundColor: '#00FFFF',
+ //backgroundColor: '#00FF0040',
//borderRadius:10,
padding: 10,
width: "50%",
@@ -112,7 +113,7 @@ const styles = StyleSheet.create({
overflow: "hidden",
},
windowOpean: {
- //backgroundColor: '#00FFFF',
+ //backgroundColor: '#00FF0040',
//borderRadius:10,
width: "100%",
height: screenHeight / 2,
diff --git a/components/setStatus.tsx b/components/setStatus.tsx
index ca004e7..6ed04a1 100644
--- a/components/setStatus.tsx
+++ b/components/setStatus.tsx
@@ -1,6 +1,6 @@
import { useChantier } from '@/app/ContextChantier';
import { useState } from 'react';
-import { Dimensions, LayoutAnimation, Pressable, StyleSheet, View } from 'react-native';
+import { Dimensions, LayoutAnimation, Modal, Pressable, StyleSheet, View } from 'react-native';
import Animated, { LinearTransition } from 'react-native-reanimated';
import { ThemedButton } from './themed-button';
import { ThemedText } from './themed-text';
@@ -50,43 +50,53 @@ export default function SetStatus() {
return(
-
-
-
- onPressOpen()}>
- {currentSatus}
-
- {isOpen &&
-
-
-
- {choices.map((str, index) => (
- str!==currentSatus && choice(str, index)
- ))}
-
-
- }
-
-
+ <>
+ setIsOpen(false)}
+ >
+ {isOpen && (
+ setIsOpen(false)}
+ />
+ )}
+
+
+
+ onPressOpen()}>
+ {currentSatus}
+
+ {isOpen &&
+
+
+
+ {choices.map((str, index) => (
+ str!==currentSatus && choice(str, index)
+ ))}
+
+
+ }
+
+
+ >
)
}
const styles = StyleSheet.create({
-
- windowClose:{
- //backgroundColor: '#00FFFF',
- //borderRadius:10,
- padding: 10,
- width:"50%",
- //height:60,
- overflow: 'hidden',
+ overlay: {
+ ...StyleSheet.absoluteFillObject,
+ zIndex: 1,
},
- windowOpean:{
- width:"50%",
+ windowBox:{
+ //backgroundColor: '#00FFFF40',
+ width:"30%",
padding: 10,
+ paddingLeft: 0,
+ overflow: 'hidden',
},
window:{
borderRadius:15,
@@ -106,7 +116,7 @@ const styles = StyleSheet.create({
},
satus:{
padding:10,
- flexDirection: 'row',
+ margin:5,
},
button:{
width:'100%',
@@ -117,5 +127,6 @@ const styles = StyleSheet.create({
},
centeredText:{
textAlign: 'center',
+ fontSize: 13,
}
});
diff --git a/services/ressourcesService.ts b/services/ressourcesService.ts
index 8c9d4f2..21539e6 100644
--- a/services/ressourcesService.ts
+++ b/services/ressourcesService.ts
@@ -1,7 +1,6 @@
-import { collection, getDocs, getDoc } from "firebase/firestore";
+import { collection, getDoc, getDocs, Timestamp } from "firebase/firestore";
+import { Chantier, Reservation, Ressources, User } from "../class/class";
import { db } from "../firebase_config";
-import { Timestamp } from "firebase/firestore";
-import { Chantier, User, Ressources, Reservation } from "../class/class";
export async function getUsers(): Promise {
try {
@@ -38,7 +37,7 @@ export async function getRessources(): Promise {
}
export async function getChantiers(): Promise {
- const snap = await getDocs(collection(db, "chantiers"));
+ const snap = await getDocs(collection(db, "chantier"));
const chantiers: Chantier[] = [];
for (const docSnap of snap.docs) {