bookingConfirmationPage.tsx 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. import { View, Text, ScrollView, Pressable, StyleSheet } from 'react-native';
  2. import { SafeAreaView } from 'react-native-safe-area-context';
  3. import { router } from 'expo-router';
  4. import NormalButton from '../global/normal_button';
  5. import { PreviousPageBlackSvg, PreviousPageSvg } from '../global/SVG';
  6. const BookingConfirmationPageComponent = () => {
  7. return (
  8. <SafeAreaView
  9. style={{ flex: 1, backgroundColor: 'white' }}
  10. edges={['top', 'left', 'right']}
  11. >
  12. <ScrollView className="flex-1" showsVerticalScrollIndicator={false}>
  13. <View className="flex-1">
  14. <View className="pl-8 pt-8">
  15. <Pressable
  16. style={{ alignSelf: 'flex-start' }}
  17. onPress={() => {
  18. if (router.canGoBack()) {
  19. router.back();
  20. } else {
  21. router.replace('./');
  22. }
  23. }}
  24. >
  25. <PreviousPageBlackSvg />
  26. </Pressable>
  27. <Text className="text-3xl mt-8">確認您的預約</Text>
  28. </View>
  29. <View className="flex-1 mt-4 mx-[5%]">
  30. <View className="flex-1 flex-row items-center pb-3">
  31. <View className="flex-1 flex-column">
  32. <Text
  33. style={styles.grayColor}
  34. className="text-base"
  35. >
  36. 日期
  37. </Text>
  38. <Text
  39. style={styles.greenColor}
  40. className="text-6xl text-center pt-2"
  41. >
  42. 3月14
  43. </Text>
  44. </View>
  45. <View className="flex-1 flex-column">
  46. <Text
  47. style={styles.grayColor}
  48. className="text-base pl-7"
  49. >
  50. 時間
  51. </Text>
  52. <Text
  53. style={styles.greenColor}
  54. className="text-6xl text-center pt-2"
  55. >
  56. 15:15
  57. </Text>
  58. </View>
  59. </View>
  60. <View className="flex-1 flex-column justify-center space-y-1 pb-3">
  61. <Text
  62. style={styles.grayColor}
  63. className="text-base"
  64. >
  65. 充電地點
  66. </Text>
  67. <Text
  68. style={styles.greenColor}
  69. className="text-3xl "
  70. >
  71. 上環街市充電站
  72. </Text>
  73. <Text style={styles.grayColor} className="text-sm">
  74. 香港上環皇后大道中345號
  75. </Text>
  76. </View>
  77. <View className="flex-1 flex-row pb-3 ">
  78. <View className="flex-column flex-1">
  79. <Text
  80. style={styles.grayColor}
  81. className="text-base"
  82. >
  83. 方案
  84. </Text>
  85. <Text
  86. style={styles.greenColor}
  87. className="text-lg"
  88. >
  89. 按每度電結算
  90. </Text>
  91. <Text
  92. style={styles.grayColor}
  93. className="text-sm"
  94. >
  95. 度數: 50kWh
  96. </Text>
  97. </View>
  98. <View className="flex-column flex-1">
  99. <Text
  100. style={styles.grayColor}
  101. className="text-base"
  102. >
  103. 車輛
  104. </Text>
  105. <Text
  106. style={styles.greenColor}
  107. className="text-lg"
  108. >
  109. TESLA Model 3
  110. </Text>
  111. </View>
  112. </View>
  113. </View>
  114. </View>
  115. <View className="w-full h-1 bg-[#DBE4E8]" />
  116. <View className="flex-1 mx-[5%]">
  117. <Text className="text-xl py-4">收費概要</Text>
  118. <View className="flex-row justify-between">
  119. <Text className="text-base">充電費用</Text>
  120. <Text className="text-base">HK$ 175</Text>
  121. </View>
  122. <Text style={styles.grayColor} className="text-base">
  123. 按每度電結算: 50 kWh
  124. </Text>
  125. <View className="h-0.5 my-3 bg-[#f4f4f4]" />
  126. <View className="flex-row justify-between">
  127. <Text className="text-base" style={styles.grayColor}>
  128. 小計
  129. </Text>
  130. <Text className="text-base">HK$ 175</Text>
  131. </View>
  132. <View className="flex-row justify-between">
  133. <Text className="text-base" style={styles.grayColor}>
  134. 其他費用
  135. </Text>
  136. <Text className="text-base">HK$ 11</Text>
  137. </View>
  138. <View className="h-0.5 my-3 bg-[#f4f4f4]" />
  139. <View className="flex-row justify-between ">
  140. <Text className="text-xl">總計</Text>
  141. <Text className="text-xl">HK$ 186</Text>
  142. </View>
  143. <View className="mt-4">
  144. <NormalButton
  145. title={
  146. <Text
  147. style={{
  148. color: 'white',
  149. fontSize: 16,
  150. fontWeight: '800'
  151. }}
  152. >
  153. 下一步
  154. </Text>
  155. }
  156. onPress={() => router.push('bookingSuccessPage')}
  157. extendedStyle={{ padding: 24 }}
  158. />
  159. </View>
  160. </View>
  161. </ScrollView>
  162. </SafeAreaView>
  163. );
  164. };
  165. export default BookingConfirmationPageComponent;
  166. const styles = StyleSheet.create({
  167. grayColor: {
  168. color: '#888888'
  169. },
  170. greenColor: {
  171. color: '#02677D'
  172. }
  173. });