@lancom/shared 0.0.280 → 0.0.281

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 (85) hide show
  1. package/assets/js/api/admin.js +3 -0
  2. package/assets/js/api/index.js +5 -2
  3. package/assets/js/models/print-area.js +5 -3
  4. package/assets/js/utils/colors.js +1 -1
  5. package/assets/js/utils/fabric-helper.js +1 -1
  6. package/assets/js/utils/filters.js +2 -2
  7. package/assets/scss/_common.scss +10 -0
  8. package/components/asides/contact_us/contact-us.vue +9 -2
  9. package/components/asides/menu/menu.vue +1 -25
  10. package/components/checkout/cart/cart.mixin.js +3 -3
  11. package/components/checkout/cart/cart.scss +8 -109
  12. package/components/checkout/cart/cart.vue +84 -46
  13. package/components/checkout/cart/cart_entity/cart_entity_color_simple_products/cart_entity_color_simple_product/cart-entity-color-simple-product.vue +7 -4
  14. package/components/checkout/cart/cart_price_info/cart-price-info.vue +4 -5
  15. package/components/checkout/cart/cart_pricing/cart-pricing.scss +34 -0
  16. package/components/checkout/cart/cart_pricing/cart-pricing.vue +112 -0
  17. package/components/checkout/cart/cart_shipments_pricing/cart-shipments-pricing.vue +2 -2
  18. package/components/checkout/order/address-form/address-form.scss +16 -0
  19. package/components/checkout/order/address-form/address-form.vue +199 -91
  20. package/components/checkout/order/order-billing-information/order-billing-information.scss +1 -1
  21. package/components/checkout/order/order-payment-information/order-payment-information.vue +15 -5
  22. package/components/checkout/order/order.vue +2 -1
  23. package/components/common/client_settings/client-settings.scss +6 -0
  24. package/components/common/client_settings/client-settings.vue +9 -1
  25. package/components/common/payment/payment_card/stripe/stripe.vue +1 -0
  26. package/components/common/payment/payment_success/payment-success.vue +8 -1
  27. package/components/common/postcode_select/postcode-select.vue +22 -12
  28. package/components/common/price.vue +1 -1
  29. package/components/common/pricing_table/pricing-table.vue +3 -2
  30. package/components/common/tabs.vue +17 -8
  31. package/components/editor/editor.scss +6 -0
  32. package/components/editor/editor.vue +22 -19
  33. package/components/editor/editor_layers/editor-layers.vue +3 -2
  34. package/components/editor/editor_print_area_options/editor-print-area-options.vue +2 -0
  35. package/components/editor/editor_product_details/editor-product-details.scss +8 -2
  36. package/components/editor/editor_product_details/editor-product-details.vue +22 -25
  37. package/components/editor/editor_wizard/editor-wizard.vue +2 -1
  38. package/components/editor/editor_workspace/editor-workspace.vue +3 -2
  39. package/components/modals/cart_modal/cart-modal.vue +1 -1
  40. package/components/modals/order_modal/order-modal.vue +6 -0
  41. package/components/modals/payment_modal/payment-modal.vue +4 -3
  42. package/components/order/order_payment/order-payment.vue +6 -6
  43. package/components/product/editor_pricing/editor-pricing.scss +75 -0
  44. package/components/product/editor_pricing/editor-pricing.vue +228 -0
  45. package/components/product/editor_pricing/editor_pricing_details/editor-pricing-details.scss +0 -0
  46. package/components/product/editor_pricing/editor_pricing_details/editor-pricing-details.vue +29 -0
  47. package/components/product/editor_pricing/editor_pricing_details/editor_pricing_details_prints/editor-pricing-details-prints.scss +41 -0
  48. package/components/product/editor_pricing/editor_pricing_details/editor_pricing_details_prints/editor-pricing-details-prints.vue +118 -0
  49. package/components/product/editor_pricing/editor_pricing_details/editor_pricing_details_products/editor-pricing-details-products.scss +41 -0
  50. package/components/product/editor_pricing/editor_pricing_details/editor_pricing_details_products/editor-pricing-details-products.vue +102 -0
  51. package/components/product/product.vue +1 -1
  52. package/components/product/product_colors_selector/product-colors-selector.scss +117 -0
  53. package/components/product/product_colors_selector/product-colors-selector.vue +188 -0
  54. package/components/product/product_multipacks_carousel/product-multipacks-carousel.vue +3 -1
  55. package/components/product/product_size_selector/product_size_selector_color/product_size_selector_color_cell/product-size-selector-color-cell.vue +4 -5
  56. package/components/product/products_size_selector_color/product_size_selector_color/product-size-selector-color.scss +58 -0
  57. package/components/product/products_size_selector_color/product_size_selector_color/product-size-selector-color.vue +128 -0
  58. package/components/product/products_size_selector_color/products-size-selector-color.scss +12 -0
  59. package/components/product/products_size_selector_color/products-size-selector-color.vue +43 -0
  60. package/components/product/wizard/wizard_print_layers/wizard_print_layer/wizard-print-layer.vue +2 -1
  61. package/components/product/wizard/wizard_print_size/wizard_print_area_print_size/wizard-print-area-print-size.vue +2 -1
  62. package/components/product/wizard/wizard_print_type/wizard_print_area_print_type/wizard-print-area-print-type.vue +2 -1
  63. package/components/products/product_list/product-list.scss +2 -2
  64. package/components/products/product_list_product/product-list-product.scss +7 -11
  65. package/components/products/product_list_product/product-list-product.vue +7 -15
  66. package/components/the_aside/the-aside.vue +1 -0
  67. package/feeds/google-shopping.js +4 -4
  68. package/layouts/error.vue +39 -0
  69. package/layouts/products.vue +386 -0
  70. package/mixins/payment.js +2 -1
  71. package/mixins/product-preview.js +1 -1
  72. package/mixins/product-view.js +313 -0
  73. package/nuxt.config.js +0 -5
  74. package/package.json +1 -1
  75. package/pages/checkout/cart.vue +40 -0
  76. package/pages/checkout/order.vue +72 -0
  77. package/pages/customer/create.vue +33 -0
  78. package/pages/customer/password/_token.vue +79 -0
  79. package/pages/customer/recovery.vue +33 -0
  80. package/pages/customer/settings.vue +33 -0
  81. package/pages/customer/signin.vue +33 -0
  82. package/routes/index.js +35 -0
  83. package/store/cart.js +11 -6
  84. package/store/order.js +2 -2
  85. package/store/product.js +0 -6
@@ -1,11 +1,11 @@
1
1
  <template>
2
- <div class="PostcodeSelect form-row">
2
+ <div class="PostcodeSelect">
3
3
  <validation-provider
4
4
  v-slot="{ errors }"
5
5
  tag="div"
6
6
  :rules="required ? 'required' : ''"
7
7
  name="Postcode"
8
- class="form-group form-row">
8
+ class="form-group">
9
9
  <label
10
10
  v-if="labelless"
11
11
  class="form-label"
@@ -88,7 +88,7 @@ export default {
88
88
  },
89
89
  filters: { highlight },
90
90
  props: {
91
- country: {
91
+ codeCountry: {
92
92
  type: Object
93
93
  },
94
94
  value: {
@@ -130,12 +130,10 @@ export default {
130
130
  computed: {
131
131
  model: {
132
132
  get() {
133
- return this.selected?.value ? this.selected : null;
133
+ return this.selected?._id ? this.selected : null;
134
134
  },
135
135
  set(option) {
136
- this.selected = option;
137
- this.$emit('input', option.value);
138
- this.$emit('select', this.suburbs.find(({ _id }) => _id === option._id));
136
+ this.updatePostcode(option);
139
137
  }
140
138
  }
141
139
  },
@@ -150,20 +148,32 @@ export default {
150
148
  async handleSearch(query) {
151
149
  if (query.length) {
152
150
  this.isLoading = true;
153
- const country = this.country ? (this.country.isoCode === 'GB' ? 'England' : (this.country.name || this.country)) : 'Australia';
154
- this.suburbs = await api.fetchSuburbs({ query, country });
151
+ const country = this.codeCountry || this.country;
152
+ const countryName = country ? (country.isoCode === 'GB' ? 'England' : (country.name || country)) : 'Australia';
153
+ this.suburbs = await api.fetchSuburbs({ query, country: countryName });
155
154
  this.options = this.suburbs.map(this.createOptionFromSuburb);
156
155
  this.isLoading = false;
157
156
  } else {
158
157
  this.options = [];
159
158
  }
160
159
  },
161
- createOptionFromSuburb({ locality, state, postcode, city, _id }) {
160
+ createOptionFromSuburb({ locality, state, postcode, city, _id, address, id }) {
162
161
  return {
163
- label: [locality || city, state, postcode].filter(i => !!i).join(', '),
162
+ label: address || [locality || city, state, postcode].filter(i => !!i).join(', '),
164
163
  value: postcode,
165
- _id: _id
164
+ _id: id || _id
166
165
  };
166
+ },
167
+ async updatePostcode(option) {
168
+ this.selected = option;
169
+ if (!option.value) {
170
+ const suburb = await api.fetchAddressInfo(option._id);
171
+ this.$emit('input', suburb.postcode);
172
+ this.$emit('select', suburb);
173
+ } else {
174
+ this.$emit('input', option.value);
175
+ this.$emit('select', this.suburbs.find(({ _id }) => _id === option._id));
176
+ }
167
177
  }
168
178
  }
169
179
  };
@@ -19,7 +19,7 @@ export default {
19
19
  }
20
20
  },
21
21
  computed: {
22
- ...mapGetters(['pricingSettings'])
22
+ ...mapGetters(['pricingSettings', 'currency'])
23
23
  }
24
24
  };
25
25
  </script>
@@ -71,7 +71,8 @@ export default {
71
71
  },
72
72
  computed: {
73
73
  ...mapGetters([
74
- 'pricingSettings'
74
+ 'pricingSettings',
75
+ 'currency'
75
76
  ]),
76
77
  thList() {
77
78
  return this.items.map(item => get(item, this.nameAttr));
@@ -138,7 +139,7 @@ export default {
138
139
  const printType = this.items.find(item => printTypeName === get(item, this.nameAttr));
139
140
  const pricing = get(printType, this.pricingAttr);
140
141
  const item = pricing.find(({ min, max }) => (!min || range.min >= min) && (!max || range.min <= max));
141
- return item ? (this.withGst ? priceWithTax(item.price, this.pricingSettings) : price(item.price)) : '-';
142
+ return item ? (this.withGst ? priceWithTax(item.price, this.pricingSettings, this.currency) : price(item.price, this.currency)) : '-';
142
143
  }
143
144
  }
144
145
  };
@@ -10,7 +10,7 @@
10
10
  shadow: btnsShadow
11
11
  }"
12
12
  @click="select(tab)">
13
- <div class="lc_medium18 tab-label">
13
+ <div class="lc_medium16 tab-label">
14
14
  <i
15
15
  v-if="tab.icon"
16
16
  :class="[tab.icon, 'tab-icon']">
@@ -19,7 +19,7 @@
19
19
  </div>
20
20
  <div
21
21
  v-if="tab.description"
22
- class="lc_regular12 lc_grey1 mt-5">
22
+ class="tab-description lc_regular12 lc_grey1 mt-5">
23
23
  {{ tab.description }}
24
24
  </div>
25
25
  </div>
@@ -98,7 +98,7 @@ export default {
98
98
  @import "@/assets/scss/variables";
99
99
 
100
100
  .tab {
101
- flex-grow: .2;
101
+ flex-basis: 100%;
102
102
  display: flex;
103
103
  align-items: center;
104
104
  border-radius: 2px;
@@ -124,10 +124,10 @@ export default {
124
124
  transition: background-color .22s ease-in-out;
125
125
  }
126
126
  &s--large & {
127
- height: 80px;
127
+ height: 85px;
128
128
  flex-direction: column;
129
129
  padding: 10px;
130
- min-width: 190px;
130
+ min-width: 130px;
131
131
  white-space: normal;
132
132
  }
133
133
  &s--primary & {
@@ -153,9 +153,6 @@ export default {
153
153
  padding: 0 12px;
154
154
  position: relative;
155
155
  }
156
- &-icon {
157
- font-size: 26px;
158
- }
159
156
  &s--large &-label,
160
157
  &s--primary &-label,
161
158
  &s--secondary &-label {
@@ -180,6 +177,18 @@ export default {
180
177
  &.shadow {
181
178
  box-shadow: 1px 1px 2px rgb(214, 214, 214);
182
179
  }
180
+ @media (max-width: $bp-medium-max) {
181
+ .tab-label {
182
+ font-size: 14px !important;
183
+ line-height: 20px !important;
184
+ }
185
+ .tab-icon {
186
+ font-size: 14px !important;
187
+ }
188
+ .tab-description {
189
+ font-size: 11px !important;
190
+ }
191
+ }
183
192
  }
184
193
  .fullWidth .tab {
185
194
  flex-grow: 1;
@@ -6,6 +6,12 @@
6
6
  justify-content: flex-start;
7
7
  padding: 12px 0;
8
8
  }
9
+ &__workspace {
10
+ @media (min-width: $bp-medium-min) {
11
+ position: sticky;
12
+ top: calc(#{$navbar_height} + 50px);
13
+ }
14
+ }
9
15
  &__content {
10
16
  margin-top: -12px;
11
17
  }
@@ -4,7 +4,7 @@
4
4
  <breakpoint
5
5
  name="md"
6
6
  mode="up">
7
- <div class="col-md-5 col-12 Editor__col">
7
+ <div class="col-md-6 col-12 Editor__col">
8
8
  <tabs
9
9
  :tabs="tabs"
10
10
  :selected="selectedTab"
@@ -55,8 +55,10 @@
55
55
  </div>
56
56
  </div>
57
57
  </breakpoint>
58
- <div class="col-md-7 col-12 Editor__col">
59
- <editor-workspace />
58
+ <div class="col-md-6 col-12 Editor__col">
59
+ <client-only>
60
+ <editor-workspace class="Editor__workspace" />
61
+ </client-only>
60
62
  </div>
61
63
  </div>
62
64
  <breakpoint
@@ -190,7 +192,7 @@ export default {
190
192
  this.setEditModeSelectedLayer(false);
191
193
  },
192
194
  async showResetAllConfirm() {
193
- const message = 'Are you sure? Confirmation will delete all layers, quantities and set a T-shirt to white one';
195
+ const message = 'This will reset the current design. Are you sure?';
194
196
  const reset = await this.showConfirmationModal(message);
195
197
 
196
198
  if (reset) {
@@ -198,22 +200,23 @@ export default {
198
200
  this.resetLayers();
199
201
  }
200
202
  },
201
- proceedToCard() {
203
+ async proceedToCard() {
202
204
  const entities = generateCartProducts(this.product, this.template.simpleProducts, this.template.layers, this.isPrintPricing, this.layerThumbnails);
203
- this.addToCart({ entities, shop: this.shop, pricing: this.productPricing, country: this.country, currency: this.currency });
204
- this.showCartModal(async () => {
205
- const message = 'Do you wish to continue with editing the current design or reset the editor?';
206
- const reset = await this.showConfirmationModal(message, {
207
- cancelLabel: 'Keep design',
208
- submitLabel: 'Reset editor'
209
- });
210
- if (reset) {
211
- this.clearTemplate();
212
- this.resetLayers();
213
- } else {
214
- this.clearTemplate(true);
215
- }
216
- });
205
+ await this.addToCart({ entities, shop: this.shop, pricing: this.productPricing, country: this.country, currency: this.currency });
206
+ this.$router.push('/checkout/cart');
207
+ // this.showCartModal(async () => {
208
+ // const message = 'Do you wish to continue with editing the current design or reset the editor?';
209
+ // const reset = await this.showConfirmationModal(message, {
210
+ // cancelLabel: 'Keep design',
211
+ // submitLabel: 'Reset editor'
212
+ // });
213
+ // if (reset) {
214
+ // this.clearTemplate();
215
+ // this.resetLayers();
216
+ // } else {
217
+ // this.clearTemplate(true);
218
+ // }
219
+ // });
217
220
  },
218
221
  goToDesignAndClosePopover() {
219
222
  this.selectTab('design');
@@ -53,13 +53,14 @@
53
53
  </transition>
54
54
  <editor-pricing
55
55
  v-if="hasPricing"
56
- class="EditorLayers__pricing" />
56
+ class="EditorLayers__pricing"
57
+ :has-cart-btn="false" />
57
58
  </div>
58
59
  </template>
59
60
 
60
61
  <script>
61
62
  import { createNamespacedHelpers } from 'vuex';
62
- import EditorPricing from '@lancom/shared/components/editor/editor_pricing/editor-pricing';
63
+ import EditorPricing from '@lancom/shared/components/product/editor_pricing/editor-pricing';
63
64
  import { cloneLayerModel } from '@lancom/shared/assets/js/models/product-layers';
64
65
  import EditorLayerForms from './editor_layer_forms';
65
66
  import EditorLayersLayer from './editor_layers_layer/editor-layers-layer';
@@ -70,6 +70,8 @@ export default {
70
70
  const productsOptions = this.getProductOptions();
71
71
  const options = productsOptions.filter(({ sides }) => sides.includes(this.side));
72
72
  this.options = this.allowNoPrint ? [...options, { label: 'No Print' }] : options;
73
+
74
+ this.select(this.options[0]);
73
75
  },
74
76
  select(option) {
75
77
  this.$emit('select', option);
@@ -6,14 +6,20 @@
6
6
  &__header {
7
7
  display: flex;
8
8
  align-items: center;
9
+ margin-top: 5px;
10
+ &-logo {
11
+ img {
12
+ max-width: 75px;
13
+ max-height: 55px;
14
+ }
15
+ }
9
16
  &-info {
10
- margin-left: 19px;
17
+ margin-left: 10px;
11
18
  flex-grow: 1;
12
19
  }
13
20
  &-row {
14
21
  display: flex;
15
22
  align-items: center;
16
- justify-content: space-between;
17
23
  & + & {
18
24
  margin-top: 5px;
19
25
  }
@@ -1,14 +1,16 @@
1
1
  <template>
2
2
  <div class="EditorProductDetails__wrapper">
3
+ <h3 class="lc_h3 lc_black">
4
+ {{ product.name }}
5
+ </h3>
3
6
  <div class="EditorProductDetails__header">
4
- <div class="EditorProductDetails__header-logo">
7
+ <div
8
+ v-if="product.brand.logo"
9
+ class="EditorProductDetails__header-logo">
5
10
  <img :src="product.brand.logo | staticLink" />
6
11
  </div>
7
12
  <div class="EditorProductDetails__header-info">
8
13
  <div class="EditorProductDetails__header-row">
9
- <h3 class="lc_h3 lc_black">
10
- {{ product.name }}
11
- </h3>
12
14
  <span
13
15
  v-if="defaultSimpleProduct && defaultSimpleProduct.pricing[0]"
14
16
  class="lc_regular16 lc_grey1">
@@ -27,18 +29,7 @@
27
29
  </template>
28
30
  </v-popover>
29
31
  </span>
30
- </div>
31
- <div class="EditorProductDetails__header-row">
32
- <span class="EditorProductDetails__product-link">
33
- SKU:
34
- <a
35
- :href="productLink"
36
- target="_blank">
37
- {{ product.SKU }}
38
- <i class="icon-blank"></i>
39
- </a>
40
- </span>
41
- <span class="lc_regular16 lc_grey1">
32
+ <span class="lc_regular16 lc_grey1 ml-6">
42
33
  +
43
34
  <v-popover
44
35
  ref="popover"
@@ -59,6 +50,17 @@
59
50
  </v-popover>
60
51
  </span>
61
52
  </div>
53
+ <div class="EditorProductDetails__header-row">
54
+ <span class="EditorProductDetails__product-link">
55
+ SKU:
56
+ <a
57
+ :href="productLink"
58
+ target="_blank">
59
+ {{ product.SKU }}
60
+ <i class="icon-blank"></i>
61
+ </a>
62
+ </span>
63
+ </div>
62
64
  </div>
63
65
  </div>
64
66
  <div
@@ -69,13 +71,10 @@
69
71
  <fragment
70
72
  v-if="productDetailsLoaded && productAvailableInCurrentCountry">
71
73
  <div class="EditorProductDetails__section">
72
- <product-colors-selector />
73
- </div>
74
- <div class="EditorProductDetails__section">
75
- <editor-pricing />
74
+ <product-colors-selector :has-another-print-btn="false" />
76
75
  </div>
77
76
  <div class="EditorProductDetails__section">
78
- <product-size-selector />
77
+ <editor-pricing :has-cart-btn="false" />
79
78
  </div>
80
79
  </fragment>
81
80
  </div>
@@ -83,9 +82,8 @@
83
82
 
84
83
  <script>
85
84
  import { mapGetters } from 'vuex';
86
- import ProductColorsSelector from '@lancom/shared/components/product/layouts/product_colors_selector/product-colors-selector';
87
- import ProductSizeSelector from '@lancom/shared/components/product/product_size_selector/product-size-selector';
88
- import EditorPricing from '@lancom/shared/components/editor/editor_pricing/editor-pricing';
85
+ import ProductColorsSelector from '@lancom/shared/components/product/product_colors_selector/product-colors-selector';
86
+ import EditorPricing from '@lancom/shared/components/product/editor_pricing/editor-pricing';
89
87
  import PricingDiscountsTable from '@lancom/shared/components/common/pricing_discounts_table/pricing-discounts-table';
90
88
  import modals from '@lancom/shared/mixins/modals';
91
89
  import { staticLink, priceWithTax } from '@lancom/shared/assets/js/utils/filters';
@@ -96,7 +94,6 @@ export default {
96
94
  name: 'EditorProductDetails',
97
95
  components: {
98
96
  ProductColorsSelector,
99
- ProductSizeSelector,
100
97
  PricingDiscountsTable,
101
98
  EditorPricing,
102
99
  PricingTable
@@ -17,13 +17,14 @@
17
17
  </div>
18
18
  <editor-pricing
19
19
  v-if="hasPricing"
20
+ :has-cart-btn="false"
20
21
  class="EditorWizard__pricing" />
21
22
  </div>
22
23
  </template>
23
24
 
24
25
  <script>
25
26
  import { mapGetters, mapMutations } from 'vuex';
26
- import EditorPricing from '@lancom/shared/components/editor/editor_pricing/editor-pricing';
27
+ import EditorPricing from '@lancom/shared/components/product/editor_pricing/editor-pricing';
27
28
  import Wizard from '@lancom/shared/components/product/wizard/wizard';
28
29
 
29
30
  export default {
@@ -90,6 +90,7 @@
90
90
  }">
91
91
  <editor-print-area-options
92
92
  v-if="productDetailsLoaded"
93
+ ref="areaOptions"
93
94
  :product="product"
94
95
  :selected="selectedPrintArea._id"
95
96
  :side="editableSide.id"
@@ -109,7 +110,7 @@
109
110
  <script>
110
111
  import { createNamespacedHelpers } from 'vuex';
111
112
  import EditorPrintAreaOptions from '@lancom/shared/components/editor/editor_print_area_options/editor-print-area-options';
112
- import EditorPricing from '@lancom/shared/components/editor/editor_pricing/editor-pricing';
113
+ import EditorPricing from '@lancom/shared/components/product/editor_pricing/editor-pricing';
113
114
  import Tabs from '@lancom/shared/components/common/tabs';
114
115
  import EditorWorkspaceSide from './editor_workspace_side/editor-workspace-side';
115
116
 
@@ -156,7 +157,7 @@ export default {
156
157
  'setEditablePrintArea'
157
158
  ]),
158
159
  selectTab(value) {
159
- this.setEditableSide({ id: value }); // todo improve later by adding real sides
160
+ this.setEditableSide({ id: value });
160
161
  },
161
162
  toggleSide() {
162
163
  this.setEditableSide({
@@ -31,7 +31,7 @@
31
31
 
32
32
  <script>
33
33
  import { mapGetters } from 'vuex';
34
- import Cart from '@/components/checkout/cart/cart';
34
+ import Cart from '@lancom/shared/components/checkout/cart/cart';
35
35
 
36
36
  export default {
37
37
  name: 'CartModal',
@@ -335,6 +335,12 @@ export default {
335
335
  this.$set(this.form, 'postcode', suburb.postcode);
336
336
  this.$set(this.form, 'city', suburb.locality);
337
337
  this.$set(this.form, 'country', suburb.country);
338
+ if (suburb.addressLine1) {
339
+ this.$set(this.address, 'addressLine1', suburb.addressLine1);
340
+ }
341
+ if (suburb.addressLine2) {
342
+ this.$set(this.address, 'addressLine2', suburb.addressLine2);
343
+ }
338
344
  }
339
345
  },
340
346
  handleSuburbChange(suburb) {
@@ -104,7 +104,7 @@ export default {
104
104
  data() {
105
105
  return {
106
106
  processing: false,
107
- loadingCard: false,
107
+ loadingCard: true,
108
108
  form: {},
109
109
  fields: null,
110
110
  agreeTermsAndCondition: false,
@@ -113,7 +113,7 @@ export default {
113
113
  };
114
114
  },
115
115
  computed: {
116
- ...mapGetters(['shop', 'country', 'payment']),
116
+ ...mapGetters(['shop', 'country', 'payment', 'currency']),
117
117
  ...mapGetters('order', ['orderData']),
118
118
  isVisibleChargeMessage() {
119
119
  return this.isSuccessOrderCharge || this.isFailedOrderCharge;
@@ -152,7 +152,7 @@ export default {
152
152
  ...mapMutations('product', ['clearTemplate']),
153
153
  ...mapMutations('layers', ['resetLayers']),
154
154
  initedCard() {
155
- this.loadingCard = true;
155
+ this.loadingCard = false;
156
156
  },
157
157
  handleErrors(err) {
158
158
  // err.messages.forEach(({ message }) => this.$toastr.e(message));
@@ -165,6 +165,7 @@ export default {
165
165
  card,
166
166
  shop: this.shop._id,
167
167
  country: this.country?._id,
168
+ currency: this.currency?.isoCode,
168
169
  payment: this.payment,
169
170
  recaptchaToken: await this.getRecaptcha('order_payment')
170
171
  };
@@ -24,12 +24,12 @@
24
24
  </div>
25
25
  <div class="OrderPrice__content">
26
26
  <div>
27
- <payment-cart
27
+ <payment-card
28
28
  ref="paymentCart"
29
29
  :amount="model.totalGST"
30
30
  :has-spinner="false"
31
31
  :payment-data="order.shippingAddress">
32
- </payment-cart>
32
+ </payment-card>
33
33
  <div
34
34
  v-if="errorMessage"
35
35
  class="OrderPayment__error">
@@ -51,13 +51,13 @@
51
51
  <script>
52
52
  import { mapGetters } from 'vuex';
53
53
  import api from '@lancom/shared/assets/js/api';
54
- import PaymentCart from '@lancom/shared/components/common/payment/payment_card/pinpayment/pinpayment';
54
+ import PaymentCard from '@lancom/shared/components/common/payment/payment_card/payment-card';
55
55
  import PaymentSuccess from '@lancom/shared/components/common/payment/payment_success/payment-success';
56
56
 
57
57
  export default {
58
58
  name: 'OrderPayment',
59
59
  components: {
60
- PaymentCart,
60
+ PaymentCard,
61
61
  PaymentSuccess
62
62
  },
63
63
  props: {
@@ -77,7 +77,7 @@ export default {
77
77
  };
78
78
  },
79
79
  computed: {
80
- ...mapGetters(['shop', 'country', 'payment']),
80
+ ...mapGetters(['shop', 'country', 'currency', 'payment']),
81
81
  model() {
82
82
  return this.invoice || this.order;
83
83
  }
@@ -96,7 +96,7 @@ export default {
96
96
  if (card) {
97
97
  const { _id: invoice } = this.invoice || {};
98
98
  const recaptchaToken = await this.getRecaptcha('order_payment');
99
- const payload = { invoice, card, shop: this.shop._id, country: this.country?._id, payment: this.payment, recaptchaToken };
99
+ const payload = { invoice, card, shop: this.shop._id, country: this.country?._id, payment: this.payment, currency: this.currency?.isoCode, recaptchaToken };
100
100
  const { paid } = await api.createOrderPayment(this.order._id, payload);
101
101
  this.model.paid = paid;
102
102
  }
@@ -0,0 +1,75 @@
1
+ @import "@/assets/scss/variables";
2
+ .EditorPricing {
3
+ &__main {
4
+ &-alert {
5
+ display: flex;
6
+ align-items: center;
7
+ justify-content: center;
8
+ height: 50px;
9
+ font-weight: 600;
10
+ font-size: 20px;
11
+ line-height: 27px;
12
+ background-color: $gray;
13
+ color: $gray_main;
14
+ @media (max-width: $bp-extra-small-max) {
15
+ height: 63px;
16
+ padding: 15px;
17
+ font-size: 16px;
18
+ }
19
+ img {
20
+ margin-right: 10px;
21
+ }
22
+ }
23
+ }
24
+ &__footer {
25
+ background: $green;
26
+ height: 76px;
27
+ padding: 0 14px;
28
+ display: flex;
29
+ align-items: center;
30
+ justify-content: space-between;
31
+ @media (max-width: $bp-extra-small-max) {
32
+ flex-wrap: wrap;
33
+ justify-content: center;
34
+ height: auto;
35
+ min-height: 110px;
36
+ }
37
+
38
+ &-section {
39
+ display: flex;
40
+ align-items: center;
41
+ }
42
+ }
43
+ &__total {
44
+ margin-left: 38px;
45
+ font-weight: 500;
46
+ font-size: 22px;
47
+ line-height: 30px;
48
+ text-transform: uppercase;
49
+ color: $black;
50
+ span {
51
+ font-weight: bold;
52
+ }
53
+ }
54
+ &__toggle-details {
55
+ font-weight: 800;
56
+ font-size: 16px;
57
+ line-height: 22px;
58
+ text-decoration: underline;
59
+ text-transform: uppercase;
60
+ cursor: pointer;
61
+ @media (max-width: $bp-extra-small-max) {
62
+ text-align: center;
63
+ }
64
+ }
65
+ &__add-to-cart-button {
66
+ margin-left: 30px;
67
+ }
68
+ }
69
+ ::v-deep .btn-green {
70
+ background-color: white;
71
+ color: $black;
72
+ &.disabled {
73
+ background-color: $gray;
74
+ }
75
+ }