|
|
@@ -1,4 +1,12 @@
|
|
|
-import { View, Text, ScrollView, Pressable, StyleSheet } from 'react-native';
|
|
|
+import {
|
|
|
+ View,
|
|
|
+ Text,
|
|
|
+ ScrollView,
|
|
|
+ Pressable,
|
|
|
+ StyleSheet,
|
|
|
+ Image,
|
|
|
+ Dimensions
|
|
|
+} from 'react-native';
|
|
|
import { SafeAreaView } from 'react-native-safe-area-context';
|
|
|
import { router } from 'expo-router';
|
|
|
import NormalButton from '../global/normal_button';
|
|
|
@@ -9,6 +17,8 @@ import {
|
|
|
} from '../global/SVG';
|
|
|
import { ChargingStationTabView } from '../global/chargingStationTabView';
|
|
|
import ChooseCarForChargingRow from '../global/chooseCarForChargingRow';
|
|
|
+import { useState } from 'react';
|
|
|
+import DropdownSelect from '../global/dropdown_select';
|
|
|
|
|
|
const dummyDataChooseCarForCharging = [
|
|
|
{
|
|
|
@@ -25,170 +35,529 @@ const dummyDataChooseCarForCharging = [
|
|
|
{ VehicleName: 'TESLA - Model 3', isDefault: false }
|
|
|
];
|
|
|
|
|
|
-const MakingBookingPageComponent = () => (
|
|
|
- <SafeAreaView
|
|
|
- style={{
|
|
|
- flex: 1,
|
|
|
- backgroundColor: 'white'
|
|
|
- }}
|
|
|
- edges={['right', 'top', 'left']}
|
|
|
- >
|
|
|
- <ScrollView className="flex-1 bg-white ">
|
|
|
- <View className="pb-4">
|
|
|
- <View className="pl-8 pt-8">
|
|
|
- <Pressable
|
|
|
- style={{ alignSelf: 'flex-start' }}
|
|
|
- onPress={() => {
|
|
|
- if (router.canGoBack()) {
|
|
|
- router.back();
|
|
|
- } else {
|
|
|
- router.replace('./');
|
|
|
- }
|
|
|
- }}
|
|
|
- >
|
|
|
- <PreviousPageBlackSvg />
|
|
|
- </Pressable>
|
|
|
- <Text className="text-3xl mt-8">上環街市充電站</Text>
|
|
|
- <View className="flex-column">
|
|
|
- <View className="flex-row justify-between items-center mr-[5%]">
|
|
|
- <Text
|
|
|
- className="text-base"
|
|
|
- style={styles.grayColor}
|
|
|
- >
|
|
|
- 香港上環皇后大道中345號
|
|
|
- </Text>
|
|
|
- <NormalButton
|
|
|
- title={
|
|
|
- <View className="flex-row items-center justify-center text-center space-x-1">
|
|
|
- <DirectionLogoSvg />
|
|
|
- <Text className="text-base">路線</Text>
|
|
|
- </View>
|
|
|
- }
|
|
|
- onPress={() => console.log('路線')}
|
|
|
- extendedStyle={{
|
|
|
- backgroundColor: '#E3F2F8',
|
|
|
- borderRadius: 61,
|
|
|
- paddingHorizontal: 20,
|
|
|
- paddingVertical: 8
|
|
|
- }}
|
|
|
- />
|
|
|
- </View>
|
|
|
- <View className="flex-row space-x-2 items-center">
|
|
|
- <CheckMarkLogoSvg />
|
|
|
- <Text>Walk-In</Text>
|
|
|
- <Text>400米</Text>
|
|
|
- </View>
|
|
|
- </View>
|
|
|
- </View>
|
|
|
- </View>
|
|
|
+interface AccordionItemProps {
|
|
|
+ title: string;
|
|
|
+ children: React.ReactNode;
|
|
|
+ isOpen: boolean;
|
|
|
+ onToggle: () => void;
|
|
|
+ isSelected: boolean;
|
|
|
+}
|
|
|
+
|
|
|
+const AccordionItem: React.FC<AccordionItemProps> = ({
|
|
|
+ title,
|
|
|
+ children,
|
|
|
+ isOpen,
|
|
|
+ onToggle,
|
|
|
+ isSelected
|
|
|
+}) => (
|
|
|
+ <View className={`${isSelected ? 'bg-[#e7f5f8]' : 'bg-white'}`}>
|
|
|
+ <View className="mx-[5%]">
|
|
|
+ <Pressable onPress={onToggle}>
|
|
|
+ <Text
|
|
|
+ className={` pt-2 text-lg ${
|
|
|
+ isSelected ? 'text-[#222222]' : 'text-[#888888] '
|
|
|
+ }}`}
|
|
|
+ >
|
|
|
+ {title}
|
|
|
+ </Text>
|
|
|
+ </Pressable>
|
|
|
+ {isOpen && <View>{children}</View>}
|
|
|
+ </View>
|
|
|
+ </View>
|
|
|
+);
|
|
|
+
|
|
|
+const MakingBookingPageComponent = () => {
|
|
|
+ const [openDrawer, setOpenDrawer] = useState<number | null>(0);
|
|
|
+ const [selectedTime, setSelectedTime] = useState<string>('');
|
|
|
+ const [selectedDrawer, setSelectedDrawer] = useState<number>(0);
|
|
|
+ const [selectedDate, setSelectedDate] = useState<string>('');
|
|
|
+ const toggleDrawer = (index: number) => {
|
|
|
+ setOpenDrawer(openDrawer === index ? null : index);
|
|
|
+ setSelectedDrawer(index);
|
|
|
+ };
|
|
|
+
|
|
|
+ const timeData = [
|
|
|
+ '14:00',
|
|
|
+ '14:15',
|
|
|
+ '14:30',
|
|
|
+ '14:45',
|
|
|
+ '15:00',
|
|
|
+ '15:15',
|
|
|
+ '15:30',
|
|
|
+ '15:45',
|
|
|
+ '16:00',
|
|
|
+ '16:15',
|
|
|
+ '16:30',
|
|
|
+ '16:45',
|
|
|
+ '17:00',
|
|
|
+ '17:15',
|
|
|
+ '17:30',
|
|
|
+ '17:45'
|
|
|
+ ];
|
|
|
+ const dateData = [
|
|
|
+ '今天',
|
|
|
+ '3/15',
|
|
|
+ '3/16',
|
|
|
+ '3/17',
|
|
|
+ '3/18',
|
|
|
+ '3/19',
|
|
|
+ '3/20',
|
|
|
+ '3/21'
|
|
|
+ ];
|
|
|
+
|
|
|
+ const [uiState, setUiState] = useState({
|
|
|
+ isCarSelected: false,
|
|
|
+ isChargingPlanOpen: false,
|
|
|
+ isDateOpen: false,
|
|
|
+ isCharigingGunOpen: false
|
|
|
+ });
|
|
|
+ const [selectedChargingGun, setSelectedChargingGun] = useState('');
|
|
|
+ const [chargingBasedOnWatt, setChargingBasedOnWatt] = useState(false);
|
|
|
+ const [stopChargingUponBatteryFull, setStopChargingUponBatteryFull] =
|
|
|
+ useState(false);
|
|
|
+ const [selectedCar, setSelectedCar] = useState('');
|
|
|
+ const [selectedDuration, setSelectedDuration] = useState('');
|
|
|
+ const { width: screenWidth, height: screenHeight } =
|
|
|
+ Dimensions.get('window');
|
|
|
|
|
|
- <View className=" bg-[#FAFAFA]">
|
|
|
- <View className=" bg-[#e7f5f8]">
|
|
|
- <View className="mx-[5%] ">
|
|
|
- <Text className="text-xl pt-4">選擇充電車輛</Text>
|
|
|
- <ScrollView
|
|
|
- horizontal={true}
|
|
|
- contentContainerStyle={{
|
|
|
- alignItems: 'center',
|
|
|
- flexDirection: 'row',
|
|
|
- marginVertical: 8
|
|
|
+ const layoutWidth = screenWidth;
|
|
|
+ const layoutHeight = screenHeight * 0.4;
|
|
|
+
|
|
|
+ return (
|
|
|
+ <SafeAreaView
|
|
|
+ style={{
|
|
|
+ flex: 1,
|
|
|
+ backgroundColor: 'white'
|
|
|
+ }}
|
|
|
+ edges={['right', 'top', 'left']}
|
|
|
+ >
|
|
|
+ <ScrollView className="flex-1 bg-white ">
|
|
|
+ <View className="pb-4 ">
|
|
|
+ <View className="ml-[5%] pt-8">
|
|
|
+ <Pressable
|
|
|
+ style={{ alignSelf: 'flex-start' }}
|
|
|
+ onPress={() => {
|
|
|
+ if (router.canGoBack()) {
|
|
|
+ router.back();
|
|
|
+ } else {
|
|
|
+ router.replace('./');
|
|
|
+ }
|
|
|
}}
|
|
|
- className="space-x-2"
|
|
|
>
|
|
|
- {dummyDataChooseCarForCharging.map((car, index) => (
|
|
|
- <ChooseCarForChargingRow
|
|
|
- navigationLink="/bookingConfirmationPage"
|
|
|
- imageUrl={car.imageUrl}
|
|
|
- key={`${car.VehicleName}+${index}`}
|
|
|
- VehicleName={car.VehicleName}
|
|
|
- isDefault={car.isDefault}
|
|
|
+ <PreviousPageBlackSvg />
|
|
|
+ </Pressable>
|
|
|
+ <Text className="text-3xl mt-8">上環街市充電站</Text>
|
|
|
+ <View className="flex-column">
|
|
|
+ <View className="flex-row justify-between items-center mr-[5%]">
|
|
|
+ <Text
|
|
|
+ className="text-base"
|
|
|
+ style={styles.grayColor}
|
|
|
+ >
|
|
|
+ 香港上環皇后大道中345號
|
|
|
+ </Text>
|
|
|
+ <NormalButton
|
|
|
+ title={
|
|
|
+ <View className="flex-row items-center justify-center text-center space-x-1">
|
|
|
+ <DirectionLogoSvg />
|
|
|
+ <Text className="text-base">
|
|
|
+ 路線
|
|
|
+ </Text>
|
|
|
+ </View>
|
|
|
+ }
|
|
|
+ onPress={() => console.log('路線')}
|
|
|
+ extendedStyle={{
|
|
|
+ backgroundColor: '#E3F2F8',
|
|
|
+ borderRadius: 61,
|
|
|
+ paddingHorizontal: 20,
|
|
|
+ paddingVertical: 8
|
|
|
+ }}
|
|
|
/>
|
|
|
- ))}
|
|
|
- </ScrollView>
|
|
|
+ </View>
|
|
|
+ <View className="flex-row space-x-2 items-center">
|
|
|
+ <CheckMarkLogoSvg />
|
|
|
+ <Text>Walk-In</Text>
|
|
|
+ <Text>400米</Text>
|
|
|
+ </View>
|
|
|
+ </View>
|
|
|
</View>
|
|
|
</View>
|
|
|
+ <View>
|
|
|
+ {selectedCar !== '' ? (
|
|
|
+ <>
|
|
|
+ <Pressable
|
|
|
+ onPress={() => {
|
|
|
+ setSelectedCar('');
|
|
|
+ setOpenDrawer(0);
|
|
|
+ setSelectedDrawer(0);
|
|
|
+ setSelectedDuration('');
|
|
|
+ setChargingBasedOnWatt(false);
|
|
|
+ setStopChargingUponBatteryFull(false);
|
|
|
+ setSelectedDate('');
|
|
|
+ setSelectedTime('');
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <View className="mx-[5%]">
|
|
|
+ <View className="flex-row items-center pt-4">
|
|
|
+ <Text className="text-lg pr-2 text-[#34667c]">
|
|
|
+ 選擇充電車輛
|
|
|
+ </Text>
|
|
|
+ <CheckMarkLogoSvg />
|
|
|
+ </View>
|
|
|
+ <Text className="text-lg pb-4">
|
|
|
+ {selectedCar}
|
|
|
+ </Text>
|
|
|
+ </View>
|
|
|
+ </Pressable>
|
|
|
+ </>
|
|
|
+ ) : (
|
|
|
+ <AccordionItem
|
|
|
+ title="選擇充電車輪"
|
|
|
+ isOpen={openDrawer === 0}
|
|
|
+ onToggle={() => toggleDrawer(0)}
|
|
|
+ isSelected={selectedDrawer === 0}
|
|
|
+ >
|
|
|
+ <ScrollView
|
|
|
+ horizontal={true}
|
|
|
+ contentContainerStyle={{
|
|
|
+ alignItems: 'center',
|
|
|
+ flexDirection: 'row',
|
|
|
+ marginVertical: 8
|
|
|
+ }}
|
|
|
+ className="space-x-2 "
|
|
|
+ >
|
|
|
+ {dummyDataChooseCarForCharging.map(
|
|
|
+ (car, index) => (
|
|
|
+ <ChooseCarForChargingRow
|
|
|
+ onPress={() => {
|
|
|
+ setSelectedCar(car.VehicleName);
|
|
|
+ setSelectedDrawer(1);
|
|
|
+ setOpenDrawer(1);
|
|
|
+ }}
|
|
|
+ imageUrl={car.imageUrl}
|
|
|
+ key={`${car.VehicleName}+${index}`}
|
|
|
+ VehicleName={car.VehicleName}
|
|
|
+ isDefault={car.isDefault}
|
|
|
+ />
|
|
|
+ )
|
|
|
+ )}
|
|
|
+ </ScrollView>
|
|
|
+ </AccordionItem>
|
|
|
+ )}
|
|
|
|
|
|
- <View className="mx-[5%] ">
|
|
|
- <View className="justify-center p-4 pl-0">
|
|
|
+ {stopChargingUponBatteryFull === true ||
|
|
|
+ selectedDuration !== '' ? (
|
|
|
<Pressable
|
|
|
- style={{ alignSelf: 'flex-start' }}
|
|
|
- onPress={() => console.log('選擇充電方案')}
|
|
|
+ onPress={() => {
|
|
|
+ setSelectedDuration('');
|
|
|
+ setChargingBasedOnWatt(false);
|
|
|
+ setStopChargingUponBatteryFull(false);
|
|
|
+ setSelectedTime('');
|
|
|
+ setSelectedDate('');
|
|
|
+ setOpenDrawer(1);
|
|
|
+ setSelectedDrawer(1);
|
|
|
+ }}
|
|
|
>
|
|
|
- <Text className="text-lg" style={styles.grayColor}>
|
|
|
- 選擇充電方案
|
|
|
- </Text>
|
|
|
+ <View className="mx-[5%] ">
|
|
|
+ <View className="flex-row items-center pt-4">
|
|
|
+ <Text className="text-lg pr-2 text-[#34667c]">
|
|
|
+ 選擇充電方案
|
|
|
+ </Text>
|
|
|
+ <CheckMarkLogoSvg />
|
|
|
+ </View>
|
|
|
+ <Text className="text-lg pb-4">
|
|
|
+ {selectedDuration !== ''
|
|
|
+ ? `按每道電 - ${selectedDuration}`
|
|
|
+ : '充滿停機'}
|
|
|
+ </Text>
|
|
|
+ </View>
|
|
|
</Pressable>
|
|
|
- </View>
|
|
|
- <View className="justify-center p-4 pl-0 ">
|
|
|
+ ) : (
|
|
|
+ <AccordionItem
|
|
|
+ title="選擇充電方案"
|
|
|
+ isOpen={openDrawer === 1}
|
|
|
+ onToggle={() => {
|
|
|
+ if (selectedCar !== '') {
|
|
|
+ toggleDrawer(1);
|
|
|
+ }
|
|
|
+ }}
|
|
|
+ isSelected={selectedDrawer === 1}
|
|
|
+ >
|
|
|
+ <View className="flex-row justify-between mt-2 mb-3">
|
|
|
+ <Pressable
|
|
|
+ className={`border rounded-lg border-[#34667c] w-[47%] items-center bg-white ${
|
|
|
+ chargingBasedOnWatt
|
|
|
+ ? 'bg-[#34667c] '
|
|
|
+ : ''
|
|
|
+ }`}
|
|
|
+ onPress={() => {
|
|
|
+ setChargingBasedOnWatt(
|
|
|
+ !chargingBasedOnWatt
|
|
|
+ );
|
|
|
+ setStopChargingUponBatteryFull(false);
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <Text
|
|
|
+ className={`text-base p-2 text-[#34667c] ${
|
|
|
+ chargingBasedOnWatt
|
|
|
+ ? ' text-white'
|
|
|
+ : 'text-[#34667c]'
|
|
|
+ }`}
|
|
|
+ >
|
|
|
+ 按每度電
|
|
|
+ </Text>
|
|
|
+ </Pressable>
|
|
|
+ <Pressable
|
|
|
+ onPress={() => {
|
|
|
+ setStopChargingUponBatteryFull(
|
|
|
+ !stopChargingUponBatteryFull
|
|
|
+ );
|
|
|
+ setChargingBasedOnWatt(false);
|
|
|
+ setSelectedDrawer(2);
|
|
|
+ setOpenDrawer(2);
|
|
|
+ }}
|
|
|
+ className={`border rounded-lg border-[#34667c] w-[47%] items-center bg-white ${
|
|
|
+ stopChargingUponBatteryFull
|
|
|
+ ? ' bg-[#34667c]'
|
|
|
+ : ''
|
|
|
+ }`}
|
|
|
+ >
|
|
|
+ <Text
|
|
|
+ className={`text-base p-2 text-[#34667c] ${
|
|
|
+ stopChargingUponBatteryFull
|
|
|
+ ? ' text-white'
|
|
|
+ : 'text-[#34667c]'
|
|
|
+ }`}
|
|
|
+ >
|
|
|
+ 充滿停機
|
|
|
+ </Text>
|
|
|
+ </Pressable>
|
|
|
+ </View>
|
|
|
+ {chargingBasedOnWatt === true && (
|
|
|
+ <View className="flex-row w-full justify-between mb-3">
|
|
|
+ {['30分鐘', '45分鐘', '60分鐘', '其他'].map(
|
|
|
+ (duration) => (
|
|
|
+ <Pressable
|
|
|
+ key={duration}
|
|
|
+ className={`${
|
|
|
+ selectedDuration ===
|
|
|
+ duration
|
|
|
+ ? 'bg-[#34667c] '
|
|
|
+ : 'bg-white'
|
|
|
+ } border border-[#34667c] rounded-lg w-[22%] items-center`}
|
|
|
+ onPress={() => {
|
|
|
+ setSelectedDuration(
|
|
|
+ duration
|
|
|
+ );
|
|
|
+ setOpenDrawer(2);
|
|
|
+ setSelectedDrawer(2);
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <Text
|
|
|
+ className={`text-base p-2 ${
|
|
|
+ selectedDuration ===
|
|
|
+ duration
|
|
|
+ ? 'text-white'
|
|
|
+ : 'text-[#34667c]'
|
|
|
+ } `}
|
|
|
+ >
|
|
|
+ {duration}
|
|
|
+ </Text>
|
|
|
+ </Pressable>
|
|
|
+ )
|
|
|
+ )}
|
|
|
+ </View>
|
|
|
+ )}
|
|
|
+ </AccordionItem>
|
|
|
+ )}
|
|
|
+ {selectedTime !== '' ? (
|
|
|
<Pressable
|
|
|
- style={{ alignSelf: 'flex-start' }}
|
|
|
- onPress={() => console.log('選擇日期時間')}
|
|
|
+ onPress={() => {
|
|
|
+ setOpenDrawer(2);
|
|
|
+ setSelectedDrawer(2);
|
|
|
+ setSelectedDate('');
|
|
|
+ setSelectedTime('');
|
|
|
+ }}
|
|
|
>
|
|
|
- <Text className="text-lg" style={styles.grayColor}>
|
|
|
- 選擇日期時間
|
|
|
- </Text>
|
|
|
+ <View className="mx-[5%] ">
|
|
|
+ <View className="flex-row items-center pt-4">
|
|
|
+ <Text className="text-lg pr-2 text-[#34667c]">
|
|
|
+ 選擇日期
|
|
|
+ </Text>
|
|
|
+ <CheckMarkLogoSvg />
|
|
|
+ </View>
|
|
|
+ <Text className="text-lg pb-4">
|
|
|
+ {selectedDate} - {selectedTime}
|
|
|
+ </Text>
|
|
|
+ </View>
|
|
|
</Pressable>
|
|
|
- </View>
|
|
|
+ ) : (
|
|
|
+ <AccordionItem
|
|
|
+ title="選擇日期 (月/日)"
|
|
|
+ isOpen={openDrawer === 2}
|
|
|
+ onToggle={() => {
|
|
|
+ if (
|
|
|
+ stopChargingUponBatteryFull !== false ||
|
|
|
+ selectedDuration !== ''
|
|
|
+ ) {
|
|
|
+ toggleDrawer(2);
|
|
|
+ }
|
|
|
+ }}
|
|
|
+ isSelected={selectedDrawer === 2}
|
|
|
+ >
|
|
|
+ <View className="flex-row w-full justify-between mb-3 flex-wrap my-2 ">
|
|
|
+ {dateData.map((date) => (
|
|
|
+ <Pressable
|
|
|
+ key={date}
|
|
|
+ className={`${
|
|
|
+ selectedDate === date
|
|
|
+ ? 'bg-[#34667c] '
|
|
|
+ : 'bg-white'
|
|
|
+ } border border-[#34667c] rounded-lg w-[22%] items-center mb-2`}
|
|
|
+ onPress={() => {
|
|
|
+ setSelectedDate(date);
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <Text
|
|
|
+ className={`text-base p-2 ${
|
|
|
+ selectedDate === date
|
|
|
+ ? 'text-white'
|
|
|
+ : 'text-[#34667c]'
|
|
|
+ } `}
|
|
|
+ >
|
|
|
+ {date}
|
|
|
+ </Text>
|
|
|
+ </Pressable>
|
|
|
+ ))}
|
|
|
+ </View>
|
|
|
|
|
|
- <View className=" justify-center p-4 pl-0">
|
|
|
- <Pressable
|
|
|
- style={{ alignSelf: 'flex-start' }}
|
|
|
- onPress={() => console.log('選擇充電座')}
|
|
|
+ {selectedDate !== '' && (
|
|
|
+ <>
|
|
|
+ <Text className="text-lg pr-2 ">
|
|
|
+ 選擇時間
|
|
|
+ </Text>
|
|
|
+ <View className="flex-row w-full justify-between mb-3 flex-wrap my-2 ">
|
|
|
+ {timeData.map((time) => (
|
|
|
+ <Pressable
|
|
|
+ key={time}
|
|
|
+ className={`${
|
|
|
+ selectedTime === time
|
|
|
+ ? 'bg-[#34667c] '
|
|
|
+ : 'bg-white'
|
|
|
+ } border border-[#34667c] rounded-lg w-[22%] items-center mb-2`}
|
|
|
+ onPress={() => {
|
|
|
+ setSelectedTime(time);
|
|
|
+ setOpenDrawer(3);
|
|
|
+ setSelectedDrawer(3);
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <Text
|
|
|
+ className={`text-base p-2 ${
|
|
|
+ selectedTime === time
|
|
|
+ ? 'text-white'
|
|
|
+ : 'text-[#34667c]'
|
|
|
+ } `}
|
|
|
+ >
|
|
|
+ {time}
|
|
|
+ </Text>
|
|
|
+ </Pressable>
|
|
|
+ ))}
|
|
|
+ </View>
|
|
|
+ </>
|
|
|
+ )}
|
|
|
+ </AccordionItem>
|
|
|
+ )}
|
|
|
+ <View className="">
|
|
|
+ <AccordionItem
|
|
|
+ title="選擇充電座"
|
|
|
+ isOpen={openDrawer === 3}
|
|
|
+ onToggle={() => {
|
|
|
+ if (selectedTime) {
|
|
|
+ toggleDrawer(3);
|
|
|
+ }
|
|
|
+ }}
|
|
|
+ isSelected={selectedDrawer === 3}
|
|
|
>
|
|
|
- <Text className="text-lg" style={styles.grayColor}>
|
|
|
- 選擇充電座
|
|
|
- </Text>
|
|
|
- </Pressable>
|
|
|
+ <View className="">
|
|
|
+ <DropdownSelect
|
|
|
+ dropdownOptions={[
|
|
|
+ { label: '1', value: '1' },
|
|
|
+ { label: '2', value: '2' }
|
|
|
+ ]}
|
|
|
+ placeholder={'選擇充電座號碼'}
|
|
|
+ onSelect={(value) => {
|
|
|
+ setSelectedChargingGun(value);
|
|
|
+ router.push('/bookingConfirmationPage');
|
|
|
+ }}
|
|
|
+ extendedStyle={{
|
|
|
+ borderColor: '#34667c',
|
|
|
+ marginTop: 4
|
|
|
+ }}
|
|
|
+ />
|
|
|
+
|
|
|
+ <Image
|
|
|
+ style={{
|
|
|
+ width: layoutWidth * 0.97,
|
|
|
+ height: layoutHeight
|
|
|
+ }}
|
|
|
+ resizeMode="contain"
|
|
|
+ source={require('../../assets/ChargeStationLayout.png')}
|
|
|
+ />
|
|
|
+ </View >
|
|
|
+ </AccordionItem>
|
|
|
</View>
|
|
|
</View>
|
|
|
- </View>
|
|
|
|
|
|
- <View className="mx-[5%] flex-1">
|
|
|
- <View
|
|
|
- className="flex-row border-slate-300 mt-3 mb-6 rounded-2xl flex-1"
|
|
|
- style={{ borderWidth: 1 }}
|
|
|
- >
|
|
|
- <View className="flex-1 m-4">
|
|
|
- <View className="flex-1 flex-row ">
|
|
|
- <View className=" flex-1 flex-column justify-between">
|
|
|
- <Text className="text-xl " style={styles.text}>
|
|
|
- 收費
|
|
|
- </Text>
|
|
|
-
|
|
|
- <View className="flex-row items-center space-x-2">
|
|
|
- <Text className="text-3xl text-[#02677D]">
|
|
|
- $20
|
|
|
+ <View className="mx-[5%] flex-1">
|
|
|
+ <View
|
|
|
+ className="flex-row border-slate-300 mt-3 mb-6 rounded-2xl flex-1"
|
|
|
+ style={{ borderWidth: 1 }}
|
|
|
+ >
|
|
|
+ <View className="flex-1 m-4">
|
|
|
+ <View className="flex-1 flex-row ">
|
|
|
+ <View className=" flex-1 flex-column justify-between">
|
|
|
+ <Text
|
|
|
+ className="text-xl "
|
|
|
+ style={styles.text}
|
|
|
+ >
|
|
|
+ 收費
|
|
|
</Text>
|
|
|
- <Text style={styles.text}>每15分鐘</Text>
|
|
|
+
|
|
|
+ <View className="flex-row items-center space-x-2">
|
|
|
+ <Text className="text-3xl text-[#02677D]">
|
|
|
+ $20
|
|
|
+ </Text>
|
|
|
+ <Text style={styles.text}>
|
|
|
+ 每15分鐘
|
|
|
+ </Text>
|
|
|
+ </View>
|
|
|
</View>
|
|
|
- </View>
|
|
|
- <View className="items-center justify-center">
|
|
|
- <View className="w-[1px] h-[60%] bg-[#CCCCCC]" />
|
|
|
- </View>
|
|
|
- <View className="flex-1 flex-column ">
|
|
|
- <View className="flex-1"></View>
|
|
|
- <View className="flex-row items-center ml-4 space-x-2 ">
|
|
|
- <Text className="text-3xl text-[#02677D]">
|
|
|
- $3.5
|
|
|
- </Text>
|
|
|
- <Text style={styles.text}>每度電</Text>
|
|
|
+ <View className="items-center justify-center">
|
|
|
+ <View className="w-[1px] h-[60%] bg-[#CCCCCC]" />
|
|
|
+ </View>
|
|
|
+ <View className="flex-1 flex-column ">
|
|
|
+ <View className="flex-1"></View>
|
|
|
+ <View className="flex-row items-center ml-4 space-x-2 ">
|
|
|
+ <Text className="text-3xl text-[#02677D]">
|
|
|
+ $3.5
|
|
|
+ </Text>
|
|
|
+ <Text style={styles.text}>每度電</Text>
|
|
|
+ </View>
|
|
|
</View>
|
|
|
</View>
|
|
|
</View>
|
|
|
</View>
|
|
|
- </View>
|
|
|
|
|
|
- <Text className="text-xl pb-2 mx-[5%]" style={styles.text}>
|
|
|
- 充電站資訊
|
|
|
- </Text>
|
|
|
- <View className="h-[250px]">
|
|
|
- <ChargingStationTabView titles={['充電插頭', '其他']} />
|
|
|
+ <Text className="text-xl pb-2 " style={styles.text}>
|
|
|
+ 充電站資訊
|
|
|
+ </Text>
|
|
|
+ <View className="h-[250px]">
|
|
|
+ <ChargingStationTabView titles={['充電插頭', '其他']} />
|
|
|
+ </View>
|
|
|
</View>
|
|
|
- </View>
|
|
|
- </ScrollView>
|
|
|
- </SafeAreaView>
|
|
|
-);
|
|
|
-
|
|
|
+ </ScrollView>
|
|
|
+ </SafeAreaView>
|
|
|
+ );
|
|
|
+};
|
|
|
export default MakingBookingPageComponent;
|
|
|
|
|
|
const styles = StyleSheet.create({
|