|
|
@@ -11,8 +11,7 @@ const BookingConfirmationPageComponent = () => {
|
|
|
const params = useLocalSearchParams();
|
|
|
console.log(params);
|
|
|
|
|
|
- const { setSelectedCouponName, setSelectedCouponRedeemCode } =
|
|
|
- useCouponStore();
|
|
|
+ const { setSelectedCouponName, setSelectedCouponRedeemCode } = useCouponStore();
|
|
|
|
|
|
useEffect(() => {
|
|
|
setSelectedCouponName('');
|
|
|
@@ -44,10 +43,7 @@ const BookingConfirmationPageComponent = () => {
|
|
|
const setBookingInfo = useBookingStore((state) => state.setBookingInfo);
|
|
|
|
|
|
return (
|
|
|
- <SafeAreaView
|
|
|
- style={{ flex: 1, backgroundColor: 'white' }}
|
|
|
- edges={['top', 'left', 'right']}
|
|
|
- >
|
|
|
+ <SafeAreaView style={{ flex: 1, backgroundColor: 'white' }} edges={['top', 'left', 'right']}>
|
|
|
<ScrollView className="flex-1" showsVerticalScrollIndicator={false}>
|
|
|
<View className="flex-1">
|
|
|
<View className="pl-8 pt-8">
|
|
|
@@ -69,45 +65,27 @@ const BookingConfirmationPageComponent = () => {
|
|
|
<View className="flex-1 mt-4 mx-[5%]">
|
|
|
<View className="flex-1 flex-row items-center pb-3">
|
|
|
<View className="flex-1 flex-column">
|
|
|
- <Text
|
|
|
- style={styles.grayColor}
|
|
|
- className="text-base"
|
|
|
- >
|
|
|
+ <Text style={styles.grayColor} className="text-base">
|
|
|
日期
|
|
|
</Text>
|
|
|
- <Text
|
|
|
- style={styles.greenColor}
|
|
|
- className="text-6xl text-center pt-2"
|
|
|
- >
|
|
|
+ <Text style={styles.greenColor} className="text-6xl text-center pt-2">
|
|
|
{convertDate(params.date)}
|
|
|
</Text>
|
|
|
</View>
|
|
|
<View className="flex-1 flex-column">
|
|
|
- <Text
|
|
|
- style={styles.grayColor}
|
|
|
- className="text-base pl-7"
|
|
|
- >
|
|
|
+ <Text style={styles.grayColor} className="text-base pl-7">
|
|
|
時間
|
|
|
</Text>
|
|
|
- <Text
|
|
|
- style={styles.greenColor}
|
|
|
- className="text-6xl text-center pt-2"
|
|
|
- >
|
|
|
+ <Text style={styles.greenColor} className="text-6xl text-center pt-2">
|
|
|
{params.bookTime}
|
|
|
</Text>
|
|
|
</View>
|
|
|
</View>
|
|
|
<View className="flex-1 flex-column justify-center space-y-1 pb-3">
|
|
|
- <Text
|
|
|
- style={styles.grayColor}
|
|
|
- className="text-base"
|
|
|
- >
|
|
|
+ <Text style={styles.grayColor} className="text-base">
|
|
|
充電地點
|
|
|
</Text>
|
|
|
- <Text
|
|
|
- style={styles.greenColor}
|
|
|
- className="text-3xl "
|
|
|
- >
|
|
|
+ <Text style={styles.greenColor} className="text-3xl ">
|
|
|
{params.chargeStationName}
|
|
|
</Text>
|
|
|
<Text style={styles.grayColor} className="text-sm">
|
|
|
@@ -116,93 +94,45 @@ const BookingConfirmationPageComponent = () => {
|
|
|
</View>
|
|
|
<View className="flex-1 flex-row pb-3 ">
|
|
|
<View className="flex-column flex-1">
|
|
|
- <Text
|
|
|
- style={styles.grayColor}
|
|
|
- className="text-base"
|
|
|
- >
|
|
|
+ <Text style={styles.grayColor} className="text-base">
|
|
|
方案
|
|
|
</Text>
|
|
|
- {params.chargingMethod ===
|
|
|
- 'chargingBasedOnWatt' ? (
|
|
|
+ {params.chargingMethod === 'chargingBasedOnWatt' ? (
|
|
|
<>
|
|
|
- <Text
|
|
|
- style={styles.greenColor}
|
|
|
- className="text-lg"
|
|
|
- >
|
|
|
+ <Text style={styles.greenColor} className="text-lg">
|
|
|
按每度電結算
|
|
|
</Text>
|
|
|
- <Text
|
|
|
- style={styles.grayColor}
|
|
|
- className="text-sm"
|
|
|
- >
|
|
|
+ <Text style={styles.grayColor} className="text-sm">
|
|
|
{params.chargingWatt?.split('~')[0]}
|
|
|
</Text>
|
|
|
</>
|
|
|
) : (
|
|
|
- <Text
|
|
|
- style={styles.greenColor}
|
|
|
- className="text-lg"
|
|
|
- >
|
|
|
+ <Text style={styles.greenColor} className="text-lg">
|
|
|
充滿停機
|
|
|
</Text>
|
|
|
)}
|
|
|
</View>
|
|
|
<View className="flex-column flex-1">
|
|
|
- <Text
|
|
|
- style={styles.grayColor}
|
|
|
- className="text-base"
|
|
|
- >
|
|
|
+ <Text style={styles.grayColor} className="text-base">
|
|
|
車輛
|
|
|
</Text>
|
|
|
- <Text
|
|
|
- style={styles.greenColor}
|
|
|
- className="text-lg"
|
|
|
- >
|
|
|
+ <Text style={styles.greenColor} className="text-lg">
|
|
|
{params.carName}
|
|
|
</Text>
|
|
|
</View>
|
|
|
</View>
|
|
|
</View>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
</View>
|
|
|
- <View className="w-full h-1 bg-[#DBE4E8]" />
|
|
|
- <View className="flex-1 mx-[5%]">
|
|
|
- <Text className="text-xl py-4">收費概要</Text>
|
|
|
- <View className="flex-row justify-between">
|
|
|
- <Text className="text-base">充電費用</Text>
|
|
|
- <Text className="text-base">HK$ {paymentFee}</Text>
|
|
|
- </View>
|
|
|
- {params.chargingMethod === 'chargingBasedOnWatt' ? (
|
|
|
- <Text style={styles.grayColor} className="text-base">
|
|
|
- 按每度電結算: {params.chargingWatt?.split('~')[0]}
|
|
|
- </Text>
|
|
|
- ) : (
|
|
|
- <Text style={styles.grayColor} className="text-base">
|
|
|
- 充滿停機預估費用
|
|
|
- </Text>
|
|
|
- )}
|
|
|
|
|
|
- <View className="h-0.5 my-3 bg-[#f4f4f4]" />
|
|
|
- {/* <View className="flex-row justify-between">
|
|
|
- <Text className="text-base" style={styles.grayColor}>
|
|
|
- 小計
|
|
|
- </Text>
|
|
|
- <Text className="text-base">HK$ </Text>
|
|
|
- </View>
|
|
|
- <View className="flex-row justify-between">
|
|
|
- <Text className="text-base" style={styles.grayColor}>
|
|
|
- 其他費用
|
|
|
- </Text>
|
|
|
- <Text className="text-base">HK$ 11</Text>
|
|
|
- </View>
|
|
|
- <View className="h-0.5 my-3 bg-[#f4f4f4]" /> */}
|
|
|
- <View className="flex-row justify-between ">
|
|
|
- <Text className="text-xl">總計</Text>
|
|
|
- <Text className="text-xl">HK$ {paymentFee}</Text>
|
|
|
- </View>
|
|
|
+ <View className="border-t mx-4 border-[#CCCCCC]"></View>
|
|
|
+ <View className="flex-1 mx-[5%] mt-4 space-y-1">
|
|
|
+ <Text className="text-xs text-[#888888]">
|
|
|
+ **由於充電站車流眾多,敬請客戶務必於預約時間的十五分鐘內到達充電站。
|
|
|
+ </Text>
|
|
|
+ <Text className="text-xs text-[#888888]">
|
|
|
+ **若客戶逾時超過15分鐘,系統將視作自動放棄預約,客戶需要重新預約一次。
|
|
|
+ </Text>
|
|
|
+ <Text className="text-xs text-[#888888]">**本公司有權保留全數費用,恕不退還。</Text>
|
|
|
<View className="mt-4">
|
|
|
<NormalButton
|
|
|
title={
|
|
|
@@ -219,14 +149,10 @@ const BookingConfirmationPageComponent = () => {
|
|
|
// onPress={() => router.push('bookingSuccessPage')}
|
|
|
onPress={() => {
|
|
|
setBookingInfo({
|
|
|
- bookDateForDisplay: convertDate(
|
|
|
- params.date
|
|
|
- ),
|
|
|
+ bookDateForDisplay: convertDate(params.date),
|
|
|
bookTimeForDisplay: params.bookTime,
|
|
|
- chargeStationAddressForDisplay:
|
|
|
- params.chargeStationAddress,
|
|
|
- chargeStationNameForDisplay:
|
|
|
- params.chargeStationName,
|
|
|
+ chargeStationAddressForDisplay: params.chargeStationAddress,
|
|
|
+ chargeStationNameForDisplay: params.chargeStationName,
|
|
|
carNameForDisplay: params.carName
|
|
|
});
|
|
|
router.push({
|
|
|
@@ -245,7 +171,7 @@ const BookingConfirmationPageComponent = () => {
|
|
|
}
|
|
|
});
|
|
|
}}
|
|
|
- extendedStyle={{ padding: 24 }}
|
|
|
+ extendedStyle={{ padding: 24, marginTop: 24 }}
|
|
|
/>
|
|
|
</View>
|
|
|
</View>
|