@lancom/shared 0.0.199 → 0.0.201

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 (63) hide show
  1. package/assets/js/api/admin.js +2 -2
  2. package/assets/js/api/index.js +11 -8
  3. package/assets/js/utils/filters.js +4 -6
  4. package/components/checkout/cart/cart_entities_group/cart-entities-group.vue +3 -3
  5. package/components/checkout/cart/cart_entities_group/cart_entities_group_prints/cart_entities_group_print/cart-entities-group-print.vue +3 -3
  6. package/components/checkout/cart/cart_entities_group_table/cart_entities_group_tr/cart-entities-group-tr.vue +3 -3
  7. package/components/checkout/cart/cart_entity/cart-entity.vue +2 -2
  8. package/components/checkout/cart/cart_entity/cart_entity_color_simple_products/cart-entity-color-simple-products.vue +1 -1
  9. package/components/checkout/cart/cart_entity/cart_entity_color_simple_products/cart_entity_color_simple_product/cart-entity-color-simple-product.vue +1 -1
  10. package/components/checkout/cart/cart_entity/cart_entity_prints/cart_entity_print/cart-entity-print.vue +3 -3
  11. package/components/checkout/cart/cart_shipments_pricing/cart-shipments-pricing.vue +2 -2
  12. package/components/checkout/order/order-shipping-method/order-shipping-method.vue +1 -1
  13. package/components/common/coupon_select/coupon-select.vue +3 -3
  14. package/components/common/price.vue +1 -1
  15. package/components/common/pricing_discounts_table/pricing-discounts-table.vue +2 -2
  16. package/components/common/products_total_pricing/products-total-pricing.vue +6 -6
  17. package/components/common/single-item-price.vue +1 -1
  18. package/components/design/approve_design_header/approve-design-header.vue +1 -1
  19. package/components/editor/editor_pricing/editor-pricing.vue +5 -5
  20. package/components/editor/editor_pricing/editor_pricing_details/editor_pricing_details_prints/editor-pricing-details-prints.vue +5 -5
  21. package/components/editor/editor_pricing/editor_pricing_details/editor_pricing_details_products/editor-pricing-details-products.vue +3 -3
  22. package/components/editor/editor_print_area_options/editor_print_area_option/editor-print-area-option.vue +1 -1
  23. package/components/editor/editor_product_details/editor-product-details.vue +3 -2
  24. package/components/modals/order_modal/order-modal.vue +3 -1
  25. package/components/order/order_entity/order-entity.vue +1 -1
  26. package/components/order/order_price/order-price.vue +7 -7
  27. package/components/order/order_prints_groups/order-prints-groups.vue +4 -4
  28. package/components/order/order_products_groups/order-products-groups.vue +8 -8
  29. package/components/order/order_products_groups/order_products_group/order-products-group.vue +4 -4
  30. package/components/order/order_refund_view/order-refund-view.vue +3 -3
  31. package/components/order/order_setup_groups/order-setup-groups.vue +5 -5
  32. package/components/order/order_sku_groups/order-sku-groups.vue +4 -4
  33. package/components/order/order_view/order-view.vue +9 -8
  34. package/components/order/order_view/order_product_color_simple_products/order-product-color-simple-products.mixin.js +4 -0
  35. package/components/order/order_view/order_product_color_simple_products/order-product-color-simple-products.vue +1 -1
  36. package/components/order/order_view/order_product_prints/order-product-prints.vue +5 -0
  37. package/components/order/order_view/order_product_prints/order_product_print/order-product-print.vue +7 -3
  38. package/components/order/order_view/order_view_product/order-view-product.vue +7 -1
  39. package/components/pricing/pricing_digital_printing/pricing-digital-printing.vue +6 -6
  40. package/components/pricing/pricing_example/pricing-example.vue +6 -6
  41. package/components/pricing/pricing_products_calculator/pricing_product_calculator/pricing-product-calculator.vue +2 -2
  42. package/components/pricing/pricing_screen_printing/pricing-screen-printing.vue +8 -8
  43. package/components/product/product_price_range/product-price-range.vue +4 -4
  44. package/components/product/product_prints_price_info/product_print_price_info/product_print_price_info_item/product-print-price-info-item.vue +2 -2
  45. package/components/products/product_list_product/product-list-product.vue +2 -2
  46. package/components/quotes/quote_view/quote_option_view/quote-option-view.vue +6 -6
  47. package/components/quotes/quote_view/quote_product_color_simple_products/quote-product-color-simple-products.vue +2 -2
  48. package/components/quotes/quote_view/quote_product_prints/quote_product_print/quote-product-print.vue +3 -3
  49. package/components/quotes/quote_view/quote_view_product/quote-view-product.vue +1 -1
  50. package/nuxt.config.js +11 -1
  51. package/package.json +1 -1
  52. package/pages/order/_token/index.vue +45 -0
  53. package/pages/order/_token/invoice/_invoice.vue +57 -0
  54. package/pages/order/_token/payment/index.vue +43 -0
  55. package/pages/order/_token/payment/invoice/_invoice.vue +53 -0
  56. package/pages/order/_token/refund/_refund.vue +50 -0
  57. package/plugins/global-components.js +7 -0
  58. package/routes/index.js +28 -0
  59. package/store/cart.js +1 -0
  60. package/store/index.js +6 -2
  61. package/store/product.js +6 -4
  62. package/components/common/logo/logo.scss +0 -16
  63. package/components/common/logo/logo.vue +0 -30
@@ -467,8 +467,8 @@ export default {
467
467
  removeMenu(id) {
468
468
  return _delete(`admin/menus/${id}`);
469
469
  },
470
- fetchPrintTypes() {
471
- return _get('admin/print-types');
470
+ fetchPrintTypes(params) {
471
+ return _get('admin/print-types', params);
472
472
  },
473
473
  fetchPrintTypeById(id) {
474
474
  return _get(`admin/print-types/${id}`);
@@ -6,8 +6,8 @@ const api = {
6
6
  fetchClientSettings(shop, params) {
7
7
  return _get(`shop/${shop}/client-settings`, params);
8
8
  },
9
- fetchCartById(shop, cart) {
10
- return _get(`shop/${shop}/cart/${cart}`);
9
+ fetchCartById(shop, cart, params) {
10
+ return _get(`shop/${shop}/cart/${cart}`, params);
11
11
  },
12
12
  saveCart(cart, shop) {
13
13
  return cart._id ? _patch(`shop/${shop}/cart/${cart._id}`, cart) : _post(`shop/${shop}/cart`, cart);
@@ -45,11 +45,11 @@ const api = {
45
45
  fetchProductsTypes(shop) {
46
46
  return _get(`shop/${shop}/products/types`);
47
47
  },
48
- fetchPricingProducts(shop) {
49
- return _get(`shop/${shop}/products/pricing-products`);
48
+ fetchPricingProducts(shop, params) {
49
+ return _get(`shop/${shop}/products/pricing-products`, params);
50
50
  },
51
- fetchProduct(shop, alias, print) {
52
- return _get(`shop/${shop}/products/${alias}?print=${print || ''}`);
51
+ fetchProduct(shop, alias, params) {
52
+ return _get(`shop/${shop}/products/${alias}`, params);
53
53
  },
54
54
  fetchCouponByCode(shop, code) {
55
55
  return _get(`shop/${shop}/coupons/${code}`);
@@ -72,8 +72,8 @@ const api = {
72
72
  fetchNewsTag(shop, alias) {
73
73
  return _get(`shop/${shop}/news-tag/${alias}`);
74
74
  },
75
- fetchProductDetails(shop, alias) {
76
- return _get(`shop/${shop}/products/${alias}/simple-products`);
75
+ fetchProductDetails(shop, alias, params) {
76
+ return _get(`shop/${shop}/products/${alias}/simple-products`, params);
77
77
  },
78
78
  fetchRelatedProducts(shop, alias, params) {
79
79
  return _get(`shop/${shop}/products/${alias}/related-products`, params);
@@ -124,6 +124,9 @@ const api = {
124
124
  saveQuoteRequest(quote, shop) {
125
125
  return quote._id ? _put(`shop/${shop}/quotes/${quote._id}`, quote) : _post(`shop/${shop}/quotes`, quote);
126
126
  },
127
+ generateQuotePDF(id, option) {
128
+ return _get(`quotes/${id}/option/${option}/pdf`);
129
+ },
127
130
  addQuoteQuestion(quote, shop, data) {
128
131
  return _post(`shop/${shop}/quotes/${quote._id}/questions`, data);
129
132
  },
@@ -19,17 +19,15 @@ export const number = (value, digits = 0) => {
19
19
 
20
20
  export const decimal = (value, digits = 2) => number(value || 0, digits);
21
21
 
22
- export const priceWithTax = (value, settings) => {
22
+ export const priceWithTax = (value, settings, currency) => {
23
23
  const { gstTax = 0, displayPricingWithTax = false } = settings || {};
24
24
  const valueWithTask = displayPricingWithTax ? tax(value, gstTax) : value;
25
- return price(valueWithTask);
25
+ return price(valueWithTask, currency);
26
26
  };
27
27
 
28
- export const price = (value = 0, currency = 'USD') => {
28
+ export const price = (value = 0, currency) => {
29
29
  const amount = number(value, 2);
30
- const cur = currencies.find(c => c.value.toUpperCase() === currency.toUpperCase());
31
- const label = cur ? decodeDecimal(cur.code) : currency;
32
- return `${label}${amount}`;
30
+ return `${currency?.symbol || '$'}${amount}`;
33
31
  };
34
32
 
35
33
  export const tax = (value = 0, tax = 0) => {
@@ -28,7 +28,7 @@
28
28
  <div v-if="cartPricing">
29
29
  <div class="CartEntitiesGroup__info-row">
30
30
  <div class="lc_regular14 lc_black">
31
- Print cost: {{ printsTotalPrice | price }}
31
+ Print cost: {{ printsTotalPrice | price(currency) }}
32
32
  </div>
33
33
  <div class="lc_regular14 lc_black">
34
34
  {{ totalAmount }} items
@@ -36,10 +36,10 @@
36
36
  </div>
37
37
  <div class="CartEntitiesGroup__info-row">
38
38
  <div class="lc_regular14 lc_black">
39
- Tee cost: {{ productsTotalPrice | price }}
39
+ Tee cost: {{ productsTotalPrice | price(currency) }}
40
40
  </div>
41
41
  <div class="lc_medium16 lc_black">
42
- Cost: {{ totalPrice | price }}
42
+ Cost: {{ totalPrice | price(currency) }}
43
43
  </div>
44
44
  </div>
45
45
  </div>
@@ -10,17 +10,17 @@
10
10
  {{ print.printSize.name }}
11
11
  </td>
12
12
  <td class="lc_body-small">
13
- {{ setupCoast | price }}
13
+ {{ setupCoast | price(currency) }}
14
14
  </td>
15
15
  <td class="lc_body-small">
16
16
  {{ totalAmount }}
17
17
  </td>
18
18
  <td class="lc_body-small">
19
- {{ price | price }}
19
+ {{ price | price(currency) }}
20
20
  </td>
21
21
  <td class="lc_body-small">
22
22
  <strong>
23
- {{ totalPrice | price }}
23
+ {{ totalPrice | price(currency) }}
24
24
  </strong>
25
25
  </td>
26
26
  </tr>
@@ -55,12 +55,12 @@
55
55
  </td>
56
56
  <td>
57
57
  <div v-if="cartPricing">
58
- {{ productUnitPrice | price }}
58
+ {{ productUnitPrice | price(currency) }}
59
59
  </div>
60
60
  </td>
61
61
  <td>
62
62
  <div v-if="cartPricing">
63
- {{ printsTotalPrice | price }}
63
+ {{ printsTotalPrice | price(currency) }}
64
64
  </div>
65
65
  </td>
66
66
  <td>
@@ -73,7 +73,7 @@
73
73
  </td>
74
74
  <td>
75
75
  <div v-if="cartPricing">
76
- {{ totalPrice | price }}
76
+ {{ totalPrice | price(currency) }}
77
77
  </div>
78
78
  </td>
79
79
  <td v-if="editable">
@@ -55,7 +55,7 @@
55
55
  <div
56
56
  v-if="isSameUnitPrices"
57
57
  class="lc_title-small mt-8">
58
- Price Per Unit: {{ unitPrice | price }}
58
+ Price Per Unit: {{ unitPrice | price(currency) }}
59
59
  </div>
60
60
  <div
61
61
  v-if="hasPrints"
@@ -63,7 +63,7 @@
63
63
  <cart-entity-prints :entity="entity" />
64
64
  </div>
65
65
  <div class="CartEntity__subtotal lc_title">
66
- Subtotal: {{ totalPrice | price }}
66
+ Subtotal: {{ totalPrice | price(currency) }}
67
67
  </div>
68
68
  <i
69
69
  class="icon-delete CartEntity__remove"
@@ -63,7 +63,7 @@
63
63
  Total price:
64
64
  </div>
65
65
  <div class="lc_body-small">
66
- {{ productsTotalPrice | price }}
66
+ {{ productsTotalPrice | price(currency) }}
67
67
  </div>
68
68
  </div>
69
69
  </div>
@@ -42,7 +42,7 @@
42
42
  v-if="displayUnitPrice"
43
43
  class="centered CartColorSimpleProduct__price">
44
44
  <span v-if="model > 0">
45
- {{ unitPrice | price }}
45
+ {{ unitPrice | price(currency) }}
46
46
  </span>
47
47
  </div>
48
48
  </div>
@@ -15,7 +15,7 @@
15
15
  </td>
16
16
  <td class="lc_body-small">
17
17
  <span class="hidden-md-and-up">Setup cost</span>
18
- {{ setupCoast | price }}
18
+ {{ setupCoast | price(currency) }}
19
19
  </td>
20
20
  <td class="lc_body-small">
21
21
  <span class="hidden-md-and-up">QTY</span>
@@ -23,12 +23,12 @@
23
23
  </td>
24
24
  <td class="lc_body-small">
25
25
  <span class="hidden-md-and-up">Price</span>
26
- {{ price | price }}
26
+ {{ price | price(currency) }}
27
27
  </td>
28
28
  <td class="lc_body-small">
29
29
  <span class="hidden-md-and-up">Total</span>
30
30
  <strong>
31
- {{ totalPrice | price }}
31
+ {{ totalPrice | price(currency) }}
32
32
  </strong>
33
33
  </td>
34
34
  </tr>
@@ -23,7 +23,7 @@
23
23
  </div>
24
24
  </div>
25
25
  <div>
26
- {{ supplier | selectedRatePrice | price }}
26
+ {{ supplier | selectedRatePrice | price(currency) }}
27
27
  </div>
28
28
  </div>
29
29
  <div
@@ -48,7 +48,7 @@
48
48
  </div>
49
49
  </div>
50
50
  <div class="CartShipmentsPricing__rate-price">
51
- {{ rate.totalPriceWithoutTax | price }}
51
+ {{ rate.totalPriceWithoutTax | price(currency) }}
52
52
  </div>
53
53
  </div>
54
54
  </div>
@@ -5,7 +5,7 @@
5
5
  </div>
6
6
  <div v-if="shippingPricing">
7
7
  <div class="lc_regular14">
8
- Total: {{ shippingPricing.totalPrice | price }}
8
+ Total: {{ shippingPricing.totalPrice | price(currency) }}
9
9
  </div>
10
10
  <div class="lc_regular14">
11
11
  Postcode: {{ shippingPricing.postcode }}
@@ -55,11 +55,11 @@
55
55
  <span v-if="value.showCouponIsApplied">
56
56
  COUPON APPLIED
57
57
  <span v-if="pricing.totalsWithoutCoupon">
58
- : {{ pricing.totalsWithoutCoupon.totalPrice - pricing.totalPrice | price }} OFF
58
+ : {{ pricing.totalsWithoutCoupon.totalPrice - pricing.totalPrice | price(currency) }} OFF
59
59
  </span>
60
60
  </span>
61
61
  <span v-else>
62
- {{ value.value | price }} OFF
62
+ {{ value.value | price(currency) }} OFF
63
63
  </span>
64
64
  </div>
65
65
  <div
@@ -70,7 +70,7 @@
70
70
  <div
71
71
  v-else
72
72
  class="lc_caption form-help is-danger">
73
- Invalid coupon: Min Order for Coupon: {{ value.minOrderValue | price }}
73
+ Invalid coupon: Min Order for Coupon: {{ value.minOrderValue | price(currency) }}
74
74
  </div>
75
75
  </div>
76
76
  </div>
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <span>
3
- {{ price | priceWithTax(pricingSettings) }}
3
+ {{ price | priceWithTax(pricingSettings, currency) }}
4
4
  </span>
5
5
  </template>
6
6
 
@@ -17,10 +17,10 @@
17
17
  }">
18
18
  <td>{{ (range.max >= 9999 || !range.max) ? `${range.min}+` : `${range.min}-${range.max}` }}</td>
19
19
  <td v-if="withGst">
20
- {{ range.price | priceWithTax(pricingSettings) }}
20
+ {{ range.price | priceWithTax(pricingSettings, currency) }}
21
21
  </td>
22
22
  <td v-else>
23
- {{ range.price | price }}
23
+ {{ range.price | price(currency) }}
24
24
  </td>
25
25
  </tr>
26
26
  </tbody>
@@ -2,26 +2,26 @@
2
2
  <div class="lc_subtitle1 ProductsTotalPricing__wrapper">
3
3
  <div class="ProductsTotalPricing__subtotal">
4
4
  <div class="lc_regular14">
5
- {{ itemsLabel }} cost: {{ pricing.products.products.totalPrice | price }}
5
+ {{ itemsLabel }} cost: {{ pricing.products.products.totalPrice | price(currency) }}
6
6
  </div>
7
7
  <div class="lc_regular14 mt-4">
8
- Print cost: {{ pricing.products.prints.totalPrice | price }}
8
+ Print cost: {{ pricing.products.prints.totalPrice | price(currency) }}
9
9
  </div>
10
10
  <div class="lc_medium18 mt-8">
11
- Subtotal: {{ pricing.products.totalPrice | price }}
11
+ Subtotal: {{ pricing.products.totalPrice | price(currency) }}
12
12
  </div>
13
13
  </div>
14
14
  <div class="ProductsTotalPricing__total">
15
15
  <div
16
16
  v-if="pricing.shipping"
17
17
  class="lc_regular14 mb-4">
18
- Delivery: {{ pricing.shipping.totalPrice | price }} ({{ pricing.shipping.weight }})
18
+ Delivery: {{ pricing.shipping.totalPrice | price(currency) }} ({{ pricing.shipping.weight }})
19
19
  </div>
20
20
  <div class="lc_semibold22">
21
- Total: {{ pricing.totalPrice | price }} <br />
21
+ Total: {{ pricing.totalPrice | price(currency) }} <br />
22
22
  </div>
23
23
  <div class="lc_regular14 mt-4">
24
- Incl. GST ({{ pricing.tax.percent }}) {{ pricing.tax.totalPrice | price }}
24
+ Incl. GST ({{ pricing.tax.percent }}) {{ pricing.tax.totalPrice | price(currency) }}
25
25
  </div>
26
26
  </div>
27
27
  </div>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <span>{{ singlePrice | price }}</span>
2
+ <span>{{ singlePrice | price(currency) }}</span>
3
3
  </template>
4
4
 
5
5
  <script>
@@ -44,7 +44,7 @@
44
44
  </template>
45
45
 
46
46
  <script>
47
- import Logo from '@lancom/shared/components/common/logo/logo';
47
+ import Logo from '@/components/common/logo/logo';
48
48
 
49
49
  export default {
50
50
  name: 'ApproveDesignHeader',
@@ -25,7 +25,7 @@
25
25
  <div class="lc_regular14 EditorPricing__main-col">
26
26
  Cost per unit:
27
27
  <b v-if="productPricing">
28
- {{ productPricing.products.price | price }}
28
+ {{ productPricing.products.price | price(currency) }}
29
29
  </b>
30
30
  (excluding print)
31
31
  </div>
@@ -44,7 +44,7 @@
44
44
  <div class="lc_regular14 EditorPricing__main-col">
45
45
  Cost per unit:
46
46
  <b v-if="productPricing">
47
- {{ productPricing.products.price | price }}
47
+ {{ productPricing.products.price | price(currency) }}
48
48
  </b>
49
49
  (excluding garment cost)
50
50
  </div>
@@ -58,7 +58,7 @@
58
58
  <div class="EditorPricing__main-row">
59
59
  <div class="lc_regular14 EditorPricing__main-col">
60
60
  Cost per unit:
61
- <b>{{ productPricing.products.price | price }}</b>
61
+ <b>{{ productPricing.products.price | price(currency) }}</b>
62
62
  </div>
63
63
  <div class="lc_regular14 EditorPricing__main-col">
64
64
  Total Quantity:
@@ -70,7 +70,7 @@
70
70
  <div class="lc_regular16 EditorPricing__main-col">
71
71
  Total Cost:
72
72
  <span class="lc_semibold22">
73
- {{ productPricing.totalPrice | price }}
73
+ {{ productPricing.totalPrice | price(currency) }}
74
74
  </span>
75
75
  </div>
76
76
  </div>
@@ -81,7 +81,7 @@
81
81
  {{ showDetails ? 'Hide' : 'Show' }} detail
82
82
  </div>
83
83
  <div class="lc_regular14 EditorPricing__main-col">
84
- Incl. tax ({{ productPricing.tax.percent }}) {{ productPricing.tax.totalPrice | price }}
84
+ Incl. tax ({{ productPricing.tax.percent }}) {{ productPricing.tax.totalPrice | price(currency) }}
85
85
  </div>
86
86
  </div>
87
87
  </fragment>
@@ -32,18 +32,18 @@
32
32
  </td>
33
33
  <td>
34
34
  <strong>
35
- {{ group.setupPriceWithoutTax | priceWithTax(pricingSettings) }}
35
+ {{ group.setupPriceWithoutTax | priceWithTax(pricingSettings, currency) }}
36
36
  </strong>
37
37
  </td>
38
38
  <td>
39
39
  <span v-if="group.costType !== 'setup only'">
40
40
  <strong>
41
- {{ (displayPricingWithTax ? group.totalPrice : group.totalPriceWithoutTax) | price }}
41
+ {{ (displayPricingWithTax ? group.totalPrice : group.totalPriceWithoutTax) | price(currency) }}
42
42
  </strong>
43
- = {{ group.amount }} x {{ (displayPricingWithTax ? group.price : group.priceWithoutTax) | price }}
43
+ = {{ group.amount }} x {{ (displayPricingWithTax ? group.price : group.priceWithoutTax) | price(currency) }}
44
44
  </span>
45
45
  <strong v-else>
46
- {{ (displayPricingWithTax ? group.totalPrice : group.totalPriceWithoutTax) | price }}
46
+ {{ (displayPricingWithTax ? group.totalPrice : group.totalPriceWithoutTax) | price(currency) }}
47
47
  </strong>
48
48
  </td>
49
49
  </tr>
@@ -58,7 +58,7 @@
58
58
  </td>
59
59
  <td>
60
60
  <strong>
61
- {{ (displayPricingWithTax ? productPricing.products.prints.totalPrice : productPricing.products.prints.totalPriceWithoutTax) | price }}
61
+ {{ (displayPricingWithTax ? productPricing.products.prints.totalPrice : productPricing.products.prints.totalPriceWithoutTax) | price(currency) }}
62
62
  </strong>
63
63
  </td>
64
64
  </tr>
@@ -32,12 +32,12 @@
32
32
  </td>
33
33
  <td>
34
34
  <span class="EditorPricingDetailsProducts__hoverable">
35
- {{ groupPrice | priceWithTax(pricingSettings) }}
35
+ {{ groupPrice | priceWithTax(pricingSettings, currency) }}
36
36
  </span>
37
37
  </td>
38
38
  <td>
39
39
  <strong>
40
- {{ (displayPricingWithTax ? group.totalPrice : group.totalPriceWithoutTax) | price }}
40
+ {{ (displayPricingWithTax ? group.totalPrice : group.totalPriceWithoutTax) | price(currency) }}
41
41
  </strong>
42
42
  </td>
43
43
  </tr>
@@ -47,7 +47,7 @@
47
47
  </td>
48
48
  <td>
49
49
  <strong>
50
- {{ (displayPricingWithTax ? productPricing.products.products.totalPrice : productPricing.products.products.totalPriceWithoutTax) | price }}
50
+ {{ (displayPricingWithTax ? productPricing.products.products.totalPrice : productPricing.products.products.totalPriceWithoutTax) | price(currency) }}
51
51
  </strong>
52
52
  </td>
53
53
  </tr>
@@ -11,7 +11,7 @@
11
11
  </div>
12
12
  <div class="lc_regular10">
13
13
  <span v-if="option.printArea && calcPrintPrice(option) > 0">
14
- {{ calcPrintPrice(option) | priceWithTax(pricingSettings) }}
14
+ {{ calcPrintPrice(option) | priceWithTax(pricingSettings, currency) }}
15
15
  </span>
16
16
  </div>
17
17
  </div>
@@ -20,7 +20,7 @@
20
20
  popover-class="tooltip popover white"
21
21
  class="EditorProductDetails__discounts-table">
22
22
  <span class="lc_semibold22 lc_black EditorProductDetails__dashed-underline">
23
- {{ defaultSimpleProduct.pricing[0].price | priceWithTax(pricingSettings) }}
23
+ {{ defaultSimpleProduct.pricing[0].price | priceWithTax(pricingSettings, currency) }}
24
24
  </span>
25
25
  <template slot="popover">
26
26
  <pricing-discounts-table :prices="defaultSimpleProduct.pricing" />
@@ -85,6 +85,7 @@ import PricingDiscountsTable from '@lancom/shared/components/common/pricing_disc
85
85
  import modals from '@lancom/shared/mixins/modals';
86
86
  import { staticLink, priceWithTax } from '@lancom/shared/assets/js/utils/filters';
87
87
  import PricingTable from '@lancom/shared/components/common/pricing_table/pricing-table';
88
+ import { generateProductLink } from '@lancom/shared/assets/js/utils/product';
88
89
 
89
90
  export default {
90
91
  name: 'EditorProductDetails',
@@ -114,7 +115,7 @@ export default {
114
115
  'pricingSettings'
115
116
  ]),
116
117
  productLink() {
117
- return `/${this.product.SKU}/${this.product.alias}`;
118
+ return generateProductLink(this.product);
118
119
  },
119
120
  printTypePrices() {
120
121
  return [...(this.selectedPrintType?.printAreas || []).reduce((sizes, area) => {
@@ -292,7 +292,7 @@ export default {
292
292
  };
293
293
  },
294
294
  computed: {
295
- ...mapGetters(['shop']),
295
+ ...mapGetters(['shop', 'country', 'currency']),
296
296
  ...mapGetters('order', ['orderData']),
297
297
  ...mapGetters('cart', [
298
298
  'entities',
@@ -337,6 +337,8 @@ export default {
337
337
  try {
338
338
  this.processing = true;
339
339
  await this.createOrder({
340
+ currency: this.currency?._id,
341
+ country: this.country?._id,
340
342
  billingAddress: this.form,
341
343
  shippingAddress: this.form,
342
344
  products: this.entities,
@@ -17,7 +17,7 @@
17
17
  Amount: {{ entity.amount }}
18
18
  </div>
19
19
  <div class="lc_overline OrderEntity__price">
20
- Price: {{ pricingProducts[entity._id].totalPrice | price }}
20
+ Price: {{ pricingProducts[entity._id].totalPrice | price(currency) }}
21
21
  </div>
22
22
  </div>
23
23
  </div>
@@ -5,7 +5,7 @@
5
5
  </h4>
6
6
  <div class="OrderPrice__content">
7
7
  <div class="lc_caption OrderPrice__row">
8
- <b>Tees:</b> {{ price.amount }} ({{ price.products.products.totalPriceWithoutTax | price }})
8
+ <b>Tees:</b> {{ price.amount }} ({{ price.products.products.totalPriceWithoutTax | price(currency) }})
9
9
  </div>
10
10
  <div class="lc_caption OrderPrice__row">
11
11
  <div><b>Prints:</b></div>
@@ -13,25 +13,25 @@
13
13
  v-for="[size, pricing] in printsPrice"
14
14
  :key="size"
15
15
  style="padding-left: 15px;">
16
- {{ size | print }}: {{ pricing.amount }} ({{ pricing.totalPriceWithoutTax | price }})
16
+ {{ size | print }}: {{ pricing.amount }} ({{ pricing.totalPriceWithoutTax | price(currency) }})
17
17
  </div>
18
18
  <div style="padding-left: 15px;">
19
- <b>Prints total:</b> {{ price.products.prints.totalPriceWithoutTax | price }}
19
+ <b>Prints total:</b> {{ price.products.prints.totalPriceWithoutTax | price(currency) }}
20
20
  </div>
21
21
  </div>
22
22
  <div
23
23
  v-if="price.shipping"
24
24
  class="lc_caption OrderPrice__row">
25
- <b>Delivery:</b> {{ price.shipping.totalPriceWithoutTax | price }} ({{ price.shipping.weight }})
25
+ <b>Delivery:</b> {{ price.shipping.totalPriceWithoutTax | price(currency) }} ({{ price.shipping.weight }})
26
26
  </div>
27
27
  <div class="lc_caption OrderPrice__row">
28
- <b>Order amount ex GST:</b> {{ price.totalPriceWithoutTax | price }}
28
+ <b>Order amount ex GST:</b> {{ price.totalPriceWithoutTax | price(currency) }}
29
29
  </div>
30
30
  <div class="lc_caption OrderPrice__row">
31
- <b>GST:</b> {{ price.tax.totalPrice | price }} ({{ price.tax.percent }})
31
+ <b>GST:</b> {{ price.tax.totalPrice | price(currency) }} ({{ price.tax.percent }})
32
32
  </div>
33
33
  <div class="lc_caption OrderPrice__row">
34
- <b>Order amount inc GST:</b> {{ price.totalPrice | price }}
34
+ <b>Order amount inc GST:</b> {{ price.totalPrice | price(currency) }}
35
35
  </div>
36
36
  </div>
37
37
  </div>
@@ -40,22 +40,22 @@
40
40
  </td>
41
41
  <td v-html="sku(group.products)"></td>
42
42
  <td>{{ group.amount }}</td>
43
- <td>{{ (group.totalPriceWithoutTax / group.amount) | price }}</td>
44
- <td>{{ group.totalPriceWithoutTax | price }}</td>
43
+ <td>{{ (group.totalPriceWithoutTax / group.amount) | price(currency) }}</td>
44
+ <td>{{ group.totalPriceWithoutTax | price(currency) }}</td>
45
45
  </tr>
46
46
  <tr>
47
47
  <td>Total</td>
48
48
  <td colspan="3"></td>
49
49
  <td>{{ total.amount }}</td>
50
50
  <td></td>
51
- <td>{{ total.price | price }}</td>
51
+ <td>{{ total.price | price(currency) }}</td>
52
52
  </tr>
53
53
  <tr v-if="totalsWithGst">
54
54
  <td>Total inc. GST</td>
55
55
  <td colspan="3"></td>
56
56
  <td>{{ total.amount }}</td>
57
57
  <td></td>
58
- <td>{{ total.priceWithGST | price }}</td>
58
+ <td>{{ total.priceWithGST | price(currency) }}</td>
59
59
  </tr>
60
60
  </tbody>
61
61
  </table>
@@ -32,24 +32,24 @@
32
32
  <td colspan="3"></td>
33
33
  <td>{{ total.amount }}</td>
34
34
  <td>{{ total.prints.amount }}</td>
35
- <td>{{ total.prints.price | price }}</td>
36
- <td>{{ total.productsPrice | price }}</td>
35
+ <td>{{ total.prints.price | price(currency) }}</td>
36
+ <td>{{ total.productsPrice | price(currency) }}</td>
37
37
  <td v-if="setup">
38
- {{ 0 | price }}
38
+ {{ 0 | price(currency) }}
39
39
  </td>
40
- <td>{{ total.price | price }}</td>
40
+ <td>{{ total.price | price(currency) }}</td>
41
41
  </tr>
42
42
  <tr v-if="totalsWithGst">
43
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>
47
- <td>{{ total.prints.priceWithGST | price }}</td>
48
- <td>{{ total.productsPriceWithGST | price }}</td>
47
+ <td>{{ total.prints.priceWithGST | price(currency) }}</td>
48
+ <td>{{ total.productsPriceWithGST | price(currency) }}</td>
49
49
  <td v-if="setup">
50
- {{ 0 | price }}
50
+ {{ 0 | price(currency) }}
51
51
  </td>
52
- <td>{{ total.priceWithGST | price }}</td>
52
+ <td>{{ total.priceWithGST | price(currency) }}</td>
53
53
  </tr>
54
54
  </tbody>
55
55
  </table>
@@ -44,18 +44,18 @@
44
44
  {{ group.prints.amount }}
45
45
  </td>
46
46
  <td :rowspan="rowspan">
47
- {{ group.prints.totalPriceWithoutTax | price }}
47
+ {{ group.prints.totalPriceWithoutTax | price(currency) }}
48
48
  </td>
49
49
  <td :rowspan="rowspan">
50
- {{ group.productsTotalPriceWithoutTax | price }}
50
+ {{ group.productsTotalPriceWithoutTax | price(currency) }}
51
51
  </td>
52
52
  <td
53
53
  v-if="setup"
54
54
  :rowspan="rowspan">
55
- {{ 0 | price }}
55
+ {{ 0 | price(currency) }}
56
56
  </td>
57
57
  <td :rowspan="rowspan">
58
- {{ group.totalPriceWithoutTax | price }}
58
+ {{ group.totalPriceWithoutTax | price(currency) }}
59
59
  </td>
60
60
  </fragment>
61
61
  </tr>