| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326 |
- import { View, Text, StyleSheet, Image, ScrollView } from 'react-native';
- import TabViewComponent, { TabItem } from '../global/tabView';
- import NormalButton from '../global/normal_button';
- interface BookingMenuPageProps {}
- const dummyTabItems: TabItem[] = [
- {
- imgURL: require('../../assets/dummyStationPicture.png'),
- date: '今天',
- time: '16:30',
- chargeStationName: '上環街市充電站',
- chargeStationAddress: '香港上環皇后大道中345號',
- distance: '400米'
- },
- {
- imgURL: require('../../assets/dummyStationPicture2.png'),
- date: '3月15',
- time: '17:45',
- chargeStationName: '中環IFC充電站',
- chargeStationAddress: '香港中環皇后大道中999號',
- distance: '680米'
- },
- {
- imgURL: require('../../assets/dummyStationPicture2.png'),
- date: '4月20',
- time: '12:30',
- chargeStationName: '中環IFC充電站',
- chargeStationAddress: '香港中環皇后大道中999號',
- distance: '680米'
- }
- ];
- const BookingMenuPage: React.FC<BookingMenuPageProps> = () => {
- return (
- <View style={styles.container}>
- <View style={styles.topContainer}>
- <Text style={{ fontSize: 45 }}>預約</Text>
- <NormalButton
- title={
- <Text
- style={{
- color: 'white',
- fontSize: 16,
- fontWeight: '800'
- }}
- >
- + 新增預約
- </Text>
- }
- onPress={() => console.log('abc')}
- />
- <View style={styles.recentBookingMainContainer}>
- <Text
- style={{
- fontWeight: 400,
- fontSize: 16,
- color: '#222222',
- marginBottom: '5%'
- }}
- >
- 近期預約過
- </Text>
- <ScrollView>
- <View style={styles.recentBookingRowContainer}>
- <Image
- source={require('../../assets/bookingLogo.png')}
- style={{ height: 40, width: 40 }}
- />
- <View
- style={{
- flexDirection: 'row',
- justifyContent: 'space-between',
- flex: 1,
- borderBottomWidth: 0.5,
- paddingVertical: 15,
- borderColor: '#ccc',
- borderRadius: 8
- }}
- >
- <View
- style={{
- marginLeft: 15,
- gap: 3
- }}
- >
- <Text
- style={{
- fontSize: 16,
- color: '#222222'
- }}
- >
- 充電站#1
- </Text>
- <Text
- style={{
- fontSize: 16,
- color: '#888888'
- }}
- >
- 充電站地址#1
- </Text>
- </View>
- <NormalButton
- title={
- <Text style={{ color: '#061E25' }}>
- 重新預約
- </Text>
- }
- onPress={() => console.log('abc')}
- buttonPressedStyle={{
- backgroundColor: '#CFDEE4'
- }}
- extendedStyle={{
- backgroundColor: '#E3F2F8',
- paddingHorizontal: 25,
- paddingVertical: 1,
- borderRadius: 8
- }}
- />
- </View>
- </View>
- <View style={styles.recentBookingRowContainer}>
- <Image
- source={require('../../assets/bookingLogo.png')}
- style={{ height: 40, width: 40 }}
- />
- <View
- style={{
- flexDirection: 'row',
- justifyContent: 'space-between',
- flex: 1,
- borderBottomWidth: 0.5,
- paddingVertical: 15,
- borderColor: '#ccc',
- borderRadius: 8
- }}
- >
- <View
- style={{
- marginLeft: 15,
- gap: 3
- }}
- >
- <Text
- style={{
- fontSize: 16,
- color: '#222222'
- }}
- >
- 充電站#2
- </Text>
- <Text
- style={{
- fontSize: 16,
- color: '#888888'
- }}
- >
- 充電站地址#2
- </Text>
- </View>
- <NormalButton
- title={
- <Text style={{ color: '#061E25' }}>
- 重新預約
- </Text>
- }
- onPress={() => console.log('abc')}
- buttonPressedStyle={{
- backgroundColor: '#CFDEE4'
- }}
- extendedStyle={{
- backgroundColor: '#E3F2F8',
- paddingHorizontal: 25,
- paddingVertical: 1,
- borderRadius: 8
- }}
- />
- </View>
- </View>
- <View style={styles.recentBookingRowContainer}>
- <Image
- source={require('../../assets/bookingLogo.png')}
- style={{ height: 40, width: 40 }}
- />
- <View
- style={{
- flexDirection: 'row',
- justifyContent: 'space-between',
- flex: 1,
- borderBottomWidth: 0.5,
- paddingVertical: 15,
- borderColor: '#ccc',
- borderRadius: 8
- }}
- >
- <View
- style={{
- marginLeft: 15,
- gap: 3
- }}
- >
- <Text
- style={{
- fontSize: 16,
- color: '#222222'
- }}
- >
- 充電站#3
- </Text>
- <Text
- style={{
- fontSize: 16,
- color: '#888888'
- }}
- >
- 充電站地址#3
- </Text>
- </View>
- <NormalButton
- title={
- <Text style={{ color: '#061E25' }}>
- 重新預約
- </Text>
- }
- onPress={() => console.log('abc')}
- buttonPressedStyle={{
- backgroundColor: '#CFDEE4'
- }}
- extendedStyle={{
- backgroundColor: '#E3F2F8',
- paddingHorizontal: 25,
- paddingVertical: 1,
- borderRadius: 8
- }}
- />
- </View>
- </View>
- <View style={styles.recentBookingRowContainer}>
- <Image
- source={require('../../assets/bookingLogo.png')}
- style={{ height: 40, width: 40 }}
- />
- <View
- style={{
- flexDirection: 'row',
- justifyContent: 'space-between',
- flex: 1,
- borderBottomWidth: 0.5,
- paddingVertical: 15,
- borderColor: '#ccc',
- borderRadius: 8
- }}
- >
- <View
- style={{
- marginLeft: 15,
- gap: 3
- }}
- >
- <Text
- style={{
- fontSize: 16,
- color: '#222222'
- }}
- >
- 充電站#4
- </Text>
- <Text
- style={{
- fontSize: 16,
- color: '#888888'
- }}
- >
- 充電站地址#4
- </Text>
- </View>
- <NormalButton
- title={
- <Text style={{ color: '#061E25' }}>
- 重新預約
- </Text>
- }
- onPress={() => console.log('abc')}
- buttonPressedStyle={{
- backgroundColor: '#CFDEE4'
- }}
- extendedStyle={{
- backgroundColor: '#E3F2F8',
- paddingHorizontal: 25,
- paddingVertical: 1,
- borderRadius: 8
- }}
- />
- </View>
- </View>
- </ScrollView>
- </View>
- </View>
- <View style={styles.tabViewContainer}>
- <TabViewComponent
- titles={['已預約', '已完成']}
- tabItems={dummyTabItems}
- />
- </View>
- </View>
- );
- };
- const styles = StyleSheet.create({
- container: { flex: 1, backgroundColor: 'white' },
- topContainer: {
- flex: 1,
- gap: 20,
- marginTop: 25,
- marginHorizontal: '5%'
- },
- recentBookingMainContainer: { flex: 1 },
- recentBookingRowContainer: {
- flexDirection: 'row',
- alignItems: 'center'
- },
- tabViewContainer: { flex: 1 }
- });
- export default BookingMenuPage;
|