@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
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<table
|
|
2
|
+
<table
|
|
3
|
+
class="lc_table"
|
|
4
|
+
:class="{ bordered, striped }">
|
|
3
5
|
<thead class="centered">
|
|
4
6
|
<tr class="highlighted">
|
|
5
7
|
<th>Items</th>
|
|
@@ -14,7 +16,7 @@
|
|
|
14
16
|
active: amount >= range.min && ((range.max && amount <= range.max) || !range.max)
|
|
15
17
|
}">
|
|
16
18
|
<td>{{ (range.max >= 9999 || !range.max) ? `${range.min}+` : `${range.min}-${range.max}` }}</td>
|
|
17
|
-
<td>{{ range.price |
|
|
19
|
+
<td>{{ range.price | priceWithTax(pricingSettings) }}</td>
|
|
18
20
|
</tr>
|
|
19
21
|
</tbody>
|
|
20
22
|
</table>
|
|
@@ -22,13 +24,12 @@
|
|
|
22
24
|
|
|
23
25
|
<script>
|
|
24
26
|
import { mapGetters } from 'vuex';
|
|
25
|
-
import {
|
|
27
|
+
import { priceWithTax } from '@lancom/shared/assets/js/utils/filters';
|
|
26
28
|
|
|
27
29
|
export default {
|
|
28
30
|
name: 'PricingDiscountsTable',
|
|
29
31
|
filters: {
|
|
30
|
-
|
|
31
|
-
tax
|
|
32
|
+
priceWithTax
|
|
32
33
|
},
|
|
33
34
|
props: {
|
|
34
35
|
prices: {
|
|
@@ -38,6 +39,14 @@ export default {
|
|
|
38
39
|
amount: {
|
|
39
40
|
type: Number,
|
|
40
41
|
default: 0
|
|
42
|
+
},
|
|
43
|
+
bordered: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: false
|
|
46
|
+
},
|
|
47
|
+
striped: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
default: false
|
|
41
50
|
}
|
|
42
51
|
},
|
|
43
52
|
computed: {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div>
|
|
2
|
+
<div class="PricingTable_wrapper">
|
|
3
3
|
<table
|
|
4
|
-
class="lc_table
|
|
4
|
+
class="lc_table"
|
|
5
|
+
:class="{ bordered, striped }">
|
|
5
6
|
<thead class="centered">
|
|
6
7
|
<tr
|
|
7
8
|
class="highlighted"
|
|
@@ -35,7 +36,8 @@
|
|
|
35
36
|
|
|
36
37
|
<script>
|
|
37
38
|
import get from 'lodash.get';
|
|
38
|
-
import {
|
|
39
|
+
import { mapGetters } from 'vuex';
|
|
40
|
+
import { priceWithTax } from '@lancom/shared/assets/js/utils/filters';
|
|
39
41
|
|
|
40
42
|
export default {
|
|
41
43
|
name: 'PricingTable',
|
|
@@ -55,11 +57,18 @@ export default {
|
|
|
55
57
|
bordered: {
|
|
56
58
|
type: Boolean
|
|
57
59
|
},
|
|
60
|
+
striped: {
|
|
61
|
+
type: Boolean,
|
|
62
|
+
default: true
|
|
63
|
+
},
|
|
58
64
|
trLabel: {
|
|
59
65
|
type: String
|
|
60
66
|
}
|
|
61
67
|
},
|
|
62
68
|
computed: {
|
|
69
|
+
...mapGetters([
|
|
70
|
+
'pricingSettings'
|
|
71
|
+
]),
|
|
63
72
|
thList() {
|
|
64
73
|
return this.items.map(item => get(item, this.nameAttr));
|
|
65
74
|
},
|
|
@@ -125,7 +134,7 @@ export default {
|
|
|
125
134
|
const printType = this.items.find(item => printTypeName === get(item, this.nameAttr));
|
|
126
135
|
const pricing = get(printType, this.pricingAttr);
|
|
127
136
|
const item = pricing.find(({ min, max }) => (!min || range.min >= min) && (!max || range.min <= max));
|
|
128
|
-
return item ?
|
|
137
|
+
return item ? priceWithTax(item.price, this.pricingSettings) : '-';
|
|
129
138
|
}
|
|
130
139
|
}
|
|
131
140
|
};
|
|
@@ -85,8 +85,8 @@ export default {
|
|
|
85
85
|
return getColorImage(this.product, this.size, this.side, color) || getProductCover(this.product, this.size, this.side, color);
|
|
86
86
|
},
|
|
87
87
|
print() {
|
|
88
|
-
const {
|
|
89
|
-
return
|
|
88
|
+
const { printsThumbnails = {} } = this.product || {};
|
|
89
|
+
return printsThumbnails[this.side];
|
|
90
90
|
}
|
|
91
91
|
},
|
|
92
92
|
methods: {
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
<script>
|
|
30
30
|
import { mapGetters } from 'vuex';
|
|
31
31
|
import api from '@lancom/shared/assets/js/api';
|
|
32
|
+
import { generateProductLink } from '@lancom/shared/assets/js/utils/product';
|
|
32
33
|
import ProductsListDropdownOption from './products_list_dropdown_option/products-list-dropdown-option';
|
|
33
34
|
|
|
34
35
|
export default {
|
|
@@ -49,7 +50,8 @@ export default {
|
|
|
49
50
|
},
|
|
50
51
|
methods: {
|
|
51
52
|
select(product) {
|
|
52
|
-
|
|
53
|
+
const link = generateProductLink(product, null, true);
|
|
54
|
+
this.$router.push(link);
|
|
53
55
|
},
|
|
54
56
|
async loadProducts(text) {
|
|
55
57
|
try {
|
|
@@ -48,4 +48,27 @@ $height: 8px;
|
|
|
48
48
|
cursor: pointer;
|
|
49
49
|
z-index: 51;
|
|
50
50
|
}
|
|
51
|
+
&__from,
|
|
52
|
+
&__to {
|
|
53
|
+
position: absolute;
|
|
54
|
+
top: 20px;
|
|
55
|
+
font-size: 11px;
|
|
56
|
+
opacity: 0.7;
|
|
57
|
+
}
|
|
58
|
+
&__from {
|
|
59
|
+
left: -3px;
|
|
60
|
+
}
|
|
61
|
+
&__to {
|
|
62
|
+
right: -3px;
|
|
63
|
+
}
|
|
64
|
+
&__current-value {
|
|
65
|
+
bottom: -20px;
|
|
66
|
+
font-size: 14px;
|
|
67
|
+
font-weight: bold;
|
|
68
|
+
left: 0;
|
|
69
|
+
right: 0;
|
|
70
|
+
text-align: center;
|
|
71
|
+
position: absolute;
|
|
72
|
+
pointer-events: none;
|
|
73
|
+
}
|
|
51
74
|
}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="Range__wrapper no-select">
|
|
3
|
+
<div
|
|
4
|
+
v-if="visibleSteps"
|
|
5
|
+
class="Range__from">
|
|
6
|
+
{{ min }}
|
|
7
|
+
</div>
|
|
3
8
|
<div
|
|
4
9
|
ref="indicator"
|
|
5
10
|
class="Range__indicator">
|
|
@@ -17,6 +22,16 @@
|
|
|
17
22
|
class="Range__indicator-after"
|
|
18
23
|
:style="{ width: after }"
|
|
19
24
|
@click="handleClick"></div>
|
|
25
|
+
<div
|
|
26
|
+
v-if="visibleSteps"
|
|
27
|
+
class="Range__current-value">
|
|
28
|
+
{{ model }}
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
<div
|
|
32
|
+
v-if="visibleSteps"
|
|
33
|
+
class="Range__to">
|
|
34
|
+
{{ max }}
|
|
20
35
|
</div>
|
|
21
36
|
</div>
|
|
22
37
|
</template>
|
|
@@ -40,6 +55,10 @@ export default {
|
|
|
40
55
|
step: {
|
|
41
56
|
type: Number,
|
|
42
57
|
default: 1
|
|
58
|
+
},
|
|
59
|
+
visibleSteps: {
|
|
60
|
+
type: Boolean,
|
|
61
|
+
default: false
|
|
43
62
|
}
|
|
44
63
|
},
|
|
45
64
|
data() {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="form__wrapper SignInFrom__wrapper">
|
|
3
|
-
<validation-observer
|
|
3
|
+
<validation-observer
|
|
4
|
+
ref="form"
|
|
5
|
+
@keyup.enter="submit">
|
|
4
6
|
<div class="form__content mt-4">
|
|
5
7
|
<div class="row">
|
|
6
8
|
<div class="col-sm-6 col-12">
|
|
@@ -84,6 +86,7 @@
|
|
|
84
86
|
:btn-processing="processing"
|
|
85
87
|
:btn-disabled="processing"
|
|
86
88
|
:btn-block="true"
|
|
89
|
+
btn-type="button"
|
|
87
90
|
btn-label="Log in"
|
|
88
91
|
@onclick="submit()">
|
|
89
92
|
<i
|
|
@@ -121,7 +124,7 @@ export default {
|
|
|
121
124
|
this.error = null;
|
|
122
125
|
|
|
123
126
|
const isValid = await this.$refs.form.validate();
|
|
124
|
-
if (!isValid) {
|
|
127
|
+
if (!isValid || this.processing) {
|
|
125
128
|
return;
|
|
126
129
|
}
|
|
127
130
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<table class="lc_table bordered ApproveDesignTables__table">
|
|
4
4
|
<thead class="centered">
|
|
5
5
|
<tr class="stripped">
|
|
6
|
-
<th>
|
|
6
|
+
<th>Color</th>
|
|
7
7
|
<th>Design Front</th>
|
|
8
8
|
<th>Design Back</th>
|
|
9
9
|
<th>Products</th>
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
size="medium"
|
|
23
23
|
class="ApproveDesignTables__thumbnail" />
|
|
24
24
|
<div
|
|
25
|
-
v-if="!group.product.
|
|
25
|
+
v-if="!group.product.printsThumbnails.front"
|
|
26
26
|
class="ApproveDesignTables__no-design">
|
|
27
27
|
No design
|
|
28
28
|
</div>
|
|
29
|
-
<div v-if="group.product.
|
|
30
|
-
{{ group.product.
|
|
29
|
+
<div v-if="group.product.printsThumbnails.front">
|
|
30
|
+
{{ group.product.printsThumbnails.front | print }}
|
|
31
31
|
</div>
|
|
32
32
|
</td>
|
|
33
33
|
<td class="ApproveDesignTables__thumbnail-cell">
|
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
size="medium"
|
|
38
38
|
class="ApproveDesignTables__thumbnail" />
|
|
39
39
|
<div
|
|
40
|
-
v-if="!group.product.
|
|
40
|
+
v-if="!group.product.printsThumbnails.back"
|
|
41
41
|
class="ApproveDesignTables__no-design">
|
|
42
42
|
No design
|
|
43
43
|
</div>
|
|
44
|
-
<div v-if="group.product.
|
|
45
|
-
{{ group.product.
|
|
44
|
+
<div v-if="group.product.printsThumbnails.back">
|
|
45
|
+
{{ group.product.printsThumbnails.back | print }}
|
|
46
46
|
</div>
|
|
47
47
|
</td>
|
|
48
48
|
<td>
|
|
@@ -75,12 +75,12 @@
|
|
|
75
75
|
</thead>
|
|
76
76
|
<tbody class="centered">
|
|
77
77
|
<tr
|
|
78
|
-
v-for="product in
|
|
78
|
+
v-for="product in simpleProducts"
|
|
79
79
|
:key="product._id">
|
|
80
|
-
<td>{{ product.brand }}</td>
|
|
80
|
+
<td>{{ product.brand.name }}</td>
|
|
81
81
|
<td>{{ product.style }}</td>
|
|
82
82
|
<td>{{ product.color.name }}</td>
|
|
83
|
-
<td>{{ product.size.
|
|
83
|
+
<td>{{ product.size.shortName }}</td>
|
|
84
84
|
<td>{{ product.amount }}</td>
|
|
85
85
|
</tr>
|
|
86
86
|
<tr>
|
|
@@ -119,14 +119,25 @@ export default {
|
|
|
119
119
|
}
|
|
120
120
|
},
|
|
121
121
|
computed: {
|
|
122
|
+
simpleProducts() {
|
|
123
|
+
return this.products
|
|
124
|
+
.reduce((items, { product, simpleProducts }) => ([
|
|
125
|
+
...items,
|
|
126
|
+
...simpleProducts.map(sp => ({ ...product, ...sp }))
|
|
127
|
+
]), [])
|
|
128
|
+
.filter(({ amount }) => amount > 0);
|
|
129
|
+
},
|
|
122
130
|
totalAmount() {
|
|
123
|
-
return this.
|
|
124
|
-
return amount + product.amount;
|
|
131
|
+
return this.simpleProducts.reduce((amount, product) => {
|
|
132
|
+
return amount + (product.amount * product.productCost);
|
|
125
133
|
}, 0);
|
|
126
134
|
},
|
|
127
135
|
productsByColor() {
|
|
128
|
-
return groupProductsByColor(this.products
|
|
136
|
+
return groupProductsByColor(this.products);
|
|
129
137
|
}
|
|
138
|
+
},
|
|
139
|
+
mounted() {
|
|
140
|
+
groupProductsByColor(this.products);
|
|
130
141
|
}
|
|
131
142
|
};
|
|
132
143
|
</script>
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
</div>
|
|
8
8
|
<div class="ApproveDesignTees__container">
|
|
9
9
|
<product-side-with-print
|
|
10
|
-
:product="
|
|
10
|
+
:product="productWithPrint"
|
|
11
11
|
side="front"
|
|
12
12
|
size="large" />
|
|
13
13
|
<div
|
|
14
|
-
v-if="!
|
|
14
|
+
v-if="!hasFrontPrint"
|
|
15
15
|
class="ApproveDesignTees__no-design">
|
|
16
16
|
No design
|
|
17
17
|
</div>
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
</div>
|
|
24
24
|
<div class="ApproveDesignTees__container">
|
|
25
25
|
<product-side-with-print
|
|
26
|
-
:product="
|
|
26
|
+
:product="productWithPrint"
|
|
27
27
|
side="back"
|
|
28
28
|
size="large" />
|
|
29
29
|
<div
|
|
30
|
-
v-if="!
|
|
30
|
+
v-if="!hasBackPrint"
|
|
31
31
|
class="ApproveDesignTees__no-design">
|
|
32
32
|
No design
|
|
33
33
|
</div>
|
|
@@ -50,6 +50,20 @@ export default {
|
|
|
50
50
|
type: Object,
|
|
51
51
|
required: true
|
|
52
52
|
}
|
|
53
|
+
},
|
|
54
|
+
computed: {
|
|
55
|
+
hasFrontPrint() {
|
|
56
|
+
return this.product.prints.some(({ printArea }) => printArea.side === 'front');
|
|
57
|
+
},
|
|
58
|
+
hasBackPrint() {
|
|
59
|
+
return this.product.prints.some(({ printArea }) => printArea.side === 'back');
|
|
60
|
+
},
|
|
61
|
+
productWithPrint() {
|
|
62
|
+
return {
|
|
63
|
+
...this.product.product,
|
|
64
|
+
printsThumbnails: (this.product.printsThumbnails || {})
|
|
65
|
+
};
|
|
66
|
+
}
|
|
53
67
|
}
|
|
54
68
|
};
|
|
55
69
|
</script>
|
|
@@ -129,7 +129,8 @@ export default {
|
|
|
129
129
|
'editorSize',
|
|
130
130
|
'selectedTab',
|
|
131
131
|
'productPricing',
|
|
132
|
-
'printsPricing'
|
|
132
|
+
'printsPricing',
|
|
133
|
+
'isPrintPricing'
|
|
133
134
|
]),
|
|
134
135
|
...mapGetters('layers', [
|
|
135
136
|
'layerThumbnails'
|
|
@@ -175,7 +176,7 @@ export default {
|
|
|
175
176
|
}
|
|
176
177
|
},
|
|
177
178
|
proceedToCard() {
|
|
178
|
-
const entities = generateCartProducts(this.product, this.template.
|
|
179
|
+
const entities = generateCartProducts(this.product, this.template.simpleProducts, this.template.layers, this.isPrintPricing, this.layerThumbnails);
|
|
179
180
|
this.addToCart({ entities, shop: this.shop });
|
|
180
181
|
this.showCartModal(async () => {
|
|
181
182
|
const message = 'Do you wish to continue with editing the current design or reset the editor?';
|
|
@@ -151,6 +151,7 @@
|
|
|
151
151
|
<script>
|
|
152
152
|
import { inRange } from '@lancom/shared/assets/js/utils/filters';
|
|
153
153
|
import { availableFonts, loadFont } from '@lancom/shared/assets/js/utils/fonts-helper';
|
|
154
|
+
import ColorPicker from '@lancom/shared/components/common/color-picker';
|
|
154
155
|
import EditorLayerCommonFields from '../editor_layer_common_fields/editor-layer-common-fields';
|
|
155
156
|
import FontFamilySelect from './font-family_select/font-family-select';
|
|
156
157
|
|
|
@@ -169,7 +170,8 @@ export default {
|
|
|
169
170
|
name: 'EditorLayerFormText',
|
|
170
171
|
components: {
|
|
171
172
|
EditorLayerCommonFields,
|
|
172
|
-
FontFamilySelect
|
|
173
|
+
FontFamilySelect,
|
|
174
|
+
ColorPicker
|
|
173
175
|
},
|
|
174
176
|
props: {
|
|
175
177
|
layer: {
|
|
@@ -104,6 +104,7 @@ export default {
|
|
|
104
104
|
this.$emit('layer-added', { layer, toEditMode: true });
|
|
105
105
|
},
|
|
106
106
|
async handleUploaded({ url, size }) {
|
|
107
|
+
debugger
|
|
107
108
|
const layer = await this.createLayer({ type: 'art', url, size });
|
|
108
109
|
this.$emit('layer-added', { layer, toEditMode: false });
|
|
109
110
|
}
|
|
@@ -89,106 +89,7 @@
|
|
|
89
89
|
<div
|
|
90
90
|
v-if="showDetails"
|
|
91
91
|
class="EditorPricing__details">
|
|
92
|
-
<
|
|
93
|
-
<thead class="centered">
|
|
94
|
-
<tr class="highlighted">
|
|
95
|
-
<th colspan="6">
|
|
96
|
-
Tees
|
|
97
|
-
</th>
|
|
98
|
-
<th colspan="6">
|
|
99
|
-
Sizes
|
|
100
|
-
</th>
|
|
101
|
-
<th>Cost</th>
|
|
102
|
-
<th>Total Cost</th>
|
|
103
|
-
</tr>
|
|
104
|
-
</thead>
|
|
105
|
-
<tbody class="centered">
|
|
106
|
-
<tr
|
|
107
|
-
v-for="([groupPrice, group], index) in groupedProductsByPrice"
|
|
108
|
-
:key="index">
|
|
109
|
-
<td colspan="6">
|
|
110
|
-
{{ group.amount }}
|
|
111
|
-
</td>
|
|
112
|
-
<td colspan="6">
|
|
113
|
-
({{ group.sizes | sizesRange }})
|
|
114
|
-
</td>
|
|
115
|
-
<td>
|
|
116
|
-
<v-popover
|
|
117
|
-
trigger="hover"
|
|
118
|
-
popover-class="tooltip popover white no-paddings"
|
|
119
|
-
:delay="{ show: 200, hide: 400 }">
|
|
120
|
-
<span class="EditorPricing__hoverable">
|
|
121
|
-
{{ groupPrice | price }}
|
|
122
|
-
</span>
|
|
123
|
-
<template slot="popover">
|
|
124
|
-
<pricing-discounts-table
|
|
125
|
-
:prices="group.pricing"
|
|
126
|
-
:amount="productPricing.amount" />
|
|
127
|
-
</template>
|
|
128
|
-
</v-popover>
|
|
129
|
-
</td>
|
|
130
|
-
<td>{{ group.totalPrice | price }}</td>
|
|
131
|
-
</tr>
|
|
132
|
-
<tr class="highlighted">
|
|
133
|
-
<td colspan="13">
|
|
134
|
-
Tee Subtotal:
|
|
135
|
-
</td>
|
|
136
|
-
<td>{{ productPricing.products.products.totalPrice | price }}</td>
|
|
137
|
-
</tr>
|
|
138
|
-
</tbody>
|
|
139
|
-
<thead class="centered">
|
|
140
|
-
<tr class="highlighted">
|
|
141
|
-
<th colspan="4">
|
|
142
|
-
Prints
|
|
143
|
-
</th>
|
|
144
|
-
<th colspan="4">
|
|
145
|
-
Quantity
|
|
146
|
-
</th>
|
|
147
|
-
<th colspan="4">
|
|
148
|
-
Sizes
|
|
149
|
-
</th>
|
|
150
|
-
<th>Cost</th>
|
|
151
|
-
<th>Total Cost</th>
|
|
152
|
-
</tr>
|
|
153
|
-
</thead>
|
|
154
|
-
<tbody class="centered">
|
|
155
|
-
<tr
|
|
156
|
-
v-for="([printSide, group], index) in groupedProductsByPrintsPrice"
|
|
157
|
-
:key="index">
|
|
158
|
-
<td colspan="4">
|
|
159
|
-
{{ printSide }}
|
|
160
|
-
</td>
|
|
161
|
-
<td colspan="4">
|
|
162
|
-
{{ group.amount }}
|
|
163
|
-
</td>
|
|
164
|
-
<td colspan="4">
|
|
165
|
-
{{ group.sizes | printsRange }}
|
|
166
|
-
</td>
|
|
167
|
-
<td>
|
|
168
|
-
<v-popover
|
|
169
|
-
trigger="hover"
|
|
170
|
-
popover-class="tooltip popover white no-paddings"
|
|
171
|
-
:delay="{ show: 200, hide: 400 }">
|
|
172
|
-
<span class="EditorPricing__hoverable">
|
|
173
|
-
{{ group.price | price }}
|
|
174
|
-
</span>
|
|
175
|
-
<template slot="popover">
|
|
176
|
-
<pricing-discounts-table
|
|
177
|
-
:prices="printsPricing[group.sizes[0]]"
|
|
178
|
-
:amount="productPricing.amount" />
|
|
179
|
-
</template>
|
|
180
|
-
</v-popover>
|
|
181
|
-
</td>
|
|
182
|
-
<td>{{ group.totalPrice | price }}</td>
|
|
183
|
-
</tr>
|
|
184
|
-
<tr class="highlighted">
|
|
185
|
-
<td colspan="13">
|
|
186
|
-
Prints Subtotal:
|
|
187
|
-
</td>
|
|
188
|
-
<td>{{ productPricing.products.prints.totalPrice | price }}</td>
|
|
189
|
-
</tr>
|
|
190
|
-
</tbody>
|
|
191
|
-
</table>
|
|
92
|
+
<editor-pricing-details />
|
|
192
93
|
</div>
|
|
193
94
|
</div>
|
|
194
95
|
</template>
|
|
@@ -196,11 +97,9 @@
|
|
|
196
97
|
<script>
|
|
197
98
|
import { mapGetters, mapActions, mapMutations } from 'vuex';
|
|
198
99
|
import debounce from 'lodash.debounce';
|
|
199
|
-
import PricingDiscountsTable from '@lancom/shared/components/common/pricing_discounts_table/pricing-discounts-table';
|
|
200
|
-
|
|
201
100
|
import { EventBus } from '@lancom/shared/assets/js/utils/event-bus';
|
|
202
101
|
import { price, sizesRange, printsRange, tax } from '@lancom/shared/assets/js/utils/filters';
|
|
203
|
-
import
|
|
102
|
+
import EditorPricingDetails from '@lancom/shared/components/editor/editor_pricing/editor_pricing_details/editor-pricing-details';
|
|
204
103
|
|
|
205
104
|
export default {
|
|
206
105
|
name: 'EditorPricing',
|
|
@@ -211,7 +110,7 @@ export default {
|
|
|
211
110
|
printsRange
|
|
212
111
|
},
|
|
213
112
|
components: {
|
|
214
|
-
|
|
113
|
+
EditorPricingDetails
|
|
215
114
|
},
|
|
216
115
|
data() {
|
|
217
116
|
return {
|
|
@@ -237,25 +136,6 @@ export default {
|
|
|
237
136
|
return this.hasUsedSimpleProducts
|
|
238
137
|
? this.usedSimpleProducts
|
|
239
138
|
: [this.defaultSimpleProduct];
|
|
240
|
-
},
|
|
241
|
-
groupedProductsByPrice() {
|
|
242
|
-
return this.productPricing
|
|
243
|
-
? groupProductsSizesByPrice(
|
|
244
|
-
this.products,
|
|
245
|
-
this.productPricing.products
|
|
246
|
-
)
|
|
247
|
-
: [];
|
|
248
|
-
},
|
|
249
|
-
hasGroupedProductsByPrintsPrice() {
|
|
250
|
-
return this.groupedProductsByPrintsPrice.length > 0;
|
|
251
|
-
},
|
|
252
|
-
groupedProductsByPrintsPrice() {
|
|
253
|
-
return this.productPricing
|
|
254
|
-
? groupProductsPrintsByPrintArea(
|
|
255
|
-
this.products,
|
|
256
|
-
this.productPricing.products
|
|
257
|
-
)
|
|
258
|
-
: [];
|
|
259
139
|
}
|
|
260
140
|
},
|
|
261
141
|
watch: {
|
|
File without changes
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="EditorPricingDetails__wrapper">
|
|
3
|
+
<editor-pricing-details-products />
|
|
4
|
+
<editor-pricing-details-prints v-if="isPrintPricing" />
|
|
5
|
+
</div>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script>
|
|
9
|
+
import { mapGetters } from 'vuex';
|
|
10
|
+
import EditorPricingDetailsProducts from './editor_pricing_details_products/editor-pricing-details-products';
|
|
11
|
+
import EditorPricingDetailsPrints from './editor_pricing_details_prints/editor-pricing-details-prints';
|
|
12
|
+
|
|
13
|
+
export default {
|
|
14
|
+
name: 'EditorPricingDetails',
|
|
15
|
+
components: {
|
|
16
|
+
EditorPricingDetailsProducts,
|
|
17
|
+
EditorPricingDetailsPrints
|
|
18
|
+
},
|
|
19
|
+
computed: {
|
|
20
|
+
...mapGetters('product', [
|
|
21
|
+
'isPrintPricing'
|
|
22
|
+
])
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<style lang="scss" scoped>
|
|
28
|
+
@import 'editor-pricing-details';
|
|
29
|
+
</style>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
@import '@/assets/scss/variables';
|
|
2
|
+
|
|
3
|
+
.EditorPricingDetailsPrints {
|
|
4
|
+
&__wrapper td {
|
|
5
|
+
font-weight: 600;
|
|
6
|
+
border: 1px solid $gray;
|
|
7
|
+
font-size: 16px;
|
|
8
|
+
line-height: 25px;
|
|
9
|
+
text-transform: uppercase;
|
|
10
|
+
color: $black;
|
|
11
|
+
@media (max-width: $bp-extra-small-max) {
|
|
12
|
+
padding: 2px;
|
|
13
|
+
font-size: 12px;
|
|
14
|
+
}
|
|
15
|
+
strong {
|
|
16
|
+
font-weight: bold;
|
|
17
|
+
}
|
|
18
|
+
&.disabled {
|
|
19
|
+
color: $gray_main;
|
|
20
|
+
pointer-events: none !important;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
&__th {
|
|
24
|
+
font-weight: bold !important;
|
|
25
|
+
background: $gray;
|
|
26
|
+
@media (max-width: $bp-extra-small-max) {
|
|
27
|
+
padding: 2px;
|
|
28
|
+
font-size: 12px;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
&__name {
|
|
32
|
+
width: 70px;
|
|
33
|
+
@media (max-width: $bp-extra-small-max) {
|
|
34
|
+
width: 30px;
|
|
35
|
+
}
|
|
36
|
+
span {
|
|
37
|
+
writing-mode: vertical-lr;
|
|
38
|
+
transform: rotate(180deg);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|