@lancom/shared 0.0.266 → 0.0.267

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 (52) hide show
  1. package/assets/js/api/admin.js +11 -11
  2. package/assets/js/constants/country.js +1 -1
  3. package/assets/scss/ui_kit/_forms.scss +2 -2
  4. package/assets/scss/ui_kit/_tooltip.scss +1 -3
  5. package/assets/scss/variables/_theme.scss +3 -3
  6. package/components/checkout/cart/cart.mixin.js +5 -5
  7. package/components/checkout/cart/cart_price_info/cart-price-info.vue +2 -2
  8. package/components/checkout/cart/cart_shipments_pricing/cart-shipments-pricing.vue +2 -2
  9. package/components/checkout/order/address-form/address-form.vue +3 -4
  10. package/components/checkout/order/order-shipping-method/order-shipping-method.vue +2 -2
  11. package/components/checkout/order/order.vue +1 -1
  12. package/components/common/file_uploader.vue +1 -0
  13. package/components/common/payment/payment_card/pinpayment/pinpayment.vue +5 -34
  14. package/components/common/postcode_select/postcode-select.vue +1 -5
  15. package/components/common/products_total_pricing/products-total-pricing.vue +1 -5
  16. package/components/design/approve_design_header/approve-design-header.vue +1 -1
  17. package/components/editor/editor.vue +2 -8
  18. package/components/editor/editor_pricing/editor-pricing.vue +2 -2
  19. package/components/editor/editor_pricing/editor_pricing_details/editor_pricing_details_prints/editor-pricing-details-prints.vue +7 -8
  20. package/components/editor/editor_pricing/editor_pricing_details/editor_pricing_details_products/editor-pricing-details-products.vue +4 -12
  21. package/components/editor/editor_product_details/editor-product-details.scss +0 -6
  22. package/components/editor/editor_product_details/editor-product-details.vue +2 -12
  23. package/components/faq/faq.vue +2 -2
  24. package/components/modals/order_modal/order-modal.vue +3 -17
  25. package/components/order/order_price/order-price.vue +3 -5
  26. package/components/order/order_prints_groups/order-prints-groups.vue +1 -3
  27. package/components/order/order_products_groups/order-products-groups.vue +1 -3
  28. package/components/order/order_refund_view/order-refund-view.vue +3 -5
  29. package/components/order/order_setup_groups/order-setup-groups.vue +2 -4
  30. package/components/order/order_sku_groups/order-sku-groups.vue +1 -3
  31. package/components/order/order_view/order-view.vue +6 -10
  32. package/components/pricing/pricing_digital_printing/pricing-digital-printing.vue +1 -3
  33. package/components/pricing/pricing_example/pricing-example.vue +3 -3
  34. package/components/pricing/pricing_how_we_calculate/pricing-how-we-calculate.vue +2 -7
  35. package/components/pricing/pricing_products_calculator/pricing_product_calculator/pricing-product-calculator.vue +2 -2
  36. package/components/pricing/pricing_screen_printing/pricing-screen-printing.vue +1 -3
  37. package/components/product/product_multipacks_carousel/product-multipacks-carousel.scss +29 -19
  38. package/components/product/product_multipacks_carousel/product-multipacks-carousel.vue +42 -3
  39. package/components/product/product_multipacks_carousel/product_multipack/product-multipack.scss +14 -14
  40. package/components/product/product_multipacks_carousel/product_multipack/product-multipack.vue +13 -18
  41. package/components/product/product_price_range/product-price-range.vue +5 -6
  42. package/components/product/product_prints_price_info/product-prints-price-info.vue +2 -2
  43. package/components/products/products_autocomplete/products-autocomplete.scss +12 -10
  44. package/components/quotes/quote_request/quote-request.vue +1 -1
  45. package/components/quotes/quote_view/quote_option_view/quote-option-view.vue +4 -5
  46. package/feeds/google-shopping.js +2 -2
  47. package/mixins/meta-info.js +1 -4
  48. package/mixins/products-price.js +2 -3
  49. package/package.json +1 -1
  50. package/store/cart.js +6 -7
  51. package/store/index.js +5 -16
  52. package/store/product.js +9 -3
@@ -51,7 +51,7 @@
51
51
  <td>{{ total.price | price(currency) }}</td>
52
52
  </tr>
53
53
  <tr v-if="totalsWithGst">
54
- <td>Total inc. {{ taxName }}</td>
54
+ <td>Total inc. GST</td>
55
55
  <td colspan="3"></td>
56
56
  <td>{{ total.amount }}</td>
57
57
  <td></td>
@@ -65,7 +65,6 @@
65
65
  </template>
66
66
 
67
67
  <script>
68
- import { mapGetters } from 'vuex';
69
68
  import ProductSideWithPrint from '@lancom/shared/components/common/product_side_with_print/product-side-with-print';
70
69
  import { COLORS_IMAGES_TYPES } from '@lancom/shared/assets/js/constants/colors';
71
70
  import { groupProductsByPrints } from '@lancom/shared/assets/js/utils/products-grouping';
@@ -95,7 +94,6 @@ export default {
95
94
  }
96
95
  },
97
96
  computed: {
98
- ...mapGetters(['taxName']),
99
97
  printsGroups() {
100
98
  return groupProductsByPrints(this.order.products, this.order.price.products);
101
99
  },
@@ -40,7 +40,7 @@
40
40
  <td>{{ total.price | price(currency) }}</td>
41
41
  </tr>
42
42
  <tr v-if="totalsWithGst">
43
- <td>Total inc. {{ taxName }}</td>
43
+ <td>Total inc. GST</td>
44
44
  <td colspan="3"></td>
45
45
  <td>{{ total.amount }}</td>
46
46
  <td>{{ total.prints.amount }}</td>
@@ -59,7 +59,6 @@
59
59
  </template>
60
60
 
61
61
  <script>
62
- import { mapGetters } from 'vuex';
63
62
  import { print, price } from '@lancom/shared/assets/js/utils/filters';
64
63
  import { groupProductsByDesign } from '@lancom/shared/assets/js/utils/products-grouping';
65
64
  import OrderProductsGroup from './order_products_group/order-products-group';
@@ -92,7 +91,6 @@ export default {
92
91
  }
93
92
  },
94
93
  computed: {
95
- ...mapGetters(['taxName']),
96
94
  productsGroups() {
97
95
  return groupProductsByDesign(this.order.products, this.order.price.products);
98
96
  },
@@ -88,13 +88,13 @@
88
88
  'OrderRefundView__totals--paid': isPaid
89
89
  }">
90
90
  <div class="lc_regular16">
91
- Total ex {{ taxName }}: <b>{{ refund.total | price(currency) }}</b>
91
+ Total ex GST: <b>{{ refund.total | price(currency) }}</b>
92
92
  </div>
93
93
  <div class="lc_regular16">
94
- {{ taxName }}: <b>{{ refund.totalGST - refund.total | price(currency) }}</b>
94
+ GST: <b>{{ refund.totalGST - refund.total | price(currency) }}</b>
95
95
  </div>
96
96
  <div class="lc_regular16">
97
- Total inc {{ taxName }}: <b>{{ refund.totalGST | price(currency) }}</b>
97
+ Total inc GST: <b>{{ refund.totalGST | price(currency) }}</b>
98
98
  </div>
99
99
  </div>
100
100
  </div>
@@ -103,7 +103,6 @@
103
103
  </template>
104
104
 
105
105
  <script>
106
- import { mapGetters } from 'vuex';
107
106
  import OrderViewMixin from './../order_view/order-view.mixin';
108
107
  import OrderViewProduct from './../order_view/order_view_product/order-view-product';
109
108
 
@@ -124,7 +123,6 @@ export default {
124
123
  }
125
124
  },
126
125
  computed: {
127
- ...mapGetters(['taxName']),
128
126
  isPaid() {
129
127
  return this.refund.status === 'refunded';
130
128
  },
@@ -12,8 +12,8 @@
12
12
  <th>SKU</th>
13
13
  <th>Quantity</th>
14
14
  <th>Price</th>
15
- <th>{{ taxName }}</th>
16
- <th>Total Inc. {{ taxName }}</th>
15
+ <th>GST</th>
16
+ <th>Total Inc. GST</th>
17
17
  </tr>
18
18
  </thead>
19
19
  <tbody class="centered">
@@ -46,7 +46,6 @@
46
46
  </template>
47
47
 
48
48
  <script>
49
- import { mapGetters } from 'vuex';
50
49
  import { COLORS_IMAGES_TYPES } from '@lancom/shared/assets/js/constants/colors';
51
50
  import { groupProductsByPrints } from '@lancom/shared/assets/js/utils/products-grouping';
52
51
  import { price, print } from '@lancom/shared/assets/js/utils/filters';
@@ -68,7 +67,6 @@ export default {
68
67
  }
69
68
  },
70
69
  computed: {
71
- ...mapGetters(['taxName']),
72
70
  printsGroups() {
73
71
  return groupProductsByPrints(this.order.products, this.order.price.products);
74
72
  },
@@ -49,7 +49,7 @@
49
49
  </td>
50
50
  </tr>
51
51
  <tr v-if="totalsWithGst">
52
- <td> Total inc. {{ taxName }}</td>
52
+ <td> Total inc. GST</td>
53
53
  <td colspan="3"></td>
54
54
  <td>{{ total.amount }}</td>
55
55
  <td></td>
@@ -68,7 +68,6 @@
68
68
  </template>
69
69
 
70
70
  <script>
71
- import { mapGetters } from 'vuex';
72
71
  import { groupProductsBySKU } from '@lancom/shared/assets/js/utils/products-grouping';
73
72
  import { price } from '@lancom/shared/assets/js/utils/filters';
74
73
  import { copyToClipboard } from '@lancom/shared/assets/js/utils/copy-to-clipboard';
@@ -97,7 +96,6 @@ export default {
97
96
  }
98
97
  },
99
98
  computed: {
100
- ...mapGetters(['taxName']),
101
99
  featureGroups() {
102
100
  return groupProductsBySKU(this.order.products, this.order.price.products);
103
101
  },
@@ -127,10 +127,10 @@
127
127
  Shipping Total: <b>{{ model.shippingTotal | price(order.currency) }}</b>
128
128
  </div>
129
129
  <div class="lc_regular16">
130
- Total ex {{ taxName }}: <b>{{ (model.total + couponTotal) | price(order.currency) }}</b>
130
+ Total ex GST: <b>{{ (model.total + couponTotal) | price(order.currency) }}</b>
131
131
  </div>
132
132
  <div class="lc_regular16">
133
- {{ taxName }}: <b>{{ model.totalGST - model.total | price(order.currency) }}</b>
133
+ GST: <b>{{ model.totalGST - model.total | price(order.currency) }}</b>
134
134
  </div>
135
135
  <div
136
136
  v-if="!invoice && order.couponCode"
@@ -138,7 +138,7 @@
138
138
  Coupon: <b>{{ couponTotal | price(order.currency) }}</b>
139
139
  </div>
140
140
  <div class="lc_regular16">
141
- Total inc {{ taxName }}: <b>{{ model.totalGST | price(order.currency) }}</b>
141
+ Total inc GST: <b>{{ model.totalGST | price(order.currency) }}</b>
142
142
  </div>
143
143
  <div class="lc_regular16">
144
144
  {{ isPaid ? 'Paid' : 'Pending Payment' }}: <b>{{ model.totalGST | price(order.currency) }}</b>
@@ -175,10 +175,10 @@
175
175
  Shipping Total: <b>{{ model.shippingTotal | price(order.currency) }}</b>
176
176
  </div>
177
177
  <div class="lc_regular16">
178
- Total ex {{ taxName }}: <b>{{ (model.total + couponTotal) | price(order.currency) }}</b>
178
+ Total ex GST: <b>{{ (model.total + couponTotal) | price(order.currency) }}</b>
179
179
  </div>
180
180
  <div class="lc_regular16">
181
- {{ taxName }}: <b>{{ model.totalGST - model.total | price(order.currency) }}</b>
181
+ GST: <b>{{ model.totalGST - model.total | price(order.currency) }}</b>
182
182
  </div>
183
183
  <div
184
184
  v-if="!invoice && order.couponCode"
@@ -186,7 +186,7 @@
186
186
  Coupon: <b>{{ couponTotal | price(order.currency) }}</b>
187
187
  </div>
188
188
  <div class="lc_regular16">
189
- Total inc {{ taxName }}: <b>{{ model.totalGST | price(order.currency) }}</b>
189
+ Total inc GST: <b>{{ model.totalGST | price(order.currency) }}</b>
190
190
  </div>
191
191
  <div class="lc_regular16">
192
192
  {{ isPaid ? 'Paid' : 'Pending Payment' }}: <b>{{ model.totalGST | price(order.currency) }}</b>
@@ -198,7 +198,6 @@
198
198
  </template>
199
199
 
200
200
  <script>
201
- import { mapGetters } from 'vuex';
202
201
  import OrderViewMixin from './order-view.mixin';
203
202
  import OrderViewProduct from './order_view_product/order-view-product';
204
203
 
@@ -213,9 +212,6 @@ export default {
213
212
  type: Boolean,
214
213
  default: true
215
214
  }
216
- },
217
- computed: {
218
- ...mapGetters(['taxName'])
219
215
  }
220
216
  };
221
217
  </script>
@@ -205,7 +205,7 @@
205
205
  v-if="isSelectedPrint"
206
206
  class="form-row">
207
207
  <span class="PricingMainSection__section-content-label">
208
- Inclusive of {{ taxName }}:
208
+ Inclusive of GST:
209
209
  </span>
210
210
  <span class="PricingMainSection__section-content-value">
211
211
  {{ productPricing.tax.totalPrice | price(currency) }}
@@ -225,7 +225,6 @@
225
225
  </template>
226
226
 
227
227
  <script>
228
- import { mapGetters } from 'vuex';
229
228
  import { PRODUCT_TYPES, PRODUCT_TYPES_LIST } from '@lancom/shared/assets/js/constants/product';
230
229
  import productsPrice from '@lancom/shared/mixins/products-price';
231
230
  import Range from '@lancom/shared/components/common/range/range';
@@ -255,7 +254,6 @@ export default {
255
254
  };
256
255
  },
257
256
  computed: {
258
- ...mapGetters(['taxName']),
259
257
  productEditorLink() {
260
258
  return `/${this.product.SKU}/${this.product.alias}/editor`;
261
259
  },
@@ -63,7 +63,7 @@
63
63
  {{ productPricing.totalPrice | price(currency) }}
64
64
  </div>
65
65
  <div class="PricingExample__example-tax">
66
- Inclusive of {{ taxName }}: {{ productPricing.tax.totalPrice | price(currency) }}
66
+ Inclusive of GST: {{ productPricing.tax.totalPrice | price(currency) }}
67
67
  </div>
68
68
  <div class="mt-10">
69
69
  + Delivery
@@ -139,7 +139,7 @@ export default {
139
139
  };
140
140
  },
141
141
  computed: {
142
- ...mapGetters(['shop', 'country', 'taxName']),
142
+ ...mapGetters(['shop']),
143
143
  printsPricing() {
144
144
  return this.productPricing?.products[this.product._id]?.prints.prints || [];
145
145
  }
@@ -152,7 +152,7 @@ export default {
152
152
  const prints = this.generateSidesPrints();
153
153
  const layers = prints.map(({ printType, printSize, printArea }) => ({ printType: printType?._id, printSize: printSize?._id, printArea: printArea?._id }));
154
154
  const entities = getProductsForCalculatePricing(this.product, [this.simpleProduct], layers, true, true);
155
- this.productPricing = await api.calculateProductPrice({ entities, country: this.country?._id }, this.shop._id);
155
+ this.productPricing = await api.calculateProductPrice({ entities }, this.shop._id);
156
156
  },
157
157
  generateSidesPrints() {
158
158
  return this.sides
@@ -76,7 +76,7 @@
76
76
  Your Total Price
77
77
  </div>
78
78
  <div class="PricingHowWeCalculate__entity-description">
79
- (inclusive of {{ taxName }})
79
+ (inclusive of GST)
80
80
  </div>
81
81
  </div>
82
82
  </div>
@@ -86,13 +86,8 @@
86
86
  </template>
87
87
 
88
88
  <script>
89
- import { mapGetters } from 'vuex';
90
-
91
89
  export default {
92
- name: 'PricingHowWeCalculate',
93
- computed: {
94
- ...mapGetters(['taxName'])
95
- }
90
+ name: 'PricingHowWeCalculate'
96
91
  };
97
92
  </script>
98
93
 
@@ -216,7 +216,7 @@ export default {
216
216
  };
217
217
  },
218
218
  computed: {
219
- ...mapGetters(['shop', 'country']),
219
+ ...mapGetters(['shop']),
220
220
  maxScreenPrintColors() {
221
221
  const printTypes = this.product.printTypes.filter(printType => printType.type === 'screen print');
222
222
  return Math.max(...printTypes.map(printType => printType.colorsQuantity));
@@ -262,7 +262,7 @@ export default {
262
262
  const prints = this.generateSidesPrints(type);
263
263
  const layers = prints.map(({ printType, printSize, printArea }) => ({ printType: printType?._id, printSize: printSize?._id, printArea: printArea?._id }));
264
264
  const entities = getProductsForCalculatePricing(this.product, [this.simpleProduct], layers, true, true);
265
- const pricing = await api.calculateProductPrice({ entities, postcode: this.postcode, country: this.country?._id }, this.shop._id);
265
+ const pricing = await api.calculateProductPrice({ entities, postcode: this.postcode }, this.shop._id);
266
266
  return { pricing, prints, type };
267
267
  })
268
268
  );
@@ -205,7 +205,7 @@
205
205
  v-if="isSelectedPrint"
206
206
  class="form-row">
207
207
  <span class="PricingScreenPrintSection__section-content-label">
208
- Inclusive of {{ taxName }}:
208
+ Inclusive of GST:
209
209
  </span>
210
210
  <span class="PricingScreenPrintSection__section-content-value">
211
211
  {{ productPricing.tax.totalPrice | price(currency) }}
@@ -226,7 +226,6 @@
226
226
 
227
227
  <script>
228
228
  import Multiselect from 'vue-multiselect';
229
- import { mapGetters } from 'vuex';
230
229
  import { PRODUCT_TYPES, PRODUCT_TYPES_LIST } from '@lancom/shared/assets/js/constants/product';
231
230
  import productsPrice from '@lancom/shared/mixins/products-price';
232
231
  import Range from '@lancom/shared/components/common/range/range';
@@ -286,7 +285,6 @@ export default {
286
285
  };
287
286
  },
288
287
  computed: {
289
- ...mapGetters(['taxName']),
290
288
  productEditorLink() {
291
289
  return `/${this.product.SKU}/${this.product.alias}/editor`;
292
290
  },
@@ -15,35 +15,37 @@
15
15
  ::v-deep .slick-list {
16
16
  min-height: 205px;
17
17
  }
18
- ::v-deep .slick-arrow.slick-prev,
19
- ::v-deep .slick-arrow.slick-next {
18
+
19
+ ::v-deep .slick-arrow {
20
20
  position: absolute;
21
- bottom: 25px;
22
- right: 0;
23
- background-color: black;
24
- border: 1px solid white;
25
- background-image: url(./../../../static/icons/arrow-left.svg);
21
+ color: white;
22
+ top: 120px;
23
+ background-color: $gray;
24
+ background-image: url(./../../../static/icons/arrow-right.svg);
26
25
  background-position: center;
27
26
  background-repeat: no-repeat;
28
- background-size: 15px 15px;
29
- width: 41px;
30
- height: 41px;
27
+ background-size: 25px 25px;
28
+ width: 31px;
29
+ height: 47px;
30
+ margin-top: -45px;
31
31
  text-indent: -9999px;
32
+ border: none;
32
33
  cursor: pointer;
33
34
  z-index: 2;
34
35
 
36
+ &.slick-prev {
37
+ left: 0;
38
+ transform: rotate(180deg);
39
+ }
40
+ &.slick-next {
41
+ right: 0;
42
+ }
35
43
  &:hover {
36
44
  box-shadow: 0 0 3px $grey_2;
37
45
  }
38
- }
39
- ::v-deep .slick-arrow.slick-prev {
40
- transform: rotateZ(180deg);
41
- left: 0;
42
- right: auto;
43
- }
44
- ::v-deep .slick-arrow.slick-prev:focus,
45
- ::v-deep .slick-arrow.slick-next:focus {
46
- outline: none;
46
+ &:focus {
47
+ outline: none;
48
+ }
47
49
  }
48
50
  }
49
51
  &__items {
@@ -56,5 +58,13 @@
56
58
  height: 200px;
57
59
  max-width: 300px;
58
60
  flex-grow: 1;
61
+ &--active {
62
+ .elevation2 {
63
+ box-shadow: 0px 1px 5px $green !important;
64
+ }
65
+ ::v-deep .ProductMultipack__price {
66
+ background-color: $green !important;
67
+ }
68
+ }
59
69
  }
60
70
  }
@@ -4,11 +4,15 @@
4
4
  <div
5
5
  v-for="multipack in visibleMultipacks"
6
6
  :key="multipack._id"
7
- class="ProductMultipacksCarousel__item">
7
+ class="ProductMultipacksCarousel__item"
8
+ :class="{
9
+ 'ProductMultipacksCarousel__item--active': multipack === selectedMultipack
10
+ }">
8
11
  <product-multipack
9
12
  :multipack="multipack"
10
13
  :simple-products="simpleProducts"
11
- class="elevation2" />
14
+ class="elevation2"
15
+ @selected="toggleMultipack(multipack)" />
12
16
  </div>
13
17
  </div>
14
18
  <button
@@ -27,6 +31,8 @@
27
31
  </template>
28
32
 
29
33
  <script>
34
+ import { mapMutations } from 'vuex';
35
+ import { inRange } from '@lancom/shared/assets/js/utils/filters';
30
36
  import ProductMultipack from './product_multipack/product-multipack';
31
37
 
32
38
  export default {
@@ -36,7 +42,8 @@ export default {
36
42
  },
37
43
  data() {
38
44
  return {
39
- thumbsPage: 0
45
+ thumbsPage: 0,
46
+ selectedMultipack: null
40
47
  };
41
48
  },
42
49
  props: {
@@ -65,6 +72,38 @@ export default {
65
72
  }
66
73
  },
67
74
  methods: {
75
+ toggleMultipack(multipack) {
76
+ this.selectedMultipack = this.selectedMultipack === multipack ? null : multipack;
77
+ this.clearSimpleProductsAmount();
78
+ if (this.selectedMultipack) {
79
+ this.buyMultipack()
80
+ }
81
+ },
82
+ ...mapMutations('product', ['setSimpleProductAmount', 'clearSimpleProductsAmount']),
83
+ buyMultipack() {
84
+ const sizes = [
85
+ { size: 'S', percent: 0.15 },
86
+ { size: 'M', percent: 0.2 },
87
+ { size: 'XL', percent: 0.3 },
88
+ { size: '2XL', percent: 0.05 },
89
+ { size: 'L' }
90
+ ];
91
+ let leftQty = this.selectedMultipack.qty;
92
+ sizes.forEach(s => {
93
+ const simpleProduct = this.simpleProducts.find(simpleProduct => simpleProduct.size.shortName === s.size);
94
+ if (simpleProduct) {
95
+ const qty = s.percent ? +(s.percent * this.selectedMultipack.qty).toFixed(0) : leftQty;
96
+ const amount = inRange(qty, 0, simpleProduct.quantityStock || 999);
97
+ leftQty -= amount;
98
+ this.setSimpleProductAmount({
99
+ colorId: simpleProduct.color._id,
100
+ sizeId: simpleProduct.size._id,
101
+ amount
102
+ });
103
+ }
104
+ });
105
+
106
+ },
68
107
  goToPrevPage() {
69
108
  this.thumbsPage = Math.max(0, this.thumbsPage - 1);
70
109
  },
@@ -2,11 +2,21 @@
2
2
 
3
3
  .ProductMultipack {
4
4
  &__price {
5
- padding: 15px;
5
+ padding: 10px;
6
6
  text-align: center;
7
7
  font-size: 14px;
8
8
  font-weight: bold;
9
9
  background-color: $gray;
10
+ span {
11
+ text-align: center;
12
+ padding: 6px;
13
+ background-color: $orange;
14
+ color: $white;
15
+ display: inline-block;
16
+ font-weight: bold;
17
+ font-size: 15px;
18
+ margin-left: 14px;
19
+ }
10
20
  }
11
21
  &__image {
12
22
  position: absolute;
@@ -16,28 +26,18 @@
16
26
  bottom: 0;
17
27
  background-position: left top;
18
28
  background-repeat: no-repeat;
19
- background-size: contain;
29
+ background-size: cover;
20
30
  }
21
31
  &__banner {
22
32
  position: relative;
23
33
  height: 140px;
24
34
  &-info {
25
35
  position: absolute;
26
- top: 20px;
27
- right: 10px;
36
+ top: 0px;
37
+ right: 0px;
28
38
  display: flex;
29
39
  flex-direction: column;
30
40
  align-items: end;
31
- &-item span {
32
- margin-bottom: 10px;
33
- text-align: center;
34
- padding: 6px;
35
- background-color: $orange;
36
- color: $white;
37
- display: inline-block;
38
- font-weight: bold;
39
- font-size: 15px;
40
- }
41
41
  }
42
42
  }
43
43
  }
@@ -1,12 +1,13 @@
1
1
  <template>
2
2
  <div
3
3
  :id="`product-multipack-${multipack._id}`"
4
- class="ProductMultipack__wrapper">
4
+ class="ProductMultipack__wrapper"
5
+ @click="buyMultipack()">
5
6
  <div class="ProductMultipack__banner">
6
7
  <div
7
8
  class="ProductMultipack__image"
8
9
  :style="{
9
- 'background-image': multipack.image ? `url('${multipack.image.small}'` : null
10
+ 'background-image': bannerImage ? `url('${bannerImage}'` : null
10
11
  }">
11
12
  </div>
12
13
  <div class="ProductMultipack__banner-info">
@@ -14,27 +15,22 @@
14
15
  <btn
15
16
  style="padding: 10px; height: 35px; margin-bottom: 10px;"
16
17
  btn-class="green"
17
- btn-label="BUY"
18
+ :btn-label="`BUY ${multipack.qty}`"
18
19
  size="sm"
19
20
  @onclick="buyMultipack()" />
20
21
  </div>
21
- <div class="ProductMultipack__banner-info-item">
22
- <span>{{ multipack.qty }}</span>
23
- </div>
24
- <div class="ProductMultipack__banner-info-item">
25
- <span>{{ totalPrice | priceWithTax(pricingSettings, currency) }}</span>
26
- </div>
27
22
  </div>
28
23
  </div>
29
24
  <div class="ProductMultipack__price">
30
- Only {{ oneItemPrice | priceWithTax(pricingSettings, currency) }} each
25
+ {{ oneItemPrice | priceWithTax(pricingSettings, currency) }} each
26
+ <span>{{ totalPrice | priceWithTax(pricingSettings, currency) }}</span>
31
27
  </div>
32
28
  </div>
33
29
  </template>
34
30
 
35
31
  <script>
36
- import { mapGetters, mapMutations } from 'vuex';
37
- import { priceWithTax, inRange } from '@lancom/shared/assets/js/utils/filters';
32
+ import { mapGetters } from 'vuex';
33
+ import { priceWithTax } from '@lancom/shared/assets/js/utils/filters';
38
34
 
39
35
  export default {
40
36
  name: 'LancomProductMultipack',
@@ -53,6 +49,10 @@ export default {
53
49
  },
54
50
  computed: {
55
51
  ...mapGetters(['pricingSettings', 'currency']),
52
+ bannerImage() {
53
+ const banner = this.multipack.banner?.editorImage || this.multipack.banner;
54
+ return banner?.origin;
55
+ },
56
56
  simpleProduct() {
57
57
  return (this.simpleProducts || []).find(sp => sp.SKU === this.multipack.SKU);
58
58
  },
@@ -64,13 +64,8 @@ export default {
64
64
  }
65
65
  },
66
66
  methods: {
67
- ...mapMutations('product', ['setSimpleProductAmount']),
68
67
  buyMultipack() {
69
- this.setSimpleProductAmount({
70
- colorId: this.simpleProduct.color._id,
71
- sizeId: this.simpleProduct.size._id,
72
- amount: inRange(this.multipack.qty, 0, this.simpleProduct.quantityStock || 999)
73
- });
68
+ this.$emit('selected', this.multipack);
74
69
  }
75
70
  }
76
71
  };
@@ -10,12 +10,12 @@
10
10
  {{ product[minPriceAttr] | tax(gstTax) | price(currency) }}
11
11
  <span
12
12
  v-if="visiblePriceInfo"
13
- class="lc_regular11 lc_bold">inc. {{ taxName }}</span>
13
+ class="lc_regular11 lc_bold">inc. GST</span>
14
14
  </div>
15
15
  <div
16
16
  v-if="withoutGst"
17
17
  :class="withGst ? 'lc_regular11' : 'lc_h4'">
18
- {{ prePriceText }} {{ product[minPriceAttr] | price(currency) }} + {{ taxName }}
18
+ {{ prePriceText }} {{ product[minPriceAttr] | price(currency) }} + GST
19
19
  </div>
20
20
  </div>
21
21
  <div
@@ -27,12 +27,12 @@
27
27
  {{ product[minPriceAttr] | tax(gstTax) | price(currency) }} {{ rangeDivider }} {{ product[maxPriceAttr] | tax(gstTax) | price(currency) }}
28
28
  <span
29
29
  v-if="visiblePriceInfo"
30
- class="lc_regular11 lc_bold"> inc. {{ taxName }}</span>
30
+ class="lc_regular11 lc_bold"> inc. GST</span>
31
31
  </div>
32
32
  <div
33
33
  v-if="withoutGst"
34
34
  :class="withGst ? 'lc_regular11' : 'lc_h4'">
35
- {{ prePriceText }} {{ product[minPriceAttr] | price(currency) }} {{ rangeDivider }} {{ product[maxPriceAttr] | price(currency) }} + {{ taxName }}
35
+ {{ prePriceText }} {{ product[minPriceAttr] | price(currency) }} {{ rangeDivider }} {{ product[maxPriceAttr] | price(currency) }} + GST
36
36
  </div>
37
37
  </div>
38
38
  </div>
@@ -84,8 +84,7 @@ export default {
84
84
  },
85
85
  computed: {
86
86
  ...mapGetters([
87
- 'gstTax',
88
- 'taxName'
87
+ 'gstTax'
89
88
  ])
90
89
  }
91
90
  };
@@ -4,7 +4,7 @@
4
4
  <checkbox
5
5
  v-model="inclGST"
6
6
  :dark="true">
7
- <div class="ml-5">Inc. {{ taxName }}</div>
7
+ <div class="ml-5">Inc. GST</div>
8
8
  </checkbox>
9
9
  </div>
10
10
  <tabs
@@ -88,7 +88,7 @@ export default {
88
88
  };
89
89
  },
90
90
  computed: {
91
- ...mapGetters(['shop', 'taxName']),
91
+ ...mapGetters(['shop']),
92
92
  ...mapGetters('product', ['priceIncludeGST']),
93
93
  ...mapGetters(['helpMessages']),
94
94
  hasPrintSurcharge() {