@lancom/shared 0.0.104 → 0.0.107

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 (124) hide show
  1. package/assets/js/api/admin.js +3 -0
  2. package/assets/js/models/print-area.js +17 -13
  3. package/assets/js/models/product-layers.js +6 -5
  4. package/assets/js/utils/cart.js +1 -0
  5. package/assets/js/utils/custom-validation-rules.js +7 -0
  6. package/assets/js/utils/fabric/wireframe.js +4 -4
  7. package/assets/js/utils/fabric-helper.js +7 -7
  8. package/assets/js/utils/filters.js +7 -1
  9. package/assets/js/utils/order.js +3 -3
  10. package/assets/js/utils/prints.js +15 -4
  11. package/assets/js/utils/product.js +7 -6
  12. package/assets/js/utils/products-grouping/by-colors.js +22 -18
  13. package/assets/scss/ui_kit/_table.scss +3 -0
  14. package/assets/scss/ui_kit/_typography.scss +6 -0
  15. package/components/asides/contact_us/contact-us.vue +3 -0
  16. package/components/asides/offer_screen_printing/offer-screen-printing.vue +22 -12
  17. package/components/checkout/cart/cart_entity/cart_entity_color_simple_products/cart-entity-color-simple-products.mixin.js +5 -3
  18. package/components/checkout/cart/cart_entity/cart_entity_prints/cart-entity-prints.vue +3 -0
  19. package/components/checkout/payment/payment-cart/payment-cart.scss +2 -2
  20. package/components/common/btn.vue +8 -1
  21. package/components/common/color-picker.vue +6 -1
  22. package/components/common/coupon_select/coupon-select.vue +29 -13
  23. package/components/common/file_uploader.vue +1 -1
  24. package/components/common/postcode_select/postcode-select.vue +2 -1
  25. package/components/common/pricing_discounts_table/pricing-discounts-table.vue +14 -5
  26. package/components/common/pricing_table/pricing-table.scss +1 -3
  27. package/components/common/pricing_table/pricing-table.vue +13 -4
  28. package/components/common/product_side_with_print/product-side-with-print.vue +2 -2
  29. package/components/common/products_list_dropdown/products-list-dropdown.vue +3 -1
  30. package/components/common/range/range.scss +23 -0
  31. package/components/common/range/range.vue +19 -0
  32. package/components/customer/signin_form/signin-form.vue +5 -2
  33. package/components/design/approve_design_tables/approve-design-tables.scss +3 -3
  34. package/components/design/approve_design_tables/approve-design-tables.vue +24 -13
  35. package/components/design/approve_design_tees/approve-design-tees.vue +18 -4
  36. package/components/editor/editor.vue +3 -2
  37. package/components/editor/editor_layers/editor_layer_forms/editor_layer_form_text/editor-layer-form-text.vue +3 -1
  38. package/components/editor/editor_layers/editor_layers_toolbar/editor-layers-toolbar.vue +1 -0
  39. package/components/editor/editor_pricing/editor-pricing.vue +3 -123
  40. package/components/editor/editor_pricing/editor_pricing_details/editor-pricing-details.scss +0 -0
  41. package/components/editor/editor_pricing/editor_pricing_details/editor-pricing-details.vue +29 -0
  42. package/components/editor/editor_pricing/editor_pricing_details/editor_pricing_details_prints/editor-pricing-details-prints.scss +41 -0
  43. package/components/editor/editor_pricing/editor_pricing_details/editor_pricing_details_prints/editor-pricing-details-prints.vue +119 -0
  44. package/components/editor/editor_pricing/editor_pricing_details/editor_pricing_details_products/editor-pricing-details-products.scss +41 -0
  45. package/components/editor/editor_pricing/editor_pricing_details/editor_pricing_details_products/editor-pricing-details-products.vue +101 -0
  46. package/components/editor/editor_print_area_options/editor-print-area-options.vue +16 -15
  47. package/components/editor/editor_print_area_options/editor_print_area_option/editor-print-area-option.vue +12 -12
  48. package/components/editor/editor_product_details/editor-product-details.scss +1 -1
  49. package/components/editor/editor_product_details/editor-product-details.vue +22 -10
  50. package/components/editor/editor_workspace/editor-workspace.vue +10 -5
  51. package/components/editor/editor_workspace/editor_workspace_side/editor-workspace-side.vue +9 -5
  52. package/components/modals/cart_modal/cart-modal.vue +1 -1
  53. package/components/modals/order_modal/order-modal.vue +5 -7
  54. package/components/modals/payment_modal/payment-modal.vue +1 -1
  55. package/components/pricing/pricing_digital_printing/pricing-digital-printing.vue +1 -4
  56. package/components/pricing/pricing_example/pricing-example.scss +4 -1
  57. package/components/pricing/pricing_example/pricing-example.vue +106 -26
  58. package/components/pricing/pricing_garment/pricing-garment.scss +44 -31
  59. package/components/pricing/pricing_garment/pricing-garment.vue +24 -10
  60. package/components/pricing/pricing_main_section/pricing-main-section.scss +0 -1
  61. package/components/pricing/pricing_main_section/pricing-main-section.vue +6 -17
  62. package/components/pricing/pricing_print/pricing-print.scss +1 -1
  63. package/components/pricing/pricing_print/pricing-print.vue +19 -7
  64. package/components/pricing/pricing_products_calculator/pricing-products-calculator.scss +64 -0
  65. package/components/pricing/pricing_products_calculator/pricing-products-calculator.vue +86 -0
  66. package/components/pricing/pricing_products_calculator/pricing_product_calculator/pricing-product-calculator.scss +58 -0
  67. package/components/pricing/pricing_products_calculator/pricing_product_calculator/pricing-product-calculator.vue +296 -0
  68. package/components/pricing/pricing_products_calculator/pricing_product_calculator/pricing_product_print_calculator/pricing-product-print-calculator.scss +1 -0
  69. package/components/pricing/pricing_products_calculator/pricing_product_calculator/pricing_product_print_calculator/pricing-product-print-calculator.vue +26 -0
  70. package/components/pricing/pricing_products_calculator/pricing_product_calculator/print_size_icon/print-size-icon.scss +34 -0
  71. package/components/pricing/pricing_products_calculator/pricing_product_calculator/print_size_icon/print-size-icon.vue +55 -0
  72. package/components/pricing/pricing_screen_print/pricing-screen-print.vue +6 -3
  73. package/components/pricing/pricing_screen_printing/pricing-screen-printing.vue +1 -2
  74. package/components/product/gallery/gallery.scss +168 -0
  75. package/components/product/gallery/gallery.vue +252 -0
  76. package/components/product/layouts/product_fabric_and_size_info/product-fabric-and-size-info.vue +8 -6
  77. package/components/product/layouts/product_gallery/product-gallery.vue +10 -3
  78. package/components/product/layouts/product_size_table/product-size-table.vue +16 -39
  79. package/components/product/layouts/product_tier_prices/product-tier-prices.vue +3 -2
  80. package/components/product/product.vue +16 -5
  81. package/components/product/product_price_range/product-price-range.vue +20 -4
  82. package/components/product/product_prints_price_info/product_print_price_info/product_print_price_info_item/product-print-price-info-item.vue +14 -2
  83. package/components/product/product_prints_price_info/product_screen_print_price_info/product-screen-print-price-info.scss +5 -0
  84. package/components/product/product_prints_price_info/product_screen_print_price_info/product-screen-print-price-info.vue +53 -12
  85. package/components/product/product_sizes_info/product-sizes-info.vue +13 -2
  86. package/components/product/related_products/related-products.scss +34 -0
  87. package/components/product/related_products/related-products.vue +52 -0
  88. package/components/products/product_list/product-list.scss +2 -1
  89. package/components/products/product_list_product/product-list-product.scss +44 -20
  90. package/components/products/product_list_product/product-list-product.vue +6 -4
  91. package/components/products/products_aside/products-aside.vue +29 -4
  92. package/components/products/products_brands/products-brands.vue +9 -2
  93. package/components/products/products_filters/products-filters.vue +12 -5
  94. package/components/products/products_tags/products-tags.vue +7 -0
  95. package/components/products/products_types/products-types.vue +6 -1
  96. package/components/subscribe/subscribe.vue +3 -0
  97. package/mixins/product-preview.js +7 -1
  98. package/package.json +1 -1
  99. package/plugins/vee-validate.js +2 -1
  100. package/plugins/vue-recaptcha.js +4 -1
  101. package/static/icons/{back_hoodie_a4_v.svg → back_hoodie_a4.svg} +0 -0
  102. package/static/icons/{back_hoodie_half_a4_h.svg → back_hoodie_half_a4.svg} +0 -0
  103. package/static/icons/{back_hoodie_rect10_l.svg → back_hoodie_rect10.svg} +0 -0
  104. package/static/icons/{back_polo_a4_v.svg → back_polo_a4.svg} +0 -0
  105. package/static/icons/{back_polo_half_a4_h.svg → back_polo_half_a4.svg} +0 -0
  106. package/static/icons/{back_polo_rect10_l.svg → back_polo_rect10.svg} +0 -0
  107. package/static/icons/{back_tee_a4_v.svg → back_tee_a4.svg} +0 -0
  108. package/static/icons/{back_tee_half_a4_h.svg → back_tee_half_a4.svg} +0 -0
  109. package/static/icons/{back_tee_rect10_l.svg → back_tee_rect10.svg} +0 -0
  110. package/static/icons/{front_hoodie_a4_v.svg → front_hoodie_a4.svg} +0 -0
  111. package/static/icons/{front_hoodie_half_a4_h.svg → front_hoodie_half_a4.svg} +0 -0
  112. package/static/icons/{front_hoodie_rect10_l.svg → front_hoodie_rect10.svg} +0 -0
  113. package/static/icons/{front_polo_a4_v.svg → front_polo_a4.svg} +0 -0
  114. package/static/icons/{front_polo_half_a4_h.svg → front_polo_half_a4.svg} +0 -0
  115. package/static/icons/{front_polo_rect10_l.svg → front_polo_rect10.svg} +0 -0
  116. package/static/icons/{front_tee_a4_v.svg → front_tee_a4.svg} +0 -0
  117. package/static/icons/{front_tee_half_a4_h.svg → front_tee_half_a4.svg} +0 -0
  118. package/static/icons/{front_tee_rect10_l.svg → front_tee_rect10.svg} +0 -0
  119. package/store/index.js +3 -1
  120. package/store/product.js +26 -15
  121. package/components/pricing/pricing_print/discounts_table/discounts-table.scss +0 -8
  122. package/components/pricing/pricing_print/discounts_table/discounts-table.vue +0 -91
  123. package/components/pricing/pricing_screen_print/discounts_table/discounts-table.scss +0 -14
  124. package/components/pricing/pricing_screen_print/discounts_table/discounts-table.vue +0 -78
@@ -5,6 +5,18 @@
5
5
  <div
6
6
  data-aos="aosFadeLeft"
7
7
  class="col-sm-5 col-12 PricingExample__col">
8
+ <div class="PricingExample__tabs">
9
+ <btn
10
+ :btn-class="availablePrintType === 'full colour print' ? 'green' : 'white'"
11
+ btn-label="Digital printing"
12
+ @onclick="changeAvailablePrintType('full colour print')">
13
+ </btn>
14
+ <btn
15
+ :btn-class="availablePrintType === 'screen print' ? 'green' : 'white'"
16
+ btn-label="Screen printing"
17
+ @onclick="changeAvailablePrintType('screen print')">
18
+ </btn>
19
+ </div>
8
20
  <h2 class="lc_h2">
9
21
  Example of price calculation
10
22
  </h2>
@@ -36,29 +48,41 @@
36
48
  <div class="PricingExample__example-formula-table">
37
49
  <table
38
50
  v-if="productPricing"
39
- class="lc_table col-2-highlighted tight-rows">
51
+ class="lc_table col-2-highlighted tight-rows layout-auto">
40
52
  <tbody>
41
53
  <tr>
42
- <td>Tees [AS Colour Staple Tee]:</td>
43
- <td>{{ productPricing.amount }} x {{ productPricing.products.products.price | price }} = {{ productPricing.products.products.totalPrice | price }}</td>
44
- <td>Total cost:</td>
45
- </tr>
46
- <tr>
47
- <td>Front Print [Half-A4]:</td>
48
- <td>{{ productPricing.amount }} x {{ printsPricing.front.price | price }} = {{ printsPricing.front.totalPrice | price }}</td>
49
- <td>
54
+ <td class="lc_regular13">
55
+ Tees [AS Colour Staple Tee]:
56
+ </td>
57
+ <td class="lc_regular13 lc_bold">
58
+ {{ productPricing.amount }} x {{ productPricing.products.products.price | price }} = {{ productPricing.products.products.totalPrice | price }}
59
+ </td>
60
+ <td :rowspan="1 + printsPricing.length">
61
+ Total cost:
50
62
  <div class="PricingExample__example-total-price">
51
63
  {{ productPricing.totalPrice | price }}
52
64
  </div>
53
65
  <div class="PricingExample__example-tax">
54
66
  Inclusive of GST: {{ productPricing.tax.totalPrice | price }}
55
67
  </div>
68
+ <div class="mt-10">
69
+ + Delivery
70
+ </div>
56
71
  </td>
57
72
  </tr>
58
- <tr>
59
- <td>Back Print [A3]:</td>
60
- <td>{{ productPricing.amount }} x {{ printsPricing.back.price | price }} = {{ printsPricing.back.totalPrice | price }}</td>
61
- <td>+ Delivery</td>
73
+ <tr
74
+ v-for="(print, index) in printsPricing"
75
+ :key="index">
76
+ <td class="lc_regular13">
77
+ {{ print.printArea.name }} [{{ print.printSize.name }}]:
78
+ </td>
79
+ <td class="lc_regular13 lc_bold">
80
+ {{ productPricing.amount }} x {{ print.price | price }}
81
+ <span v-if="print.setupPrice > 0">
82
+ + {{ print.setupPrice| price }}
83
+ </span>
84
+ = {{ print.totalPrice | price }}
85
+ </td>
62
86
  </tr>
63
87
  </tbody>
64
88
  </table>
@@ -71,30 +95,86 @@
71
95
  </template>
72
96
 
73
97
  <script>
74
- import productsPrice from '@lancom/shared/mixins/products-price';
75
- import { PRODUCT_TYPES } from '@lancom/shared/assets/js/constants/product';
98
+ import api from '@lancom/shared/assets/js/api';
99
+ import { getPrintAreasSizes, getPrintAreaSizes } from '@lancom/shared/assets/js/utils/prints';
100
+ import { getProductsForCalculatePricing, generateProductLink } from '@lancom/shared/assets/js/utils/product';
101
+ import { price } from '@lancom/shared/assets/js/utils/filters';
102
+ import { mapGetters } from 'vuex';
76
103
 
77
104
  export default {
78
105
  name: 'PricingExample',
79
- mixins: [
80
- productsPrice
81
- ],
106
+ filters: {
107
+ price
108
+ },
82
109
  props: {
83
- products: {
84
- type: Array,
110
+ product: {
111
+ type: Object,
85
112
  required: true
86
113
  }
87
114
  },
88
115
  data() {
116
+ const simpleProduct = [...this.product.simpleProducts].sort((a, b) => a.maxPrice - b.maxPrice)[0];
89
117
  return {
90
- amount: 20,
91
- front: { printArea: 'half_a4_h' },
92
- back: { printArea: 'a3' },
93
- product: null
118
+ simpleProduct: { ...simpleProduct, amount: 55 },
119
+ labels: {
120
+ 'screen print': 'Screen Print',
121
+ 'full colour print': 'Digital Print'
122
+ },
123
+ productPricing: null,
124
+ availablePrintType: 'full colour print',
125
+ postcode: null,
126
+ sides: [{
127
+ type: 'front',
128
+ printSize: 'rect10',
129
+ printSizes: getPrintAreasSizes(this.product.printAreas, 'front'),
130
+ colorsQuantity: 1,
131
+ hasUnderbase: false
132
+ }, {
133
+ type: 'back',
134
+ printSize: 'a4',
135
+ printSizes: getPrintAreasSizes(this.product.printAreas, 'back'),
136
+ colorsQuantity: 1,
137
+ hasUnderbase: false
138
+ }]
94
139
  };
95
140
  },
96
- created() {
97
- this.product = this.products.find(p => p.productType.alias === PRODUCT_TYPES.TEE);
141
+ computed: {
142
+ ...mapGetters(['shop']),
143
+ printsPricing() {
144
+ return this.productPricing?.products[this.product._id]?.prints.prints || [];
145
+ }
146
+ },
147
+ mounted() {
148
+ this.calculatePricing();
149
+ },
150
+ methods: {
151
+ async calculatePricing() {
152
+ const prints = this.generateSidesPrints();
153
+ const layers = prints.map(({ printType, printSize, printArea }) => ({ printType: printType?._id, printSize: printSize?._id, printArea: printArea?._id }));
154
+ const entities = getProductsForCalculatePricing(this.product, [this.simpleProduct], layers, true, true);
155
+ this.productPricing = await api.calculateProductPrice({ entities }, this.shop._id);
156
+ },
157
+ generateSidesPrints() {
158
+ return this.sides
159
+ .filter(({ printSize }) => printSize)
160
+ .map(side => {
161
+ const printType = this.getSidePrintType(side, this.availablePrintType) || {};
162
+ const printSize = side.printSizes.find(({ alias }) => alias === side.printSize);
163
+ const printArea = this.product.printAreas.find(printArea => getPrintAreaSizes(printArea).some(({ _id }) => _id === printSize?._id));
164
+ return { printType, printSize, printArea };
165
+ });
166
+ },
167
+ getSidePrintType(side, type) {
168
+ return this.product.printTypes.find(printType => type === printType.type && (type === 'full colour print' || (printType.colorsQuantity === side.colorsQuantity && !!printType.hasUnderbase === !!side.hasUnderbase)));
169
+ },
170
+ goToEditor() {
171
+ const link = generateProductLink(this.product, null, true);
172
+ this.$router.push(link);
173
+ },
174
+ changeAvailablePrintType(type) {
175
+ this.availablePrintType = type;
176
+ this.calculatePricing();
177
+ }
98
178
  }
99
179
  };
100
180
  </script>
@@ -20,41 +20,54 @@ $product_types: tee, hoodie, polo;
20
20
  grid-column-gap: 8px;
21
21
  }
22
22
  &-type {
23
- border-radius: 5px;
24
- padding: 78px 25px 16px 25px;
25
- text-align: center;
26
- font-size: 14px;
27
- line-height: 21px;
28
- color: $gray;
29
- background-color: #FFFFFF;
30
23
  position: relative;
31
- cursor: pointer;
32
- transition: background-color .22s ease-in-out;
33
- &:before {
34
- content: '';
35
- position: absolute;
36
- top: 16px;
37
- left: 0;
38
- height: 50px;
39
- width: 100%;
40
- background-repeat: no-repeat;
41
- background-size: contain;
42
- background-position: center;
43
- }
44
- &.active {
45
- background-color: $light_gray;
46
- }
47
- &.disabled {
48
- opacity: .2;
49
- pointer-events: none;
50
- }
51
-
52
- @each $type in $product_types {
53
- &.#{$type}:before {
54
- background-image: url(../../../static/icons/product_#{$type}.svg);
24
+ &-info {
25
+ border-radius: 5px;
26
+ padding: 78px 25px 16px 25px;
27
+ text-align: center;
28
+ font-size: 14px;
29
+ line-height: 21px;
30
+ color: $gray;
31
+ background-color: #FFFFFF;
32
+ position: relative;
33
+ cursor: pointer;
34
+ transition: background-color .22s ease-in-out;
35
+ &:before {
36
+ content: '';
37
+ position: absolute;
38
+ top: 16px;
39
+ left: 0;
40
+ height: 50px;
41
+ width: 100%;
42
+ background-repeat: no-repeat;
43
+ background-size: contain;
44
+ background-position: center;
45
+ }
46
+ &.active {
47
+ background-color: $light_gray;
48
+ }
49
+ &.disabled {
50
+ opacity: .2;
51
+ pointer-events: none;
52
+ }
53
+ @each $type in $product_types {
54
+ &.#{$type}:before {
55
+ background-image: url(../../../static/icons/product_#{$type}.svg);
56
+ }
55
57
  }
56
58
  }
57
59
  }
60
+ &-placeholder {
61
+ font-size: 14px;
62
+ line-height: 150%;
63
+ text-align: center;
64
+ color: $black;
65
+ position: absolute;
66
+ text-align: center;
67
+ top: 20px;
68
+ left: 0;
69
+ right: 0;
70
+ }
58
71
  }
59
72
  &__table-container {
60
73
  margin-top: 20px;
@@ -12,20 +12,31 @@
12
12
  <div
13
13
  v-for="item in productTypes"
14
14
  :key="item.type"
15
- class="PricingGarment__product-type"
16
- :class="{
17
- [item.type]: true,
18
- active: item.product === product,
19
- disabled: !item.product
20
- }"
21
- @click="product = item.product">
22
- {{ item.label }}
15
+ class="PricingGarment__product-type">
16
+ <div
17
+ class="PricingGarment__product-type-info"
18
+ :class="{
19
+ disabled: !item.product,
20
+ [item.type]: true,
21
+ active: item.product === product
22
+ }"
23
+ @click="product = item.product">
24
+ {{ item.label }}
25
+ </div>
26
+ <div
27
+ v-if="!item.product"
28
+ class="PricingGarment__product-placeholder">
29
+ Pricing <br /> coming soon
30
+ </div>
23
31
  </div>
24
32
  </div>
25
33
  <div
26
34
  v-if="product"
27
35
  class="PricingGarment__table-container">
28
- <pricing-discounts-table :prices="product.pricing" />
36
+ <pricing-discounts-table
37
+ :prices="simpleProduct.pricing"
38
+ :bordered="false"
39
+ :striped="true" />
29
40
  </div>
30
41
  </div>
31
42
  <div
@@ -72,8 +83,11 @@ export default {
72
83
  }));
73
84
  },
74
85
  imageBackground() {
75
- const image = getColorImage(this.product, 'large', 'pricing') || getColorImage(this.product, 'large', 'front');
86
+ const image = getColorImage(this.product, 'large', 'pricing', null, true) || getColorImage(this.product, 'large', 'front', null, true);
76
87
  return image && `url('${image}')`;
88
+ },
89
+ simpleProduct() {
90
+ return [...this.product.simpleProducts].sort((a, b) => a.maxPrice - b.maxPrice)[0];
77
91
  }
78
92
  },
79
93
  mounted() {
@@ -26,7 +26,6 @@
26
26
  &__content {
27
27
  box-shadow: 10px 10px 30px rgba(75, 75, 75, 0.05);
28
28
  border-radius: 5px;
29
- overflow: hidden;
30
29
  margin-top: -200px;
31
30
  padding: 0 0 0 0;
32
31
  z-index: 1;
@@ -16,19 +16,10 @@
16
16
  <div class="PricingMainSection__content col-sm-12 col-12 mr-auto ml-auto">
17
17
  <div class="PricingMainSection__content-col row">
18
18
  <div class="col-12">
19
- <div class="row">
20
- <div class="col-12">
21
- <div class="lc_h3 lc_text-centered">
22
- Compare Printing Quotes
23
- </div>
24
- </div>
25
- </div>
26
- </div>
27
- <div class="col-12 col-sm-6">
28
- <pricing-digital-printing :products="products" />
29
- </div>
30
- <div class="col-12 col-sm-6">
31
- <pricing-screen-printing :products="products" />
19
+ <pricing-products-calculator
20
+ v-if="products.length > 0"
21
+ class="Pricing__section"
22
+ :products="products" />
32
23
  </div>
33
24
  </div>
34
25
  </div>
@@ -38,14 +29,12 @@
38
29
  </template>
39
30
 
40
31
  <script>
41
- import PricingDigitalPrinting from '@lancom/shared/components/pricing/pricing_digital_printing/pricing-digital-printing';
42
- import PricingScreenPrinting from '@lancom/shared/components/pricing/pricing_screen_printing/pricing-screen-printing';
32
+ import PricingProductsCalculator from '@lancom/shared/components/pricing/pricing_products_calculator/pricing-products-calculator';
43
33
 
44
34
  export default {
45
35
  name: 'PricingMainSection',
46
36
  components: {
47
- PricingScreenPrinting,
48
- PricingDigitalPrinting
37
+ PricingProductsCalculator
49
38
  },
50
39
  props: {
51
40
  products: {
@@ -17,7 +17,7 @@
17
17
  &__table-container {
18
18
  margin-top: 20px;
19
19
  padding: 32px 36px;
20
- border: 2px solid $light_gray;
20
+ // border: 2px solid $light_gray;
21
21
  border-radius: 5px;
22
22
  @media (max-width: $bp-extra-small-max) {
23
23
  ::v-deep tr, ::v-deep th, ::v-deep td {
@@ -4,12 +4,15 @@
4
4
  <div class="row PricingPrint__content">
5
5
  <div
6
6
  data-aos="aosFadeLeft"
7
- class="col-12 PricingPrint__col">
7
+ class="col-sm-4 col-12 PricingPrint__col">
8
8
  <h2 class="lc_h2">
9
- Digital printing price list
9
+ Digital print pricing
10
10
  </h2>
11
11
  <p class="PricingPrint__description">
12
- No setup costs. No minimum quantity. Price as per the print area
12
+ Smaller prints means we use less ink, more tees means we save time on order handling.
13
+ </p>
14
+ <p class="PricingPrint__description">
15
+ If you have a wholesale enquiry for <b>125 tees</b> or more, we can also screen print your tees with prices starting from <b>$2</b> to <b>$5</b> per print.
13
16
  </p>
14
17
  <div class="form-actions pull-left">
15
18
  <btn
@@ -21,9 +24,12 @@
21
24
  </div>
22
25
  <div
23
26
  data-aos="aosFadeRight"
24
- class="col-12 PricingPrint__col">
27
+ class="col-sm-8 col-12 PricingPrint__col">
25
28
  <div class="PricingPrint__table-container">
26
- <discounts-table :product="product" />
29
+ <product-print-price-info-item
30
+ :print="printType"
31
+ :visible-table-name="false"
32
+ :bordered="true" />
27
33
  </div>
28
34
  </div>
29
35
  </div>
@@ -33,18 +39,24 @@
33
39
 
34
40
  <script>
35
41
  import ContactUs from '@lancom/shared/components/asides/contact_us/contact-us';
36
- import DiscountsTable from './discounts_table/discounts-table';
42
+ import ProductPrintPriceInfoItem from '@lancom/shared/components/product/product_prints_price_info/product_print_price_info/product_print_price_info_item/product-print-price-info-item';
43
+ import { PRINT_TYPES } from '@lancom/shared/assets/js/constants/print-type';
37
44
 
38
45
  export default {
39
46
  name: 'PricingPrint',
40
47
  components: {
41
- DiscountsTable
48
+ ProductPrintPriceInfoItem
42
49
  },
43
50
  props: {
44
51
  product: {
45
52
  type: Object
46
53
  }
47
54
  },
55
+ computed: {
56
+ printType() {
57
+ return (this.product.printTypes || []).find(({ type }) => type === PRINT_TYPES.FULL_COLOUR);
58
+ }
59
+ },
48
60
  methods: {
49
61
  contactUs() {
50
62
  this.$aside.show(ContactUs);
@@ -0,0 +1,64 @@
1
+ @import "@/assets/scss/variables";
2
+ $product_types: tee, hoodie, polo;
3
+
4
+ .PricingProductsCalculator {
5
+ &__info {
6
+ margin-top: 30px;
7
+ }
8
+ &__product {
9
+ &-types {
10
+ display: grid;
11
+ grid-template-columns: repeat(3, 1fr);
12
+ grid-column-gap: 8px;
13
+ }
14
+ &-type {
15
+ position: relative;
16
+ &-info {
17
+ border-radius: 5px;
18
+ padding: 78px 25px 16px 25px;
19
+ text-align: center;
20
+ font-size: 14px;
21
+ line-height: 21px;
22
+ color: $gray;
23
+ background-color: #FFFFFF;
24
+ position: relative;
25
+ cursor: pointer;
26
+ transition: background-color .22s ease-in-out;
27
+ &:before {
28
+ content: '';
29
+ position: absolute;
30
+ top: 16px;
31
+ left: 0;
32
+ height: 50px;
33
+ width: 100%;
34
+ background-repeat: no-repeat;
35
+ background-size: contain;
36
+ background-position: center;
37
+ }
38
+ &.active {
39
+ background-color: $light_gray;
40
+ }
41
+ &.disabled {
42
+ opacity: .2;
43
+ pointer-events: none;
44
+ }
45
+ @each $type in $product_types {
46
+ &.#{$type}:before {
47
+ background-image: url(../../../static/icons/product_#{$type}.svg);
48
+ }
49
+ }
50
+ }
51
+ }
52
+ &-placeholder {
53
+ font-size: 14px;
54
+ line-height: 150%;
55
+ text-align: center;
56
+ color: $black;
57
+ position: absolute;
58
+ text-align: center;
59
+ top: 20px;
60
+ left: 0;
61
+ right: 0;
62
+ }
63
+ }
64
+ }
@@ -0,0 +1,86 @@
1
+ <template>
2
+ <section class="PricingProductsCalculator__wrapper">
3
+ <div class="col-12">
4
+ <div class="lc_h3">
5
+ Choose Product
6
+ </div>
7
+ <div class="PricingProductsCalculator__product-types">
8
+ <div
9
+ v-for="item in productTypes"
10
+ :key="item.type"
11
+ class="PricingProductsCalculator__product-type">
12
+ <div
13
+ class="PricingProductsCalculator__product-type-info"
14
+ :class="{
15
+ disabled: !item.product,
16
+ [item.type]: true,
17
+ active: item.product === activeProduct
18
+ }"
19
+ @click="activeProduct = item.product">
20
+ {{ item.label }}
21
+ <div
22
+ v-if="item.product"
23
+ class="lc_h3">
24
+ <product-price-range
25
+ :product="item.product"
26
+ :with-gst="true"
27
+ :without-gst="false"
28
+ :visible-price-info="false"
29
+ range-divider="to" />
30
+ </div>
31
+ </div>
32
+ <div
33
+ v-if="!item.product"
34
+ class="PricingProductsCalculator__product-placeholder">
35
+ Pricing <br /> coming soon
36
+ </div>
37
+ </div>
38
+ </div>
39
+ </div>
40
+ <div class="PricingProductsCalculator__info">
41
+ <pricing-product-calculator :product="activeProduct" />
42
+ </div>
43
+ </section>
44
+ </template>
45
+
46
+ <script>
47
+ import { PRODUCT_TYPES_LIST, PRODUCT_TYPES } from '@lancom/shared/assets/js/constants/product';
48
+ import ProductPriceRange from '@lancom/shared/components/product/product_price_range/product-price-range';
49
+ import PricingProductCalculator from './pricing_product_calculator/pricing-product-calculator';
50
+
51
+ export default {
52
+ name: 'PricingProductsCalculator',
53
+ components: {
54
+ PricingProductCalculator,
55
+ ProductPriceRange
56
+ },
57
+ props: {
58
+ products: {
59
+ type: Array,
60
+ required: true
61
+ }
62
+ },
63
+ data() {
64
+ return {
65
+ activeProduct: this.findProductByType(PRODUCT_TYPES.TEE)
66
+ };
67
+ },
68
+ computed: {
69
+ productTypes() {
70
+ return PRODUCT_TYPES_LIST.map(item => ({
71
+ ...item,
72
+ product: this.findProductByType(item.type)
73
+ }));
74
+ }
75
+ },
76
+ methods: {
77
+ findProductByType(type) {
78
+ return this.products.find(p => p.productType?.alias === type);
79
+ }
80
+ }
81
+ };
82
+ </script>
83
+
84
+ <style lang="scss" scoped>
85
+ @import 'pricing-products-calculator';
86
+ </style>
@@ -0,0 +1,58 @@
1
+ @import "@/assets/scss/variables";
2
+
3
+ .PricingProductCalculator {
4
+ &__prints {
5
+ margin-top: 20px;
6
+ }
7
+ &__icon {
8
+ height: 180px;
9
+ }
10
+ &__print-sizes {
11
+ display: flex;
12
+ width: 260px;
13
+ align-items: center;
14
+ flex-wrap: wrap;
15
+ }
16
+ &__print-size {
17
+ font-size: 16px;
18
+ line-height: 170%;
19
+ text-align: center;
20
+ color: $black;
21
+ background-color: $grey_3;
22
+ padding: 10px;
23
+ width: 120px;
24
+ margin: 4px;
25
+ cursor: pointer;
26
+ &--active {
27
+ color: $white;
28
+ background-color: $green;
29
+ }
30
+ &--full {
31
+ width: 248px;
32
+ }
33
+ }
34
+ &__delivery {
35
+ display: flex;
36
+ align-items: center;
37
+ &-postcode {
38
+ width: 300px;
39
+ margin-top: 15px;
40
+ margin-left: 20px;
41
+ }
42
+ }
43
+ &__breakdown {
44
+ font-size: 12px;
45
+ color: $gray;
46
+ border-bottom: 1px dashed $gray;
47
+ cursor: pointer;
48
+ }
49
+ &__cost {
50
+ font-size: 17px;
51
+ color: $black;
52
+ }
53
+ &__reprint {
54
+ font-size: 15px;
55
+ color: $gray;
56
+ margin-top: 10px;
57
+ }
58
+ }