@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.
- package/assets/js/api/admin.js +3 -0
- package/assets/js/models/print-area.js +17 -13
- package/assets/js/models/product-layers.js +6 -5
- package/assets/js/utils/cart.js +1 -0
- package/assets/js/utils/custom-validation-rules.js +7 -0
- package/assets/js/utils/fabric/wireframe.js +4 -4
- package/assets/js/utils/fabric-helper.js +7 -7
- package/assets/js/utils/filters.js +7 -1
- package/assets/js/utils/order.js +3 -3
- package/assets/js/utils/prints.js +15 -4
- package/assets/js/utils/product.js +7 -6
- package/assets/js/utils/products-grouping/by-colors.js +22 -18
- package/assets/scss/ui_kit/_table.scss +3 -0
- package/assets/scss/ui_kit/_typography.scss +6 -0
- package/components/asides/contact_us/contact-us.vue +3 -0
- package/components/asides/offer_screen_printing/offer-screen-printing.vue +22 -12
- package/components/checkout/cart/cart_entity/cart_entity_color_simple_products/cart-entity-color-simple-products.mixin.js +5 -3
- package/components/checkout/cart/cart_entity/cart_entity_prints/cart-entity-prints.vue +3 -0
- package/components/checkout/payment/payment-cart/payment-cart.scss +2 -2
- package/components/common/btn.vue +8 -1
- package/components/common/color-picker.vue +6 -1
- package/components/common/coupon_select/coupon-select.vue +29 -13
- package/components/common/file_uploader.vue +1 -1
- package/components/common/postcode_select/postcode-select.vue +2 -1
- package/components/common/pricing_discounts_table/pricing-discounts-table.vue +14 -5
- package/components/common/pricing_table/pricing-table.scss +1 -3
- package/components/common/pricing_table/pricing-table.vue +13 -4
- package/components/common/product_side_with_print/product-side-with-print.vue +2 -2
- package/components/common/products_list_dropdown/products-list-dropdown.vue +3 -1
- package/components/common/range/range.scss +23 -0
- package/components/common/range/range.vue +19 -0
- package/components/customer/signin_form/signin-form.vue +5 -2
- package/components/design/approve_design_tables/approve-design-tables.scss +3 -3
- package/components/design/approve_design_tables/approve-design-tables.vue +24 -13
- package/components/design/approve_design_tees/approve-design-tees.vue +18 -4
- package/components/editor/editor.vue +3 -2
- package/components/editor/editor_layers/editor_layer_forms/editor_layer_form_text/editor-layer-form-text.vue +3 -1
- package/components/editor/editor_layers/editor_layers_toolbar/editor-layers-toolbar.vue +1 -0
- package/components/editor/editor_pricing/editor-pricing.vue +3 -123
- package/components/editor/editor_pricing/editor_pricing_details/editor-pricing-details.scss +0 -0
- package/components/editor/editor_pricing/editor_pricing_details/editor-pricing-details.vue +29 -0
- package/components/editor/editor_pricing/editor_pricing_details/editor_pricing_details_prints/editor-pricing-details-prints.scss +41 -0
- package/components/editor/editor_pricing/editor_pricing_details/editor_pricing_details_prints/editor-pricing-details-prints.vue +119 -0
- package/components/editor/editor_pricing/editor_pricing_details/editor_pricing_details_products/editor-pricing-details-products.scss +41 -0
- package/components/editor/editor_pricing/editor_pricing_details/editor_pricing_details_products/editor-pricing-details-products.vue +101 -0
- package/components/editor/editor_print_area_options/editor-print-area-options.vue +16 -15
- package/components/editor/editor_print_area_options/editor_print_area_option/editor-print-area-option.vue +12 -12
- package/components/editor/editor_product_details/editor-product-details.scss +1 -1
- package/components/editor/editor_product_details/editor-product-details.vue +22 -10
- package/components/editor/editor_workspace/editor-workspace.vue +10 -5
- package/components/editor/editor_workspace/editor_workspace_side/editor-workspace-side.vue +9 -5
- package/components/modals/cart_modal/cart-modal.vue +1 -1
- package/components/modals/order_modal/order-modal.vue +5 -7
- package/components/modals/payment_modal/payment-modal.vue +1 -1
- package/components/pricing/pricing_digital_printing/pricing-digital-printing.vue +1 -4
- package/components/pricing/pricing_example/pricing-example.scss +4 -1
- package/components/pricing/pricing_example/pricing-example.vue +106 -26
- package/components/pricing/pricing_garment/pricing-garment.scss +44 -31
- package/components/pricing/pricing_garment/pricing-garment.vue +24 -10
- package/components/pricing/pricing_main_section/pricing-main-section.scss +0 -1
- package/components/pricing/pricing_main_section/pricing-main-section.vue +6 -17
- package/components/pricing/pricing_print/pricing-print.scss +1 -1
- package/components/pricing/pricing_print/pricing-print.vue +19 -7
- package/components/pricing/pricing_products_calculator/pricing-products-calculator.scss +64 -0
- package/components/pricing/pricing_products_calculator/pricing-products-calculator.vue +86 -0
- package/components/pricing/pricing_products_calculator/pricing_product_calculator/pricing-product-calculator.scss +58 -0
- package/components/pricing/pricing_products_calculator/pricing_product_calculator/pricing-product-calculator.vue +296 -0
- package/components/pricing/pricing_products_calculator/pricing_product_calculator/pricing_product_print_calculator/pricing-product-print-calculator.scss +1 -0
- package/components/pricing/pricing_products_calculator/pricing_product_calculator/pricing_product_print_calculator/pricing-product-print-calculator.vue +26 -0
- package/components/pricing/pricing_products_calculator/pricing_product_calculator/print_size_icon/print-size-icon.scss +34 -0
- package/components/pricing/pricing_products_calculator/pricing_product_calculator/print_size_icon/print-size-icon.vue +55 -0
- package/components/pricing/pricing_screen_print/pricing-screen-print.vue +6 -3
- package/components/pricing/pricing_screen_printing/pricing-screen-printing.vue +1 -2
- package/components/product/gallery/gallery.scss +168 -0
- package/components/product/gallery/gallery.vue +252 -0
- package/components/product/layouts/product_fabric_and_size_info/product-fabric-and-size-info.vue +8 -6
- package/components/product/layouts/product_gallery/product-gallery.vue +10 -3
- package/components/product/layouts/product_size_table/product-size-table.vue +16 -39
- package/components/product/layouts/product_tier_prices/product-tier-prices.vue +3 -2
- package/components/product/product.vue +16 -5
- package/components/product/product_price_range/product-price-range.vue +20 -4
- package/components/product/product_prints_price_info/product_print_price_info/product_print_price_info_item/product-print-price-info-item.vue +14 -2
- package/components/product/product_prints_price_info/product_screen_print_price_info/product-screen-print-price-info.scss +5 -0
- package/components/product/product_prints_price_info/product_screen_print_price_info/product-screen-print-price-info.vue +53 -12
- package/components/product/product_sizes_info/product-sizes-info.vue +13 -2
- package/components/product/related_products/related-products.scss +34 -0
- package/components/product/related_products/related-products.vue +52 -0
- package/components/products/product_list/product-list.scss +2 -1
- package/components/products/product_list_product/product-list-product.scss +44 -20
- package/components/products/product_list_product/product-list-product.vue +6 -4
- package/components/products/products_aside/products-aside.vue +29 -4
- package/components/products/products_brands/products-brands.vue +9 -2
- package/components/products/products_filters/products-filters.vue +12 -5
- package/components/products/products_tags/products-tags.vue +7 -0
- package/components/products/products_types/products-types.vue +6 -1
- package/components/subscribe/subscribe.vue +3 -0
- package/mixins/product-preview.js +7 -1
- package/package.json +1 -1
- package/plugins/vee-validate.js +2 -1
- package/plugins/vue-recaptcha.js +4 -1
- package/static/icons/{back_hoodie_a4_v.svg → back_hoodie_a4.svg} +0 -0
- package/static/icons/{back_hoodie_half_a4_h.svg → back_hoodie_half_a4.svg} +0 -0
- package/static/icons/{back_hoodie_rect10_l.svg → back_hoodie_rect10.svg} +0 -0
- package/static/icons/{back_polo_a4_v.svg → back_polo_a4.svg} +0 -0
- package/static/icons/{back_polo_half_a4_h.svg → back_polo_half_a4.svg} +0 -0
- package/static/icons/{back_polo_rect10_l.svg → back_polo_rect10.svg} +0 -0
- package/static/icons/{back_tee_a4_v.svg → back_tee_a4.svg} +0 -0
- package/static/icons/{back_tee_half_a4_h.svg → back_tee_half_a4.svg} +0 -0
- package/static/icons/{back_tee_rect10_l.svg → back_tee_rect10.svg} +0 -0
- package/static/icons/{front_hoodie_a4_v.svg → front_hoodie_a4.svg} +0 -0
- package/static/icons/{front_hoodie_half_a4_h.svg → front_hoodie_half_a4.svg} +0 -0
- package/static/icons/{front_hoodie_rect10_l.svg → front_hoodie_rect10.svg} +0 -0
- package/static/icons/{front_polo_a4_v.svg → front_polo_a4.svg} +0 -0
- package/static/icons/{front_polo_half_a4_h.svg → front_polo_half_a4.svg} +0 -0
- package/static/icons/{front_polo_rect10_l.svg → front_polo_rect10.svg} +0 -0
- package/static/icons/{front_tee_a4_v.svg → front_tee_a4.svg} +0 -0
- package/static/icons/{front_tee_half_a4_h.svg → front_tee_half_a4.svg} +0 -0
- package/static/icons/{front_tee_rect10_l.svg → front_tee_rect10.svg} +0 -0
- package/store/index.js +3 -1
- package/store/product.js +26 -15
- package/components/pricing/pricing_print/discounts_table/discounts-table.scss +0 -8
- package/components/pricing/pricing_print/discounts_table/discounts-table.vue +0 -91
- package/components/pricing/pricing_screen_print/discounts_table/discounts-table.scss +0 -14
- 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
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
<td
|
|
49
|
-
|
|
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
|
-
|
|
60
|
-
|
|
61
|
-
<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
|
|
75
|
-
import {
|
|
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
|
-
|
|
80
|
-
|
|
81
|
-
|
|
106
|
+
filters: {
|
|
107
|
+
price
|
|
108
|
+
},
|
|
82
109
|
props: {
|
|
83
|
-
|
|
84
|
-
type:
|
|
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:
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
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
|
-
|
|
97
|
-
|
|
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
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
background-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
background-
|
|
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
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
|
|
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() {
|
|
@@ -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
|
-
<
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
|
|
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
|
-
|
|
48
|
-
PricingDigitalPrinting
|
|
37
|
+
PricingProductsCalculator
|
|
49
38
|
},
|
|
50
39
|
props: {
|
|
51
40
|
products: {
|
|
@@ -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
|
|
9
|
+
Digital print pricing
|
|
10
10
|
</h2>
|
|
11
11
|
<p class="PricingPrint__description">
|
|
12
|
-
|
|
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
|
-
<
|
|
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
|
|
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
|
-
|
|
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
|
+
}
|