@lancom/shared 0.0.280 → 0.0.282

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.
Files changed (95) hide show
  1. package/assets/js/api/admin.js +3 -0
  2. package/assets/js/api/index.js +7 -4
  3. package/assets/js/models/print-area.js +8 -4
  4. package/assets/js/utils/colors.js +1 -1
  5. package/assets/js/utils/fabric-helper.js +5 -18
  6. package/assets/js/utils/filters.js +2 -2
  7. package/assets/js/utils/product.js +10 -1
  8. package/assets/scss/_common.scss +10 -0
  9. package/components/asides/contact_us/contact-us.vue +9 -2
  10. package/components/asides/menu/menu.vue +1 -25
  11. package/components/checkout/cart/cart.mixin.js +3 -3
  12. package/components/checkout/cart/cart.scss +8 -109
  13. package/components/checkout/cart/cart.vue +84 -46
  14. package/components/checkout/cart/cart_entity/cart_entity_color_simple_products/cart_entity_color_simple_product/cart-entity-color-simple-product.vue +7 -4
  15. package/components/checkout/cart/cart_price_info/cart-price-info.vue +4 -5
  16. package/components/checkout/cart/cart_pricing/cart-pricing.scss +34 -0
  17. package/components/checkout/cart/cart_pricing/cart-pricing.vue +112 -0
  18. package/components/checkout/cart/cart_shipments_pricing/cart-shipments-pricing.vue +2 -2
  19. package/components/checkout/order/address-form/address-form.scss +16 -0
  20. package/components/checkout/order/address-form/address-form.vue +199 -91
  21. package/components/checkout/order/order-billing-information/order-billing-information.scss +1 -1
  22. package/components/checkout/order/order-payment-information/order-payment-information.vue +15 -5
  23. package/components/checkout/order/order.vue +2 -1
  24. package/components/common/client_settings/client-settings.scss +6 -0
  25. package/components/common/client_settings/client-settings.vue +9 -1
  26. package/components/common/payment/payment_card/stripe/stripe.vue +1 -0
  27. package/components/common/payment/payment_success/payment-success.vue +8 -1
  28. package/components/common/postcode_select/postcode-select.vue +24 -12
  29. package/components/common/price.vue +1 -1
  30. package/components/common/pricing_table/pricing-table.vue +3 -2
  31. package/components/common/tabs.vue +17 -8
  32. package/components/editor/editor.scss +6 -0
  33. package/components/editor/editor.vue +9 -25
  34. package/components/editor/editor_layers/editor-layers.scss +18 -0
  35. package/components/editor/editor_layers/editor-layers.vue +76 -20
  36. package/components/editor/editor_layers/editor_layers_layer/editor-layers-layer.vue +11 -4
  37. package/components/editor/editor_print_area_options/editor-print-area-options.vue +6 -1
  38. package/components/editor/editor_print_area_options/editor_print_area_option/editor-print-area-option.vue +2 -2
  39. package/components/editor/editor_product_details/editor-product-details.scss +8 -2
  40. package/components/editor/editor_product_details/editor-product-details.vue +22 -25
  41. package/components/editor/editor_wizard/editor-wizard.vue +2 -1
  42. package/components/editor/editor_workspace/editor-workspace.vue +7 -3
  43. package/components/editor/editor_workspace/editor_workspace_side/editor-workspace-side.vue +17 -20
  44. package/components/editor/mobile_editor_product_details/mobile-editor-product-details.scss +2 -2
  45. package/components/modals/cart_modal/cart-modal.vue +1 -1
  46. package/components/modals/order_modal/order-modal.vue +6 -0
  47. package/components/modals/payment_modal/payment-modal.vue +4 -3
  48. package/components/order/order_payment/order-payment.vue +6 -6
  49. package/components/product/editor_pricing/editor-pricing.scss +75 -0
  50. package/components/product/editor_pricing/editor-pricing.vue +197 -0
  51. package/components/product/editor_pricing/editor_pricing_details/editor-pricing-details.scss +0 -0
  52. package/components/product/editor_pricing/editor_pricing_details/editor-pricing-details.vue +29 -0
  53. package/components/product/editor_pricing/editor_pricing_details/editor_pricing_details_prints/editor-pricing-details-prints.scss +41 -0
  54. package/components/product/editor_pricing/editor_pricing_details/editor_pricing_details_prints/editor-pricing-details-prints.vue +118 -0
  55. package/components/product/editor_pricing/editor_pricing_details/editor_pricing_details_products/editor-pricing-details-products.scss +41 -0
  56. package/components/product/editor_pricing/editor_pricing_details/editor_pricing_details_products/editor-pricing-details-products.vue +102 -0
  57. package/components/product/product.vue +1 -1
  58. package/components/product/product_colors_selector/product-colors-selector.scss +117 -0
  59. package/components/product/product_colors_selector/product-colors-selector.vue +188 -0
  60. package/components/product/product_multipacks_carousel/product-multipacks-carousel.vue +3 -1
  61. package/components/product/product_size_selector/product_size_selector_color/product_size_selector_color_cell/product-size-selector-color-cell.vue +4 -5
  62. package/components/product/products_size_selector_color/product_size_selector_color/product-size-selector-color.scss +58 -0
  63. package/components/product/products_size_selector_color/product_size_selector_color/product-size-selector-color.vue +128 -0
  64. package/components/product/products_size_selector_color/products-size-selector-color.scss +12 -0
  65. package/components/product/products_size_selector_color/products-size-selector-color.vue +43 -0
  66. package/components/product/wizard/wizard_print_layers/wizard_print_layer/wizard-print-layer.vue +4 -34
  67. package/components/product/wizard/wizard_print_size/wizard_print_area_print_size/wizard-print-area-print-size.vue +2 -1
  68. package/components/product/wizard/wizard_print_text_or_logo/wizard-print-text-or-logo.vue +22 -1
  69. package/components/product/wizard/wizard_print_type/wizard_print_area_print_type/wizard-print-area-print-type.vue +2 -1
  70. package/components/products/product_list/product-list.scss +2 -2
  71. package/components/products/product_list_product/product-list-product.scss +7 -11
  72. package/components/products/product_list_product/product-list-product.vue +7 -15
  73. package/components/the_aside/the-aside.vue +1 -0
  74. package/components/the_navbar/the-navbar.scss +1 -1
  75. package/feeds/google-shopping.js +5 -5
  76. package/layouts/error.vue +39 -0
  77. package/layouts/products.vue +386 -0
  78. package/mixins/add-to-cart.js +64 -0
  79. package/mixins/payment.js +2 -1
  80. package/mixins/print-layer.js +45 -0
  81. package/mixins/product-preview.js +1 -1
  82. package/mixins/product-view.js +313 -0
  83. package/nuxt.config.js +0 -5
  84. package/package.json +1 -1
  85. package/pages/checkout/cart.vue +40 -0
  86. package/pages/checkout/order.vue +72 -0
  87. package/pages/customer/create.vue +33 -0
  88. package/pages/customer/password/_token.vue +79 -0
  89. package/pages/customer/recovery.vue +33 -0
  90. package/pages/customer/settings.vue +33 -0
  91. package/pages/customer/signin.vue +33 -0
  92. package/routes/index.js +35 -0
  93. package/store/cart.js +15 -6
  94. package/store/order.js +2 -2
  95. package/store/product.js +5 -12
@@ -0,0 +1,112 @@
1
+ <template>
2
+ <div class="CartPricing__wrapper">
3
+ <div class="lc_h3 lc_uppercase lc_black">
4
+ Order summary
5
+ </div>
6
+ <div class="CartPricing__info">
7
+ <div class="lc_body-large lc_gray-main">
8
+ Product cost:
9
+ </div>
10
+ <div class="lc_body-large lc_gray-main">
11
+ {{ pricing.products.products.totalPriceWithoutTax | price(currency) }}
12
+ </div>
13
+ </div>
14
+ <div class="CartPricing__info">
15
+ <div class="lc_body-large lc_gray-main">
16
+ Print cost:
17
+ </div>
18
+ <div class="lc_body-large lc_gray-main">
19
+ {{ pricing.products.prints.totalPriceWithoutTax | price(currency) }}
20
+ </div>
21
+ </div>
22
+ <div class="CartPricing__info CartPricing__info--gray">
23
+ <div class="lc_body-large lc_black">
24
+ SUBTOTAL:
25
+ </div>
26
+ <div class="lc_body-large lc_black">
27
+ {{ pricing.products.totalPriceWithoutTax | price(currency) }}
28
+ </div>
29
+ </div>
30
+ <cart-shipments-pricing />
31
+ <div class="CartPricing__info">
32
+ <div class="lc_body-large lc_gray-main">
33
+ Total Delivery:
34
+ </div>
35
+ <div
36
+ v-if="pricing.shipping"
37
+ class="lc_body-large lc_gray-main">
38
+ {{ pricing.shipping.totalPriceWithoutTax | price(currency) }} ({{ pricing.shipping.weight }})
39
+ </div>
40
+ <div
41
+ v-else
42
+ class="lc_body-large lc_gray-main">
43
+ pending
44
+ </div>
45
+ </div>
46
+ <div class="CartPricing__info lc_gray-main">
47
+ <div class="lc_body-large">
48
+ {{ taxName }} {{ pricing.tax.percent }}:
49
+ </div>
50
+ <div class="lc_body-large lc_gray-main">
51
+ {{ pricing.tax.totalPrice | price(currency) }}
52
+ </div>
53
+ </div>
54
+ <div
55
+ v-if="pricing.coupon && !pricing.coupon.showCouponIsApplied"
56
+ class="CartPricing__info lc_gray-main">
57
+ <div class="lc_body-large">
58
+ COUPON, {{ pricing.coupon.code }}:
59
+ </div>
60
+ <div class="lc_body-large lc_gray-main">
61
+ {{ pricing.coupon.totalPrice | price(currency) }}
62
+ </div>
63
+ </div>
64
+ <div class="CartPricing__info CartPricing__info--gray">
65
+ <div class="lc_title-large lc_black">
66
+ TOTAL INC. {{ taxName }}:
67
+ </div>
68
+ <div class="lc_title-large lc_black">
69
+ {{ pricing.totalPrice | price(currency) }}
70
+ </div>
71
+ </div>
72
+ </div>
73
+ </template>
74
+
75
+ <script>
76
+ import { mapGetters } from 'vuex';
77
+ import { price } from '@lancom/shared/assets/js/utils/filters';
78
+ import CartShipmentsPricing from '@lancom/shared/components/checkout/cart/cart_shipments_pricing/cart-shipments-pricing';
79
+
80
+ export default {
81
+ name: 'CartPricing',
82
+ components: {
83
+ CartShipmentsPricing
84
+ },
85
+ filters: {
86
+ price
87
+ },
88
+ props: {
89
+ pricing: {
90
+ type: Object,
91
+ required: true
92
+ },
93
+ itemsLabel: {
94
+ type: String,
95
+ default: 'Tee'
96
+ }
97
+ },
98
+ computed: {
99
+ ...mapGetters(['currency', 'taxName']),
100
+ hasSuppliersWithRates() {
101
+ return this.suppliersWithRates.length > 0;
102
+ },
103
+ suppliersWithRates() {
104
+ return this.pricing?.shipping?.suppliersWithRates || [];
105
+ }
106
+ }
107
+ };
108
+ </script>
109
+
110
+ <style lang="scss" scoped>
111
+ @import 'cart-pricing';
112
+ </style>
@@ -77,7 +77,7 @@ export default {
77
77
  },
78
78
  mixins: [confirm],
79
79
  computed: {
80
- ...mapGetters(['shop', 'country']),
80
+ ...mapGetters(['shop', 'country', 'currency']),
81
81
  ...mapGetters('cart', [
82
82
  'cartPricing'
83
83
  ]),
@@ -98,7 +98,7 @@ export default {
98
98
  const reset = await this.showConfirmationModal(message);
99
99
 
100
100
  if (reset) {
101
- this.removeSupplier({ supplier, shop: this.shop });
101
+ this.removeSupplier({ supplier, shop: this.shop, currency: this.currency });
102
102
  }
103
103
  }
104
104
  }
@@ -14,4 +14,20 @@
14
14
  }
15
15
  }
16
16
  }
17
+ }
18
+
19
+ .CustomerAddressForm {
20
+ &__toggle-address {
21
+ margin-bottom: 10px;
22
+ cursor: pointer;
23
+ display: inline-block;
24
+ color: $green;
25
+ border-bottom: 1px dashed $green;
26
+ }
27
+ &__section {
28
+ padding: 15px;
29
+ border: 1px solid #d7d7d7;
30
+ margin-bottom: 10px;
31
+ border-radius: 4px;
32
+ }
17
33
  }
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div class="CustomerAddressForm__wrapper">
3
- <div class="CustomerAddressForm__form">
3
+ <div class="CustomerAddressForm__form CustomerAddressForm__section">
4
4
  <div class="form-row--cols">
5
5
  <validation-provider
6
6
  v-slot="{ errors }"
@@ -124,69 +124,11 @@
124
124
  </span>
125
125
  </validation-provider>
126
126
  </div>
127
- <validation-provider
128
- v-slot="{ errors }"
129
- tag="div"
130
- name="Address line 1"
131
- rules="required"
132
- class="form-row">
133
- <label
134
- for="addressLine1"
135
- class="form-label">
136
- Address line 1
137
- </label>
138
- <input
139
- id="addressLine1"
140
- ref="addressLine1"
141
- v-model="address.addressLine1"
142
- name="addressLine1"
143
- type="text"
144
- class="form-field labelless"
145
- placeholder="Address line 1"
146
- :class="{
147
- 'is-danger': errors.length,
148
- filled: address.addressLine1
149
- }"
150
- @input="validateAddress"
151
- @keyup.enter="$refs.addressLine1.focus()" />
152
- <span
153
- v-if="errors.length"
154
- class="form-help is-danger">
155
- {{ errors[0] }}
156
- </span>
157
- </validation-provider>
158
- <validation-provider
159
- v-slot="{ errors }"
160
- tag="div"
161
- name="Address line 2"
162
- class="form-row">
163
- <label
164
- for="addressLine2"
165
- class="form-label">
166
- Address line 2
167
- </label>
168
- <input
169
- id="addressLine2"
170
- ref="addressLine2"
171
- v-model="address.addressLine2"
172
- name="addressLine2"
173
- type="text"
174
- class="form-field labelless"
175
- placeholder="Address line 2"
176
- :class="{
177
- 'is-danger': errors.length,
178
- filled: address.addressLine2
179
- }"
180
- @input="validateAddress"
181
- @keyup.enter="$refs.addressLine2.focus()" />
182
- <span
183
- v-if="errors.length"
184
- class="form-help is-danger">
185
- {{ errors[0] }}
186
- </span>
187
- </validation-provider>
127
+ </div>
128
+ <div class="CustomerAddressForm__section">
188
129
  <div class="form-row--cols">
189
130
  <postcode-select
131
+ v-if="!visibleFullAddress"
190
132
  class="form-col col-half"
191
133
  :suburb="suburb"
192
134
  :labelless="true"
@@ -210,36 +152,190 @@
210
152
  disabled />
211
153
  </div>
212
154
  </div>
213
- <validation-provider
214
- v-if="!withoutAdditionalInfo"
215
- v-slot="{ errors }"
216
- tag="div"
217
- name="additionalInfo"
218
- class="form-row">
219
- <label
220
- for="additionalInfo"
221
- class="form-label">
222
- Additional Info
223
- </label>
224
- <input
225
- id="additionalInfo"
226
- ref="additionalInfo"
227
- v-model="address.additionalInfo"
155
+ <div
156
+ @click="visibleFullAddress = !visibleFullAddress"
157
+ class="CustomerAddressForm__toggle-address">
158
+ {{ visibleFullAddress ? 'Find a Different Address' : 'Enter Address Manually' }}
159
+ </div>
160
+ <div v-if="visibleFullAddress">
161
+ <validation-provider
162
+ v-slot="{ errors }"
163
+ tag="div"
164
+ name="Address line 1"
165
+ rules="required"
166
+ class="form-row">
167
+ <label
168
+ for="addressLine1"
169
+ class="form-label">
170
+ Address line 1
171
+ </label>
172
+ <input
173
+ id="addressLine1"
174
+ ref="addressLine1"
175
+ v-model="address.addressLine1"
176
+ name="addressLine1"
177
+ type="text"
178
+ class="form-field labelless"
179
+ placeholder="Address line 1"
180
+ :class="{
181
+ 'is-danger': errors.length,
182
+ filled: address.addressLine1
183
+ }"
184
+ @input="validateAddress"
185
+ @keyup.enter="$refs.addressLine1.focus()" />
186
+ <span
187
+ v-if="errors.length"
188
+ class="form-help is-danger">
189
+ {{ errors[0] }}
190
+ </span>
191
+ </validation-provider>
192
+ <validation-provider
193
+ v-slot="{ errors }"
194
+ tag="div"
195
+ name="Address line 2"
196
+ class="form-row">
197
+ <label
198
+ for="addressLine2"
199
+ class="form-label">
200
+ Address line 2
201
+ </label>
202
+ <input
203
+ id="addressLine2"
204
+ ref="addressLine2"
205
+ v-model="address.addressLine2"
206
+ name="addressLine2"
207
+ type="text"
208
+ class="form-field labelless"
209
+ placeholder="Address line 2"
210
+ :class="{
211
+ 'is-danger': errors.length,
212
+ filled: address.addressLine2
213
+ }"
214
+ @input="validateAddress"
215
+ @keyup.enter="$refs.addressLine2.focus()" />
216
+ <span
217
+ v-if="errors.length"
218
+ class="form-help is-danger">
219
+ {{ errors[0] }}
220
+ </span>
221
+ </validation-provider>
222
+ <validation-provider
223
+ v-if="!withoutAdditionalInfo"
224
+ v-slot="{ errors }"
225
+ tag="div"
228
226
  name="additionalInfo"
229
- placeholder="Additional Info"
230
- type="text"
231
- class="form-field labelless"
232
- :class="{
233
- 'is-danger': errors.length,
234
- filled: address.additionalInfo
235
- }"
236
- @keyup.enter="$refs.additionalInfo.focus()" />
237
- <span
238
- v-if="errors.length"
239
- class="form-help is-danger">
240
- {{ errors[0] }}
241
- </span>
242
- </validation-provider>
227
+ class="form-row">
228
+ <label
229
+ for="additionalInfo"
230
+ class="form-label">
231
+ Additional Info
232
+ </label>
233
+ <input
234
+ id="additionalInfo"
235
+ ref="additionalInfo"
236
+ v-model="address.additionalInfo"
237
+ name="additionalInfo"
238
+ placeholder="Additional Info"
239
+ type="text"
240
+ class="form-field labelless"
241
+ :class="{
242
+ 'is-danger': errors.length,
243
+ filled: address.additionalInfo
244
+ }"
245
+ @keyup.enter="$refs.additionalInfo.focus()" />
246
+ <span
247
+ v-if="errors.length"
248
+ class="form-help is-danger">
249
+ {{ errors[0] }}
250
+ </span>
251
+ </validation-provider>
252
+ <div class="form-row--cols">
253
+ <validation-provider
254
+ v-slot="{ errors }"
255
+ tag="div"
256
+ name="postcode"
257
+ class="form-col">
258
+ <label
259
+ for="postcode"
260
+ class="form-label">
261
+ Postcode
262
+ </label>
263
+ <input
264
+ id="postcode"
265
+ ref="postcode"
266
+ v-model="address.postcode"
267
+ name="postcode"
268
+ placeholder="Postcode"
269
+ type="text"
270
+ class="form-field labelless"
271
+ :class="{
272
+ 'is-danger': errors.length,
273
+ filled: address.postcode
274
+ }" />
275
+ <span
276
+ v-if="errors.length"
277
+ class="form-help is-danger">
278
+ {{ errors[0] }}
279
+ </span>
280
+ </validation-provider>
281
+ <validation-provider
282
+ v-slot="{ errors }"
283
+ tag="div"
284
+ name="locality"
285
+ class="form-col">
286
+ <label
287
+ for="locality"
288
+ class="form-label">
289
+ Locality
290
+ </label>
291
+ <input
292
+ id="locality"
293
+ ref="locality"
294
+ v-model="address.city"
295
+ name="locality"
296
+ placeholder="Locality"
297
+ type="text"
298
+ class="form-field labelless"
299
+ :class="{
300
+ 'is-danger': errors.length,
301
+ filled: address.city
302
+ }" />
303
+ <span
304
+ v-if="errors.length"
305
+ class="form-help is-danger">
306
+ {{ errors[0] }}
307
+ </span>
308
+ </validation-provider>
309
+ <validation-provider
310
+ v-slot="{ errors }"
311
+ tag="div"
312
+ name="state"
313
+ class="form-col">
314
+ <label
315
+ for="state"
316
+ class="form-label">
317
+ State
318
+ </label>
319
+ <input
320
+ id="state"
321
+ ref="state"
322
+ v-model="address.state"
323
+ name="state"
324
+ placeholder="State"
325
+ type="text"
326
+ class="form-field labelless"
327
+ :class="{
328
+ 'is-danger': errors.length,
329
+ filled: address.state
330
+ }" />
331
+ <span
332
+ v-if="errors.length"
333
+ class="form-help is-danger">
334
+ {{ errors[0] }}
335
+ </span>
336
+ </validation-provider>
337
+ </div>
338
+ </div>
243
339
  </div>
244
340
  </div>
245
341
  </template>
@@ -253,6 +349,11 @@ export default {
253
349
  components: {
254
350
  PostcodeSelect
255
351
  },
352
+ data() {
353
+ return {
354
+ visibleFullAddress: false
355
+ };
356
+ },
256
357
  props: {
257
358
  address: {
258
359
  type: Object,
@@ -297,9 +398,16 @@ export default {
297
398
  this.$set(this.address, 'postcode', suburb.postcode);
298
399
  this.$set(this.address, 'city', suburb.locality);
299
400
  this.$set(this.address, 'country', suburb.country);
401
+ if (suburb.addressLine1) {
402
+ this.$set(this.address, 'addressLine1', suburb.addressLine1);
403
+ }
404
+ if (suburb.addressLine2) {
405
+ this.$set(this.address, 'addressLine2', suburb.addressLine2);
406
+ }
300
407
  }
301
408
  },
302
409
  handleSuburbChange(suburb) {
410
+ this.visibleFullAddress = true;
303
411
  this.setAddressSuburb(suburb);
304
412
  this.setSuburb(suburb);
305
413
  this.calculateCartPrice({ shop: this.shop, country: this.country });
@@ -1,5 +1,5 @@
1
1
  .OrderBillingInformation {
2
2
  &__form {
3
- margin-top: 44px;
3
+ margin-top: 14px;
4
4
  }
5
5
  }
@@ -53,12 +53,18 @@
53
53
  class="OrderPaymentInformation__error mb-8">
54
54
  {{ errorMessage }}
55
55
  </div>
56
- <payment-cart
56
+ <div
57
+ v-if="loadingCard"
58
+ class="lc_modal__spinner">
59
+ <spinner />
60
+ </div>
61
+ <payment-card
57
62
  v-if="cartPricing"
58
63
  ref="paymentCart"
59
64
  :amount="cartPricing.totalPrice"
60
- :payment-data="order.shippingAddress">
61
- </payment-cart>
65
+ :payment-data="order.shippingAddress"
66
+ @inited="initedCard">
67
+ </payment-card>
62
68
  <progress-steps-controls
63
69
  class="OrderPaymentInformation__controls"
64
70
  :disabled-prev="creating"
@@ -75,7 +81,7 @@
75
81
  import { mapGetters, mapMutations, mapActions } from 'vuex';
76
82
  import { generateOrderData } from '@lancom/shared/assets/js/utils/order';
77
83
  import gtm from '@lancom/shared/assets/js/utils/gtm';
78
- import PaymentCart from '@lancom/shared/components/common/payment/payment_card/pinpayment/pinpayment';
84
+ import PaymentCard from '@lancom/shared/components/common/payment/payment_card/payment-card';
79
85
  import ProgressStepsControls from '@lancom/shared/components/common/progress_steps/progress_steps_controls/progress-steps-controls';
80
86
  import { ORDER_PAYMENT_METHOD } from '@lancom/shared/assets/js/constants/order';
81
87
  import payment from '@lancom/shared/mixins/payment';
@@ -86,7 +92,7 @@ export default {
86
92
  name: 'OrderPaymentInformation',
87
93
  components: {
88
94
  ProgressStepsControls,
89
- PaymentCart,
95
+ PaymentCard,
90
96
  CheckedIcon
91
97
  },
92
98
  mixins: [payment, confirm],
@@ -99,6 +105,7 @@ export default {
99
105
  data() {
100
106
  return {
101
107
  creating: false,
108
+ loadingCard: true,
102
109
  isDepositPayment: this.order.paymentMethod === ORDER_PAYMENT_METHOD.DEPOSIT
103
110
  };
104
111
  },
@@ -116,6 +123,9 @@ export default {
116
123
  methods: {
117
124
  ...mapActions('order', ['createOrder', 'saveOrder']),
118
125
  ...mapMutations('order', ['setCard']),
126
+ initedCard() {
127
+ this.loadingCard = false;
128
+ },
119
129
  updatePaymentType(isDeposit) {
120
130
  this.isDepositPayment = isDeposit;
121
131
  this.errorMessage = null;
@@ -80,6 +80,7 @@ export default {
80
80
  };
81
81
  },
82
82
  computed: {
83
+ ...mapGetters('country'),
83
84
  ...mapGetters('cart', ['isEmpty']),
84
85
  ...mapGetters('order', ['orderData']),
85
86
  ...mapGetters('auth', ['isAuthenticated', 'user']),
@@ -98,7 +99,7 @@ export default {
98
99
  company: null,
99
100
  additionalInfo: null,
100
101
  suburb: null,
101
- country: null,
102
+ country: this.country?.name,
102
103
  state: null,
103
104
  postcode: null
104
105
  };
@@ -31,6 +31,12 @@
31
31
  color: $brand_color_1;
32
32
  font-size: 25px;
33
33
  }
34
+ span img {
35
+ height: 25px;
36
+ position: relative;
37
+ top: 3px;
38
+ left: 2px;
39
+ }
34
40
  }
35
41
  &__divider {
36
42
  margin-top: 10px;
@@ -5,7 +5,12 @@
5
5
  @click="isOpen = !isOpen">
6
6
  <div class="lc_regular16 ClientSettings__value">
7
7
  <span v-if="country">
8
- <i class="icon-globe"></i>
8
+ <img
9
+ v-if="checkedCountry"
10
+ :src="checkedCountry.icon" />
11
+ <i
12
+ v-else
13
+ class="icon-globe"></i>
9
14
  </span>
10
15
  <!-- <span class="ClientSettings__value--divider"></span> -->
11
16
  <!-- <span v-if="currency">
@@ -97,6 +102,9 @@ export default {
97
102
  'countries',
98
103
  'currencies'
99
104
  ]),
105
+ checkedCountry() {
106
+ return this.country && this.countries.find(c => this.country._id === c._id);
107
+ }
100
108
  },
101
109
  mounted() {
102
110
  if (this.country) {
@@ -52,6 +52,7 @@ export default {
52
52
  domElement.setAttribute('src', 'https://js.stripe.com/v3/');
53
53
  domElement.onload = () => {
54
54
  this.loadedStripe = true;
55
+ this.$emit('inited');
55
56
  };
56
57
  domElement.onerror = () => {
57
58
  setTimeout(() => this.loadStripe(), 1000);
@@ -11,7 +11,7 @@
11
11
  {{
12
12
  !model.paid
13
13
  ? 'Our team will advise cost and the next steps. Please except a call or email from us after we review.'
14
- : 'The charge line will appear on your card as "Wholesale Apparel & Workwear"'
14
+ : (messages.PAYMENT_SUCCESS || 'The charge line will appear on your card as "Wholesale Apparel & Workwear"')
15
15
  }}
16
16
  </div>
17
17
  <slot name="back-btn">
@@ -24,8 +24,15 @@
24
24
  </template>
25
25
 
26
26
  <script>
27
+ import messages from '@/messages';
28
+
27
29
  export default {
28
30
  name: 'PaymentSuccess',
31
+ data() {
32
+ return {
33
+ messages
34
+ };
35
+ },
29
36
  props: {
30
37
  order: {
31
38
  type: Object,