Pushing the first elements to work on another machine

This commit is contained in:
Alexis Leboeuf
2025-12-11 21:25:14 +01:00
parent d29e2f34e2
commit e43811d6f8
3 changed files with 45 additions and 47 deletions

View File

@@ -6,25 +6,24 @@ import Constants from 'expo-constants'; //pour connaître la taille de la barre
import React from 'react';
import { StyleSheet, View } from 'react-native';
import { useChantier } from '../ContextChantier';
import { useUser } from '../ContextUser';
export default function Home() {
const { chantier, setChantier } = useChantier();
const { role } = useUser();
return(
<ThemedView lvl={3} style={styles.back}>
<View style={styles.container}>
<View style={{width:"100%", position: 'absolute',marginLeft:"50%"}}>
<SetStatus></SetStatus>
</View>
<View style={{width:"100%", position: 'absolute'}}>
<SelectChantier></SelectChantier>
</View>
<ChantierSummary style={styles.summary} data={{chantier}}/>
{role === "chef" && <SetStatus />}
{role === "resp" && <SelectChantier />}
{role === "ouvrier" && (
<ChantierSummary style={styles.summary} data={{ chantier }} />
)}
</View>
</ThemedView>