Add schedule and requests screens with workdays fetching and navigation
This commit is contained in:
98
app/requests.tsx
Normal file
98
app/requests.tsx
Normal file
@@ -0,0 +1,98 @@
|
||||
import { Ionicons, MaterialCommunityIcons, MaterialIcons } from '@expo/vector-icons';
|
||||
import { useRouter } from 'expo-router';
|
||||
import React, { useEffect } from 'react';
|
||||
import { StyleSheet, Text, TouchableOpacity, View } from "react-native";
|
||||
|
||||
const PRIMARY = '#A24BFA';
|
||||
const BG = '#0c0a0a';
|
||||
|
||||
export default function Requests() {
|
||||
useEffect(() => {
|
||||
console.log('Requests oldal betöltve');
|
||||
}, []);
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<View style={styles.card}>
|
||||
<Text style={styles.label}>Kérelmek funkció hamarosan…</Text>
|
||||
</View>
|
||||
<View style={styles.navBar}>
|
||||
<NavBar activeTab="requests" />
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function NavBar({ activeTab }: { activeTab: string }) {
|
||||
const router = useRouter();
|
||||
return (
|
||||
<View style={styles.navBar}>
|
||||
<TouchableOpacity style={styles.navItem} onPress={() => router.replace('/profile')}>
|
||||
<MaterialIcons name="person" size={28} color={activeTab === 'profile' ? PRIMARY : '#bdbdbd'} />
|
||||
<Text style={[styles.navLabel, { color: activeTab === 'profile' ? PRIMARY : '#bdbdbd' }]}>Profilom</Text>
|
||||
</TouchableOpacity>
|
||||
<TouchableOpacity style={styles.navItem} onPress={() => router.replace('/schedule')}>
|
||||
<MaterialCommunityIcons name="calendar-month" size={28} color={activeTab === 'schedule' ? PRIMARY : '#bdbdbd'} />
|
||||
<Text style={[styles.navLabel, { color: activeTab === 'schedule' ? PRIMARY : '#bdbdbd' }]}>Beosztás</Text>
|
||||
</TouchableOpacity>
|
||||
<TouchableOpacity style={styles.navItem} onPress={() => router.replace('/requests')}>
|
||||
<Ionicons name="mail" size={28} color={activeTab === 'requests' ? PRIMARY : '#bdbdbd'} />
|
||||
<Text style={[styles.navLabel, { color: activeTab === 'requests' ? PRIMARY : '#bdbdbd' }]}>Kérelmek</Text>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
container: {
|
||||
flex: 1,
|
||||
backgroundColor: BG,
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
paddingBottom: 64,
|
||||
},
|
||||
card: {
|
||||
backgroundColor: 'rgba(24, 20, 28, 0.95)',
|
||||
borderRadius: 24,
|
||||
padding: 32,
|
||||
width: '90%',
|
||||
maxWidth: 400,
|
||||
shadowColor: '#000',
|
||||
shadowOpacity: 0.3,
|
||||
shadowRadius: 24,
|
||||
shadowOffset: { width: 0, height: 8 },
|
||||
elevation: 8,
|
||||
marginBottom: 32,
|
||||
marginTop: 32,
|
||||
},
|
||||
label: {
|
||||
color: '#bdbdbd',
|
||||
fontSize: 16,
|
||||
marginBottom: 16,
|
||||
fontWeight: 'bold',
|
||||
textAlign: 'center',
|
||||
},
|
||||
navBar: {
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'space-around',
|
||||
alignItems: 'center',
|
||||
backgroundColor: 'rgba(24, 20, 28, 0.98)',
|
||||
borderTopWidth: 1,
|
||||
borderTopColor: '#222',
|
||||
position: 'absolute',
|
||||
bottom: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
height: 64,
|
||||
paddingHorizontal: 16,
|
||||
},
|
||||
navItem: {
|
||||
flex: 1,
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
},
|
||||
navLabel: {
|
||||
fontSize: 13,
|
||||
marginTop: 2,
|
||||
fontWeight: 'bold',
|
||||
},
|
||||
});
|
Reference in New Issue
Block a user