فهرست منبع

Remove App Wallet
https://dev.wormwood.com.sg/zentao/task-view-547.html

vbea 1 سال پیش
والد
کامیت
a5f53b266f
3فایلهای تغییر یافته به همراه40 افزوده شده و 19 حذف شده
  1. 2 1
      Strides-APP/app.json
  2. 34 17
      Strides-APP/app/pages/my/ProfileV2.js
  3. 4 1
      Strides-APP/app/pages/wallets/ViewWallet.js

+ 2 - 1
Strides-APP/app.json

@@ -34,7 +34,8 @@
     "vouchers": false
   },
   "v4": {
-    "drawer": true
+    "drawer": true,
+    "wallet": true
   },
   "charge": {
     "version": 3,

+ 34 - 17
Strides-APP/app/pages/my/ProfileV2.js

@@ -161,24 +161,41 @@ export default class ProfileV2 extends Component {
         <ShadowViewV2/>
         <EndView half/>
         {/* Wallet Info */}
-        <Button 
-          style={styles.cardView}
-          viewStyle={styles.profileItem}
-          onClick={() => startPage(PageList.wallet)}>
-          <Image
-            style={styles.cardIcon}
-            source={require('../../images/user/card-wallet.png')}/>
-          <View style={styles.cardInfo}>
-            <TextView style={styles.cardLabel}>{$t('wallet.creditWalletLabel')}</TextView>
-            <TextView style={styles.cardPrimary}>{this.state.userInfo.creditStr}</TextView>
-          </View>
-          <FontAwesome
-            size={24}
-            color={textCancel}
-            name='angle-right'/>
-        </Button>
+        { app.v4.wallet
+        ? <Button 
+            style={styles.cardView}
+            viewStyle={styles.profileItem}
+            onClick={() => startPage(PageList.wallets)}>
+            <Image
+              style={styles.cardIcon}
+              source={require('../../images/user/card-wallet.png')}/>
+            <View style={styles.cardInfo}>
+              <TextView style={styles.cardLabel}>{$t('drawer.wallets')}</TextView>
+            </View>
+            <FontAwesome
+              size={24}
+              color={textCancel}
+              name='angle-right'/>
+          </Button>
+        : <Button 
+            style={styles.cardView}
+            viewStyle={styles.profileItem}
+            onClick={() => startPage(PageList.wallet)}>
+            <Image
+              style={styles.cardIcon}
+              source={require('../../images/user/card-wallet.png')}/>
+            <View style={styles.cardInfo}>
+              <TextView style={styles.cardLabel}>{$t('wallet.creditWalletLabel')}</TextView>
+              <TextView style={styles.cardPrimary}>{this.state.userInfo.creditStr}</TextView>
+            </View>
+            <FontAwesome
+              size={24}
+              color={textCancel}
+              name='angle-right'/>
+          </Button>
+        }
         <ShadowViewV2/>
-        { utils.isNotEmpty(this.state.userInfo.groupWallet) && <>
+        { (utils.isNotEmpty(this.state.userInfo.groupWallet) && !app.v4.wallet) && <>
           <Button 
             style={styles.cardView}
             viewStyle={styles.profileItem}>

+ 4 - 1
Strides-APP/app/pages/wallets/ViewWallet.js

@@ -37,7 +37,10 @@ const ViewWallet = ({
       }
     </View>
     <TextView style={styles.walletProvider}>{wallet.walletPrincipalName}</TextView>
-    <TextView style={styles.walletLabel}>Current Balance:</TextView>
+    { wallet?.walletTypeCode.indexOf("pay_per_use") >= 0
+    ? <TextView style={styles.walletLabel}>Pre-Auth Amount:</TextView>
+    : <TextView style={styles.walletLabel}>Current Balance:</TextView>
+    }
     <TextView style={styles.walletBalance}>{wallet.currentBalance}</TextView>
     { utils.isNotEmpty(wallet.expiresDate) &&
       <TextView style={styles.walletLabel}>Expires {wallet.expiresDate}</TextView>