Ver Fonte

Remove add vehicle function in chargeco app
https://dev.wormwood.com.sg/zentao/task-view-362.html

vbea há 1 ano atrás
pai
commit
d4ee855ca6

+ 1 - 0
Strides-APP/app.json

@@ -40,6 +40,7 @@
     "paymentMethod": true
   },
   "vehicle": {
+    "enable": false,
     "newVersionPage": false,
     "showLicencePlate": true,
     "showRequiredAsterisk": false,

+ 3 - 2
Strides-APP/app/pages/charge/QRScan.js

@@ -9,6 +9,7 @@ import { RNCamera } from 'react-native-camera';
 import apiCharge from '../../api/apiCharge';
 import { PageList } from '../Router';
 import Dialog from '../../components/Dialog';
+import app from '../../../app.json';
 
 export const QRResult = {
   haveResult: () => {
@@ -175,8 +176,8 @@ export default class QRScan extends Component {
           this.setState({
             isResult: false
           });
-          if (code == 5194 && btn == Dialog.BUTTON_OK) {
-            startPage(PageList.myVehicles)
+          if (code == 5194 && btn == Dialog.BUTTON_OK && app.vehicle.enable) {
+            startPage(app.vehicle.newVersionPage ? PageList.vehiclesListV2 : PageList.myVehicles)
           }
         }
       });

+ 18 - 16
Strides-APP/app/pages/my/ProfileV2.js

@@ -174,22 +174,24 @@ export default class ProfileV2 extends Component {
             name='angle-right'/>
         </Button>
         {/* Vehicle Info */}
-        <Button
-          style={styles.cardView}
-          viewStyle={styles.profileItem}
-          onClick={() => startPage(app.vehicle.newVersionPage ? PageList.vehiclesListV2 : PageList.myVehicles)}>
-          <Image
-            style={styles.cardIcon}
-            source={require('../../images/user/card-vehicle.png')}/>
-          <View style={styles.cardInfo}>
-            <TextView style={styles.cardLabel}>{$t('profile.myVehicles')}</TextView>
-            <TextView style={styles.cardPrimary}>{this.state.userInfo.countVehicle}</TextView>
-          </View>
-          <FontAwesome
-            size={28}
-            color={textCancel}
-            name='angle-right'/>
-        </Button>
+        { app.vehicle.enable &&
+          <Button
+            style={styles.cardView}
+            viewStyle={styles.profileItem}
+            onClick={() => startPage(app.vehicle.newVersionPage ? PageList.vehiclesListV2 : PageList.myVehicles)}>
+            <Image
+              style={styles.cardIcon}
+              source={require('../../images/user/card-vehicle.png')}/>
+            <View style={styles.cardInfo}>
+              <TextView style={styles.cardLabel}>{$t('profile.myVehicles')}</TextView>
+              <TextView style={styles.cardPrimary}>{this.state.userInfo.countVehicle}</TextView>
+            </View>
+            <FontAwesome
+              size={28}
+              color={textCancel}
+              name='angle-right'/>
+          </Button>
+        }
         {/* Vehicle List */}
         {/* <View style={styles.titleView}>
           <Text style={styles.title}>{$t('profile.myVehicles')}</Text>