@lancom/shared 0.0.320 → 0.0.321

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -67,7 +67,7 @@
67
67
  <progress-steps-controls
68
68
  class="OrderPaymentInformation__controls"
69
69
  :disabled-prev="creating"
70
- :disabled-next="creating"
70
+ :disabled-next="loadingCard || creating || submitting"
71
71
  label-next="MAKE PAYMENT"
72
72
  @prev="$emit('prev')"
73
73
  @next="submit" />
@@ -106,6 +106,7 @@ export default {
106
106
  return {
107
107
  initing: false,
108
108
  creating: false,
109
+ submitting: false,
109
110
  loadingCard: true,
110
111
  isDepositPayment: this.order.paymentMethod === ORDER_PAYMENT_METHOD.DEPOSIT
111
112
  };
@@ -163,7 +164,7 @@ export default {
163
164
  }).join('</p><p>')}</p>`;
164
165
  },
165
166
  async submit() {
166
- this.creating = true;
167
+ this.submitting = true;
167
168
  this.errorMessage = null;
168
169
 
169
170
  const orderInfo = this.orderData || generateOrderData(this.order, this.entities, this.cartPricing);
@@ -186,6 +187,7 @@ export default {
186
187
  }
187
188
  }
188
189
  this.creating = false;
190
+ this.submitting = false;
189
191
  // this.$emit('next');
190
192
  },
191
193
  async submitOrder() {
@@ -36,7 +36,7 @@ export default {
36
36
  return this.payment.clientKey;
37
37
  }
38
38
  },
39
- created() {
39
+ mounted() {
40
40
  this.loadStripe();
41
41
  },
42
42
  destroyed() {
@@ -77,9 +77,8 @@ export default {
77
77
  };
78
78
  document.body.appendChild(domElement);
79
79
  } else {
80
- let repeated = 0;
81
80
  timer = setInterval(() => {
82
- if (typeof window.Stripe !== 'undefined' || repeated++ > 40) {
81
+ if (typeof window.Stripe !== 'undefined') {
83
82
  this.onLoaded();
84
83
  clearInterval(timer);
85
84
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lancom/shared",
3
- "version": "0.0.320",
3
+ "version": "0.0.321",
4
4
  "description": "lancom common scripts",
5
5
  "author": "e.tokovenko <e.tokovenko@gmail.com>",
6
6
  "repository": {