vbea 2 роки тому
батько
коміт
7a77d68303

+ 2 - 2
Strides-APP/android/app/version.properties

@@ -1,2 +1,2 @@
-#Wed Sep 06 17:33:14 CST 2023
-VERSION_CODE=308
+#Fri Sep 08 17:17:05 CST 2023
+VERSION_CODE=310

+ 2 - 5
Strides-APP/app/components/ModalPortal.js

@@ -143,8 +143,7 @@ export default class ModalPortal extends Component {
           animationOut={"fadeOut"}
           useNativeDriver={true}
           onBackButtonPress={() => this.onBackPress()}
-          onModalHide={() => this.onModalHide()}
-        >
+          onModalHide={() => this.onModalHide()}>
           {this.state.children}
         </Modal>
         <Modal
@@ -155,9 +154,7 @@ export default class ModalPortal extends Component {
           useNativeDriver={true}
           animationInTiming={80}
           animationOutTiming={100}
-          onBackButtonPress={() => this.onBackPress()}
-          //onModalHide={() => this.onModalHide()}
-        >
+          onBackButtonPress={() => this.onBackPress()}>
           {this.state.loadChildren}
         </Modal>
         { this.state.showIOSLoading &&

+ 9 - 5
Strides-APP/app/i18n/locales/en.js

@@ -297,12 +297,13 @@ export default {
     stepInitializingDesc: "Please wait while we prepare to start charging...",
     stepStoppingCharge: "Stopping Charge",
     stepStoppingChargeDesc: "Please wait while we stop your charging...",
-    stepInsertConnector: "Insert Connector",
-    stepInsertConnectorDesc: "Insert Vehicle to Charger and press Authenticate.",
+    stepInsertConnector: "Insert Charging Cable",
+    stepInsertConnectorDesc: "Insert charging cable to EV and press AUTHENTICATE.",
     tabCharge: "CHARGE",
     tabExplore: "Explore",
     tabInfo: "INFO",
     tabReserve: "Reserve",
+    tipsDiscount: "You have an applicable membership.\nRate shown is the discounted price.",
     tipsDisconnectConnector: "Please disconnect and return connector to charging station",
     tipsRatesTax: "All rates Include 8% GST",
     tipsRatesTax2: "All Rates Include Tax",
@@ -439,7 +440,7 @@ export default {
     breakdownIdlesFees: "Idles Fees Breakdown",
     breakdownPayment: "Payment",
     breakdownReservationFees: "Reservation Fees Breakdown",
-    chargingSessionComplete: "Your charging session is complete.",
+    chargingSessionComplete: "Your charging session is completed.",
     labelChargTransSubtotal: "Charging Transaction Subtotal (w 8% GST):",
     labelChargTransSubtotal2: "Charging Transaction Subtotal ($s):",
     labelDateTime: "Date Time:",
@@ -463,8 +464,11 @@ export default {
   support: {
     supportHotline: "Support Hotline",
     labelOpenTime: "Our Support Hours:",
-    timeAllDay: "Monday to Sunday - 24 Hours",
-    timeWeekDay: "Monday to Friday - 24 Hours",
+    labelCallCentreHotline: "Call Centre Hotline",
+    labelWhatsappChat: "Whatsapp Chat",
+    timeAllDay: "Monday to Sunday",
+    timeWeekDay: "Monday to Friday",
+    time24Hours: "24 Hours",
     btnCallSupport: "Call Support Hotline",
     btnWhatsapp: "Whatsapp Us"
   },

+ 8 - 4
Strides-APP/app/i18n/locales/zh-TW.js

@@ -297,12 +297,13 @@
     stepInitializingDesc: "正在準備開始充電,請稍候……",
     stepStoppingCharge: "正在停止充電",
     stepStoppingChargeDesc: "正在停止充電,請稍候……",
-    stepInsertConnector: "等待插入連接器",
-    stepInsertConnectorDesc: "請將充電插入車輛,然後點擊驗證按鈕",
+    stepInsertConnector: "等待插入充電器",
+    stepInsertConnectorDesc: "請將充電插入車輛,然後點擊驗證按鈕",
     tabCharge: "充電",
     tabExplore: "探索",
     tabInfo: "訊息",
     tabReserve: "預訂",
+    tipsDiscount: "您有適用折扣的會員資格,\n當前已顯示折扣價。",
     tipsDisconnectConnector: "請斷開連結並將插頭放回充電樁",
     tipsRatesTax: "所有費率均包括消費稅",
     tipsRatesTax2: "所有費率均含稅",
@@ -463,8 +464,11 @@
   support: {
     supportHotline: "客戶服務",
     labelOpenTime: "服務時間:",
-    timeAllDay: "周一至周日 - 24小時",
-    timeWeekDay: "工作日 - 24小時",
+    labelCallCentreHotline: "客服熱線",
+    labelWhatsappChat: "Whatsapp 咨詢",
+    timeAllDay: "周一至周日",
+    timeWeekDay: "工作日",
+    time24Hours: "24小時",
     btnCallSupport: "電話咨詢",
     btnWhatsapp: "Whatsapp"
   },

+ 8 - 4
Strides-APP/app/i18n/locales/zh.js

@@ -297,12 +297,13 @@ export default {
     stepInitializingDesc: "正在准备开始充电,请稍候……",
     stepStoppingCharge: "正在停止充电",
     stepStoppingChargeDesc: "正在停止充电,请稍候……",
-    stepInsertConnector: "等待插入连接器",
-    stepInsertConnectorDesc: "请将充电插入车辆,然后点击验证按钮",
+    stepInsertConnector: "等待插入充电器",
+    stepInsertConnectorDesc: "请将充电插入车辆,然后点击验证按钮",
     tabCharge: "充电",
     tabExplore: "探索",
     tabInfo: "信息",
     tabReserve: "预订",
+    tipsDiscount: "您有适用折扣的会员资格,\n当前已显示折扣价。",
     tipsDisconnectConnector: "请断开连接并将插头放回充电桩",
     tipsRatesTax: "所有费率均包括消费税",
     tipsRatesTax2: "所有费率均含税",
@@ -463,8 +464,11 @@ export default {
   support: {
     supportHotline: "客户服务",
     labelOpenTime: "服务时间:",
-    timeAllDay: "周一至周日 - 24小时",
-    timeWeekDay: "工作日 - 24小时",
+    labelCallCentreHotline: "客服热线",
+    labelWhatsappChat: "Whatsapp 客服",
+    timeAllDay: "周一至周日",
+    timeWeekDay: "工作日",
+    time24Hours: "24小时",
     btnCallSupport: "拨打电话",
     btnWhatsapp: "Whatsapp"
   },

+ 15 - 5
Strides-APP/app/pages/about/Contact.js

@@ -28,8 +28,11 @@ export default class Contact extends Component {
             resizeMode='contain'
             source={require('../../images/about-logo.png')}/>
         </View>
-        <TextView style={styles.labelText}>{$t("support.labelOpenTime")}</TextView>
-        <TextView style={styles.contentText}>{$t("support.timeAllDay")}</TextView>
+        <TextView style={styles.labelTitle}>{$t("support.labelOpenTime")}</TextView>
+        <TextView style={styles.labelText}>{$t("support.labelCallCentreHotline")}</TextView>
+        <TextView style={styles.contentText}>{$t("support.timeAllDay") + " - " + $t("support.time24Hours")}</TextView>
+        <TextView style={styles.labelText}>{$t("support.labelWhatsappChat")}</TextView>
+        <TextView style={styles.contentText}>{$t("support.timeWeekDay") + " - 9:00AM to 5:00PM" }</TextView>
         <View style={ui.flex1}></View>
         <Button
           text={$t("support.btnCallSupport")}
@@ -59,12 +62,19 @@ const styles = StyleSheet.create({
     marginTop: 16,
     marginBottom: 12
   },
-  labelText: {
+  labelTitle: {
     color: textPrimary,
-    fontSize: 18,
+    fontSize: 20,
+    fontWeight: 'bold',
+    paddingTop: 16
+  },
+  labelText: {
+    color: textSecondary,
+    fontSize: 16,
     fontWeight: 'bold',
     paddingTop: 16,
-    paddingBottom: 8
+    paddingBottom: 4,
+    textDecorationLine: 'underline'
   },
   contentText: {
     color: textSecondary,

+ 22 - 0
Strides-APP/app/pages/charging/StepStartView.js

@@ -89,6 +89,16 @@ export default StepStartView = ({
           <TextView style={styles.privateText}>{$t('charging.ratesPrivateNote')}</TextView>
         </View>
       }
+      <View style={ui.flex1}></View>
+      { !!(stationInfo.hasDiscount) &&
+        <View style={[ChargeStyle.stationInfoView, styles.discountView]}>
+          <MaterialCommunityIcons
+            name="brightness-percent"
+            size={28}
+            color={colorAccent}/>
+          <TextView style={styles.discountText}>{$t('charging.tipsDiscount')}</TextView>
+        </View>
+      }
     </View>
     {/* <Payment refreshId={refreshId}/> */}
     { canIntoCharging
@@ -164,4 +174,16 @@ const styles = StyleSheet.create({
     marginLeft: 16,
     elevation: 1.5
   },
+  discountView: {
+    borderWidth: 1,
+    borderColor: colorAccent
+  },
+  discountText: {
+    flex: 1,
+    fontSize: 12,
+    fontWeight: 'bold',
+    textAlign: 'left',
+    color: colorAccent,
+    ...$padding(2, 10)
+  }
 })

+ 3 - 6
Strides-APP/app/pages/home/Home.js

@@ -279,14 +279,12 @@ export default class HomePage extends Component {
    * @param {boolean} first 是否初始化
    */
   getStationList(region, first) {
-    if (!isIOS)
-      Dialog.showProgressDialog();
+    Dialog.showProgressDialog();
     if (getUserId()) {
       this.filter.operaUserId = getUserId()
     }
     apiStation.getAllStation(this.filter).then(res => {
-      if (!isIOS)
-        Dialog.dismissLoading();
+      Dialog.dismissLoading();
       if (res.data.sites) {
         const list = [];
         res.data.sites.forEach(item => {
@@ -323,8 +321,7 @@ export default class HomePage extends Component {
         }
       }
     }).catch(err => {
-      if (!isIOS)
-        Dialog.dismissLoading();
+      Dialog.dismissLoading();
       toastShort(err);
       this.setState({
         stopList: []

+ 8 - 8
Strides-APP/app/pages/home/maps/SearchTool.js

@@ -82,19 +82,19 @@ export default class SearchTool extends Component {
     return (
       <View>
         <View style={styles.searchView}>
-          <View style={styles.searchInput}>
+          <Pressable
+            style={styles.searchInput}
+            onPress={() => {
+              startPage(PageList.search);
+            }}>
             <Feather
               name={'search'}
               size={24}
               color={'#444'}/>
-            <Text
-              style={styles.searchText}
-              onPress={() => {
-                startPage(PageList.search);
-              }}>
-              Search
+            <Text style={styles.searchText}>
+              {$t('home.search')}
             </Text>
-          </View>
+          </Pressable>
           { this.props.mapReady &&
             <Pressable
               style={styles.mapIcon}

+ 23 - 3
Strides-APP/app/pages/my/ProfileV2.js

@@ -3,7 +3,7 @@
  * @邠心vbe on 2021/04/27
  */
 import React, { Component } from 'react';
-import { View, Text, StyleSheet, Image, ScrollView } from 'react-native';
+import { View, StyleSheet, Image, ScrollView } from 'react-native';
 import apiUser from '../../api/apiUser';
 import { host, setAccessToken } from '../../api/http';
 import Button, { ElevationObject } from '../../components/Button';
@@ -124,6 +124,12 @@ export default class ProfileV2 extends Component {
               numberOfLines={1}>{this.state.userInfo.nickName}</TextView>
             <TextView style={styles.userText}>{this.state.userInfo.email}</TextView>
             <TextView style={styles.userText}>{(utils.isNotEmpty(this.state.userInfo.callingCode) && "+" + this.state.userInfo.callingCode + " ") + this.state.userInfo.phone}</TextView>
+            <View style={styles.userTypeView}>
+              { this.state.userInfo.userType?.split(";").map((item, index) => {
+                  return <TextView key={index} style={styles.userTypeText}>{item}</TextView>
+                })
+              }
+            </View>
           </View>
           <FontAwesome
             size={34}
@@ -236,7 +242,7 @@ export default class ProfileV2 extends Component {
             color={textCancel}
             name='angle-right'/>
         </Button>
-        { (!app.modules.membership && this.state.userInfo.userType == "Public") &&
+        { (!app.modules.membership && this.state.userInfo.userType.toLowerCase() == "public") &&
           <Button
             style={styles.cardView}
             viewStyle={styles.profileItem}
@@ -247,7 +253,7 @@ export default class ProfileV2 extends Component {
               size={32}
               color="#00638C"/>
             <View style={styles.cardInfo}>
-              <Text style={styles.cardLabel}>{$t('profile.apply2Fleet')}</Text>
+              <TextView style={styles.cardLabel}>{$t('profile.apply2Fleet')}</TextView>
             </View>
             <FontAwesome
               size={28}
@@ -439,6 +445,20 @@ const styles = StyleSheet.create({
   deleteButton: {
     ...$margin(48, 16, 16),
     backgroundColor: '#EA0A2A'
+  },
+  userTypeView: {
+    paddingTop: 2,
+    alignItems: 'center',
+    flexDirection: 'row'
+  },
+  userTypeText: {
+    color: textLight,
+    fontSize: 8,
+    marginRight: 4,
+    borderRadius: 2,
+    textAlign: "center",
+    ...$padding(2, 4),
+    backgroundColor: colorAccent
   }
 })
  

+ 1 - 0
Strides-APP/app/utils/constant.js

@@ -52,6 +52,7 @@ global.chargeInfoState = {};
 global.userInfo = {
   userPk: -1,
   credit: 0,
+  userType: "Public",
   nickname: 'Sign In'
 };
 

+ 1 - 0
Strides-APP/app/utils/utils.js

@@ -67,6 +67,7 @@ export default {
         rateList: obj.rates,
         siteType: obj.siteType,
         parkingFee: obj.parkingFee,
+        hasDiscount: obj.hasDiscount,
         parkingFeeFree: obj.free,
         operatingHours: obj.operatingHours,
         additionalNotes: obj.additionalNotes,