vbea 1 rok temu
rodzic
commit
c3fa445607

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

@@ -1,2 +1,2 @@
-#Wed Sep 25 10:28:36 CST 2024
-VERSION_CODE=503
+#Wed Sep 25 17:24:40 CST 2024
+VERSION_CODE=507

+ 10 - 8
Strides-APP/app/pages/chargeV2/PaymentListV2.js

@@ -56,29 +56,31 @@ export default class PaymentListV2 extends Component {
       chargeBoxId: this.props.chargeBoxId
     }).then(res => {
       if (res.data) {
-        this.setState({
-          options: res.data,
-          isloading: false
-        })
+        let index = 0;
         if (this.props.payType && this.props.payType.code) {
           for (let i = 0; i < res.data.length; i++) {
             let type = res.data[i];
             if (type.code == this.props.payType.code) {
-              this.changeMethod(i);
+              index = i;
               break;
             }
           }
         } else {
-          let index = 0;
           for (let i = 0; i < res.data.length; i++) {
             let type = res.data[i];
-            if (type.def) {
+            if (type.code == "fleet_group_wallet" || type.code == "fleet_individual_wallet") {
               index = i;
+              type.def = true;
               break;
             }
           }
-          this.changeMethod(index);
         }
+        this.setState({
+          options: res.data,
+          isloading: false
+        }, () => {
+          this.changeMethod(index);
+        });
       }
     }).catch(err => {