@lancom/shared 0.0.102 → 0.0.106
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 +6 -0
- package/assets/js/models/print-area.js +8 -6
- package/assets/js/models/product-layers.js +3 -3
- package/assets/js/utils/fabric-helper.js +2 -4
- package/assets/js/utils/filters.js +7 -1
- package/assets/js/utils/prints.js +15 -4
- package/assets/js/utils/product.js +4 -4
- package/assets/scss/ui_kit/_table.scss +3 -0
- package/assets/scss/ui_kit/_typography.scss +6 -0
- package/components/checkout/order/address-form/address-form.vue +1 -0
- package/components/checkout/order/order-billing-information/order-billing-information.vue +7 -5
- package/components/checkout/payment/payment-cart/payment-cart.scss +2 -2
- package/components/common/color-picker.vue +6 -1
- package/components/common/file_uploader.vue +1 -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/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/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 +8 -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 +10 -0
- package/components/products/products_tags/products-tags.vue +7 -0
- package/components/products/products_types/products-types.vue +6 -1
- package/mixins/product-preview.js +1 -1
- package/nuxt.config.js +13 -1
- package/package.json +1 -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 +25 -14
- 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
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
<div class="row Product__section-row">
|
|
4
4
|
<div class="col-sm-6 col-12 Product__col">
|
|
5
5
|
<section class="Product__section">
|
|
6
|
-
<
|
|
6
|
+
<client-only>
|
|
7
|
+
<gallery v-if="hasImages" />
|
|
8
|
+
</client-only>
|
|
7
9
|
</section>
|
|
8
10
|
<section class="Product__section">
|
|
9
11
|
<product-model-measurements />
|
|
@@ -30,12 +32,15 @@
|
|
|
30
32
|
</section>
|
|
31
33
|
</div>
|
|
32
34
|
</div>
|
|
35
|
+
<related-products
|
|
36
|
+
class="EditorPage__related"
|
|
37
|
+
:product="product"
|
|
38
|
+
:to-editor="false" />
|
|
33
39
|
</div>
|
|
34
40
|
</template>
|
|
35
41
|
|
|
36
42
|
<script>
|
|
37
43
|
import { mapGetters } from 'vuex';
|
|
38
|
-
import ProductGallery from './layouts/product_gallery/product-gallery';
|
|
39
44
|
import ProductMainInfo from './layouts/product_main_info/product-main-info';
|
|
40
45
|
import ProductColorsSelector from './layouts/product_colors_selector/product-colors-selector';
|
|
41
46
|
import ProductTierPrices from './layouts/product_tier_prices/product-tier-prices';
|
|
@@ -43,27 +48,33 @@ import ProductFabricAndSizeInfo from './layouts/product_fabric_and_size_info/pro
|
|
|
43
48
|
import ProductPackaging from './layouts/product_packaging/product-packaging';
|
|
44
49
|
import ProductModelMeasurements from './layouts/product_model_measurements/product-model-measurements';
|
|
45
50
|
import ProductSizeTable from './layouts/product_size_table/product-size-table';
|
|
51
|
+
|
|
46
52
|
// import ProductLabelsCustomization from './layouts/product_labels_customization/product-labels-customization';
|
|
47
53
|
|
|
48
54
|
export default {
|
|
49
55
|
name: 'Product',
|
|
50
56
|
components: {
|
|
51
|
-
ProductGallery,
|
|
52
57
|
ProductMainInfo,
|
|
53
58
|
ProductColorsSelector,
|
|
54
59
|
ProductTierPrices,
|
|
55
60
|
ProductFabricAndSizeInfo,
|
|
56
61
|
ProductPackaging,
|
|
57
62
|
ProductModelMeasurements,
|
|
58
|
-
ProductSizeTable
|
|
63
|
+
ProductSizeTable,
|
|
64
|
+
RelatedProducts: () => import('@lancom/shared/components/product/related_products/related-products'),
|
|
65
|
+
Gallery: () => import('@lancom/shared/components/product/gallery/gallery'),
|
|
59
66
|
// ProductLabelsCustomization
|
|
60
67
|
},
|
|
61
68
|
computed: {
|
|
62
69
|
...mapGetters('product', [
|
|
63
70
|
'product',
|
|
71
|
+
'images',
|
|
64
72
|
'productDetails',
|
|
65
73
|
'editableColor'
|
|
66
|
-
])
|
|
74
|
+
]),
|
|
75
|
+
hasImages() {
|
|
76
|
+
return this.images.length > 0;
|
|
77
|
+
}
|
|
67
78
|
}
|
|
68
79
|
};
|
|
69
80
|
</script>
|
|
@@ -8,9 +8,13 @@
|
|
|
8
8
|
v-if="withGst"
|
|
9
9
|
class="lc_h4">
|
|
10
10
|
{{ product[minPriceAttr] | tax(gstTax) | price }}
|
|
11
|
-
<span
|
|
11
|
+
<span
|
|
12
|
+
v-if="visiblePriceInfo"
|
|
13
|
+
class="lc_regular11 lc_bold">inc. GST</span>
|
|
12
14
|
</div>
|
|
13
|
-
<div
|
|
15
|
+
<div
|
|
16
|
+
v-if="withoutGst"
|
|
17
|
+
:class="withGst ? 'lc_regular11' : 'lc_h4'">
|
|
14
18
|
{{ prePriceText }} {{ product[minPriceAttr] | price }} + GST
|
|
15
19
|
</div>
|
|
16
20
|
</div>
|
|
@@ -21,9 +25,13 @@
|
|
|
21
25
|
v-if="withGst"
|
|
22
26
|
class="lc_h4">
|
|
23
27
|
{{ product[minPriceAttr] | tax(gstTax) | price }} {{ rangeDivider }} {{ product[maxPriceAttr] | tax(gstTax) | price }}
|
|
24
|
-
<span
|
|
28
|
+
<span
|
|
29
|
+
v-if="visiblePriceInfo"
|
|
30
|
+
class="lc_regular11 lc_bold"> inc. GST</span>
|
|
25
31
|
</div>
|
|
26
|
-
<div
|
|
32
|
+
<div
|
|
33
|
+
v-if="withoutGst"
|
|
34
|
+
:class="withGst ? 'lc_regular11' : 'lc_h4'">
|
|
27
35
|
{{ prePriceText }} {{ product[minPriceAttr] | price }} {{ rangeDivider }} {{ product[maxPriceAttr] | price }} + GST
|
|
28
36
|
</div>
|
|
29
37
|
</div>
|
|
@@ -49,6 +57,10 @@ export default {
|
|
|
49
57
|
type: Boolean,
|
|
50
58
|
required: true
|
|
51
59
|
},
|
|
60
|
+
withoutGst: {
|
|
61
|
+
type: Boolean,
|
|
62
|
+
default: true
|
|
63
|
+
},
|
|
52
64
|
minPriceAttr: {
|
|
53
65
|
type: String,
|
|
54
66
|
default: 'minPrice'
|
|
@@ -64,6 +76,10 @@ export default {
|
|
|
64
76
|
rangeDivider: {
|
|
65
77
|
type: String,
|
|
66
78
|
default: '-'
|
|
79
|
+
},
|
|
80
|
+
visiblePriceInfo: {
|
|
81
|
+
type: Boolean,
|
|
82
|
+
default: true
|
|
67
83
|
}
|
|
68
84
|
},
|
|
69
85
|
computed: {
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="ProductPrintPriceInfoItem__wrapper">
|
|
3
|
-
<div
|
|
3
|
+
<div
|
|
4
|
+
v-if="visibleTableName"
|
|
5
|
+
class="ProductPrintPriceInfoItem__table-name">
|
|
4
6
|
{{ print.name }}
|
|
5
7
|
</div>
|
|
6
|
-
<pricing-table
|
|
8
|
+
<pricing-table
|
|
9
|
+
:items="pricing"
|
|
10
|
+
:bordered="bordered" />
|
|
7
11
|
<div
|
|
8
12
|
v-if="print.setupCost > 0"
|
|
9
13
|
class="mt-10 lc_h4">
|
|
@@ -33,6 +37,14 @@ export default {
|
|
|
33
37
|
print: {
|
|
34
38
|
type: Object,
|
|
35
39
|
required: true
|
|
40
|
+
},
|
|
41
|
+
visibleTableName: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
default: true
|
|
44
|
+
},
|
|
45
|
+
bordered: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
default: false
|
|
36
48
|
}
|
|
37
49
|
},
|
|
38
50
|
computed: {
|
|
@@ -1,21 +1,49 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="ProductScreenPrintPriceInfo__wrapper">
|
|
3
|
-
<div
|
|
3
|
+
<div
|
|
4
|
+
v-if="tabs"
|
|
5
|
+
class="ProductScreenPrintPriceInfo__tabs">
|
|
6
|
+
<btn
|
|
7
|
+
:btn-class="activeWithUnderbase ? 'green' : 'white'"
|
|
8
|
+
btn-label="With Underbase"
|
|
9
|
+
@onclick="activeWithUnderbase = true">
|
|
10
|
+
</btn>
|
|
11
|
+
<btn
|
|
12
|
+
:btn-class="activeWithUnderbase ? 'white' : 'green'"
|
|
13
|
+
btn-label="Without Underbase"
|
|
14
|
+
@onclick="activeWithUnderbase = false">
|
|
15
|
+
</btn>
|
|
16
|
+
</div>
|
|
17
|
+
<div
|
|
18
|
+
v-if="!tabs"
|
|
19
|
+
class="ProductScreenPrintPriceInfo__table-name">
|
|
4
20
|
With Underbase
|
|
5
21
|
</div>
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
22
|
+
<div v-if="!tabs || activeWithUnderbase">
|
|
23
|
+
<pricing-table
|
|
24
|
+
:items="withUnderbasePricing"
|
|
25
|
+
:bordered="bordered" />
|
|
26
|
+
<pricing-table
|
|
27
|
+
:items="withUnderbaseSetupPricing"
|
|
28
|
+
:bordered="bordered"
|
|
29
|
+
tr-label="Setup Cost"
|
|
30
|
+
class="mt-10" />
|
|
31
|
+
</div>
|
|
32
|
+
<div
|
|
33
|
+
v-if="!tabs"
|
|
34
|
+
class="ProductScreenPrintPriceInfo__table-name">
|
|
12
35
|
Without Underbase
|
|
13
36
|
</div>
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
37
|
+
<div v-if="!tabs || !activeWithUnderbase">
|
|
38
|
+
<pricing-table
|
|
39
|
+
:items="withoutUnderbasePricing"
|
|
40
|
+
:bordered="bordered" />
|
|
41
|
+
<pricing-table
|
|
42
|
+
:items="withoutUnderbaseSetupPricing"
|
|
43
|
+
:bordered="bordered"
|
|
44
|
+
tr-label="Setup Cost"
|
|
45
|
+
class="mt-10" />
|
|
46
|
+
</div>
|
|
19
47
|
</div>
|
|
20
48
|
</template>
|
|
21
49
|
|
|
@@ -33,8 +61,21 @@ export default {
|
|
|
33
61
|
product: {
|
|
34
62
|
type: Object,
|
|
35
63
|
required: true
|
|
64
|
+
},
|
|
65
|
+
bordered: {
|
|
66
|
+
type: Boolean,
|
|
67
|
+
default: false
|
|
68
|
+
},
|
|
69
|
+
tabs: {
|
|
70
|
+
type: Boolean,
|
|
71
|
+
default: false
|
|
36
72
|
}
|
|
37
73
|
},
|
|
74
|
+
data() {
|
|
75
|
+
return {
|
|
76
|
+
activeWithUnderbase: true
|
|
77
|
+
};
|
|
78
|
+
},
|
|
38
79
|
computed: {
|
|
39
80
|
screenPrints() {
|
|
40
81
|
const types = (this.product.printTypes || []).filter(({ type }) => type === PRINT_TYPES.SCREEN);
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="ProductSizesInfo__wrapper">
|
|
3
|
-
<table
|
|
3
|
+
<table
|
|
4
|
+
v-if="sizesTable.length > 0"
|
|
5
|
+
class="ProductSizeInfo__table lc_table"
|
|
6
|
+
:class="{ striped }">
|
|
4
7
|
<thead class="centered">
|
|
5
8
|
<tr class="ProductSizeInfo__main-info">
|
|
6
9
|
<th>
|
|
@@ -34,7 +37,7 @@
|
|
|
34
37
|
</tr>
|
|
35
38
|
<tr>
|
|
36
39
|
<td
|
|
37
|
-
:colspan="
|
|
40
|
+
:colspan="colspan"
|
|
38
41
|
class="ProductSizeInfo__sub-info-wrapper">
|
|
39
42
|
<div class="ProductSizeInfo__sub-info">
|
|
40
43
|
<div class="ProductSizeInfo__sub-info-item">
|
|
@@ -46,6 +49,7 @@
|
|
|
46
49
|
</div>
|
|
47
50
|
</td>
|
|
48
51
|
</tr>
|
|
52
|
+
<slot name="footer" v-bind="{ colspan }"></slot>
|
|
49
53
|
</tbody>
|
|
50
54
|
</table>
|
|
51
55
|
</div>
|
|
@@ -60,9 +64,16 @@ export default {
|
|
|
60
64
|
product: {
|
|
61
65
|
type: Object,
|
|
62
66
|
required: true
|
|
67
|
+
},
|
|
68
|
+
striped: {
|
|
69
|
+
type: Boolean,
|
|
70
|
+
default: true
|
|
63
71
|
}
|
|
64
72
|
},
|
|
65
73
|
computed: {
|
|
74
|
+
colspan() {
|
|
75
|
+
return this.product.sizes.length + 1;
|
|
76
|
+
},
|
|
66
77
|
sizesFields() {
|
|
67
78
|
return getSizesFields(this.product.sizes);
|
|
68
79
|
},
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
@import "@/assets/scss/variables";
|
|
2
|
+
|
|
3
|
+
.RelatedProducts {
|
|
4
|
+
&__products {
|
|
5
|
+
display: flex;
|
|
6
|
+
margin: -32px 0 0 -32px;
|
|
7
|
+
width: calc(100% + 32px);
|
|
8
|
+
}
|
|
9
|
+
&__product {
|
|
10
|
+
margin: 32px 0 0 32px;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
::v-deep {
|
|
14
|
+
@media (max-width: $bp-large-max) {
|
|
15
|
+
.ProductList__item-wrapper:nth-child(6) {
|
|
16
|
+
display: none;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
@media (max-width: $bp-medium-max) {
|
|
20
|
+
.ProductList__item-wrapper:nth-child(5) {
|
|
21
|
+
display: none;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
@media (max-width: $bp-small-max) {
|
|
25
|
+
.ProductList__item-wrapper:nth-child(4) {
|
|
26
|
+
display: none;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
@media (max-width: $bp-extra-small-max) {
|
|
30
|
+
.ProductList__item-wrapper:nth-child(3) {
|
|
31
|
+
display: none;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
v-if="hasProducts"
|
|
4
|
+
class="RelatedProducts__wrapper">
|
|
5
|
+
<div class="RelatedProducts__title lc_h2">
|
|
6
|
+
Related Products
|
|
7
|
+
</div>
|
|
8
|
+
<product-list :products="products" />
|
|
9
|
+
</div>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script>
|
|
13
|
+
import { mapGetters } from 'vuex';
|
|
14
|
+
import api from '@lancom/shared/assets/js/api';
|
|
15
|
+
import ProductList from '@/components/products/product_list/product-list';
|
|
16
|
+
|
|
17
|
+
export default {
|
|
18
|
+
name: 'RelatedProducts',
|
|
19
|
+
components: {
|
|
20
|
+
ProductList
|
|
21
|
+
},
|
|
22
|
+
props: {
|
|
23
|
+
product: {
|
|
24
|
+
type: Object,
|
|
25
|
+
required: true
|
|
26
|
+
},
|
|
27
|
+
toEditor: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: true
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
data() {
|
|
33
|
+
return {
|
|
34
|
+
products: []
|
|
35
|
+
};
|
|
36
|
+
},
|
|
37
|
+
computed: {
|
|
38
|
+
...mapGetters(['shop']),
|
|
39
|
+
hasProducts() {
|
|
40
|
+
return this.products.length > 0;
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
async mounted() {
|
|
44
|
+
const { products } = await api.fetchRelatedProducts(this.shop._id, this.product.alias);
|
|
45
|
+
this.products = products;
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
</script>
|
|
49
|
+
|
|
50
|
+
<style lang="scss" scoped>
|
|
51
|
+
@import 'related-products';
|
|
52
|
+
</style>
|
|
@@ -4,12 +4,13 @@
|
|
|
4
4
|
&__wrapper {
|
|
5
5
|
display: flex;
|
|
6
6
|
flex-wrap: wrap;
|
|
7
|
+
margin-top: 20px;
|
|
7
8
|
@media (max-width: $bp-small-max) {
|
|
8
9
|
justify-content: center;
|
|
9
10
|
}
|
|
10
11
|
}
|
|
11
12
|
&__item-wrapper {
|
|
12
|
-
width:
|
|
13
|
+
width: 330px;
|
|
13
14
|
height: 450px;
|
|
14
15
|
margin: 0 0 25px 25px;
|
|
15
16
|
position: relative;
|
|
@@ -36,39 +36,63 @@
|
|
|
36
36
|
border: 2px solid $grey_1;
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
+
&__cover {
|
|
40
|
+
transition: opacity 0.35s ease-in-out;
|
|
41
|
+
opacity: 1;
|
|
42
|
+
position: absolute;
|
|
43
|
+
top: 30px;
|
|
44
|
+
}
|
|
45
|
+
&__cover-hover {
|
|
46
|
+
transition: opacity 0.45s ease-in-out;
|
|
47
|
+
z-index: 2;
|
|
48
|
+
opacity: 0;
|
|
49
|
+
position: absolute;
|
|
50
|
+
top: 30px;
|
|
51
|
+
}
|
|
39
52
|
&__link {
|
|
40
53
|
position: relative;
|
|
41
|
-
display: block;
|
|
42
54
|
transition: background-color 0.5s ease;
|
|
43
55
|
background-color: white;
|
|
44
|
-
height:
|
|
56
|
+
height: 330px;
|
|
45
57
|
width: 340px;
|
|
58
|
+
display: flex;
|
|
59
|
+
align-items: center;
|
|
60
|
+
justify-content: center;
|
|
61
|
+
overflow: hidden;
|
|
62
|
+
&:hover {
|
|
63
|
+
.ProductListProduct {
|
|
64
|
+
&__cover {
|
|
65
|
+
opacity: 0;
|
|
66
|
+
}
|
|
67
|
+
&__cover-hover {
|
|
68
|
+
opacity: 1;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
46
72
|
}
|
|
47
73
|
&__brand {
|
|
48
74
|
width: 54px;
|
|
49
75
|
top: 10px;
|
|
50
76
|
left: 5px;
|
|
51
77
|
position: absolute;
|
|
52
|
-
z-index:
|
|
78
|
+
z-index: 10;
|
|
53
79
|
opacity: 0.7;
|
|
54
80
|
}
|
|
55
|
-
&__cover {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
71
|
-
}
|
|
81
|
+
// &__cover {
|
|
82
|
+
// object-fit: contain;
|
|
83
|
+
// position: relative;
|
|
84
|
+
// z-index: 1;
|
|
85
|
+
// }
|
|
86
|
+
// &__cover-hover {
|
|
87
|
+
// top: 0;
|
|
88
|
+
// left: 0;
|
|
89
|
+
// position: absolute;
|
|
90
|
+
// z-index: 1;
|
|
91
|
+
// display: none;
|
|
92
|
+
// &--visible {
|
|
93
|
+
// display: block;
|
|
94
|
+
// }
|
|
95
|
+
// }
|
|
72
96
|
&__cover-color {
|
|
73
97
|
top: 5px;
|
|
74
98
|
left: 5px;
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
v-if="productСover"
|
|
16
16
|
class="ProductListProduct__cover"
|
|
17
17
|
:src="productСover"
|
|
18
|
+
:style="productBackgroundСover"
|
|
18
19
|
@load="productСoverLoaded = true" />
|
|
19
20
|
<img
|
|
20
21
|
v-if="productСoverLoaded && productСoverHover"
|
|
@@ -22,13 +23,14 @@
|
|
|
22
23
|
:class="{
|
|
23
24
|
'ProductListProduct__cover-hover--visible': full
|
|
24
25
|
}"
|
|
26
|
+
:style="productBackgroundСover"
|
|
25
27
|
:src="productСoverHover" />
|
|
26
|
-
<div
|
|
28
|
+
<!-- <div
|
|
27
29
|
class="ProductListProduct__cover-color"
|
|
28
30
|
:class="{
|
|
29
31
|
'ProductListProduct__cover-color--visible': productСoverLoaded
|
|
30
32
|
}"
|
|
31
|
-
:style="productBackgroundСover"></div>
|
|
33
|
+
:style="productBackgroundСover"></div> -->
|
|
32
34
|
<img
|
|
33
35
|
v-if="product.isTearAwayTag"
|
|
34
36
|
class="ProductListProduct__tear-away-tag"
|
|
@@ -71,7 +73,7 @@
|
|
|
71
73
|
<div
|
|
72
74
|
v-if="full"
|
|
73
75
|
class="ProductListProduct__info-item mt-9 lc_caption visible-full">
|
|
74
|
-
{{ product.
|
|
76
|
+
{{ product.fabricInfoShort }} | {{ product.materialWeight }} gsm
|
|
75
77
|
</div>
|
|
76
78
|
<div
|
|
77
79
|
v-if="full"
|
|
@@ -81,7 +83,7 @@
|
|
|
81
83
|
:key="color._id"
|
|
82
84
|
class="ProductListProduct__color"
|
|
83
85
|
:class="{
|
|
84
|
-
'ProductListProduct__color--selected': color._id === currentColor._id
|
|
86
|
+
'ProductListProduct__color--selected': currentColor && color._id === currentColor._id
|
|
85
87
|
}"
|
|
86
88
|
@click="currentColor = color">
|
|
87
89
|
<product-color-image
|
|
@@ -11,9 +11,17 @@
|
|
|
11
11
|
<span class="ProductsAside__info ProductsAside__info--small2"></span>
|
|
12
12
|
</div>
|
|
13
13
|
<div v-else>
|
|
14
|
+
<div
|
|
15
|
+
v-if="hasProductTypes"
|
|
16
|
+
class="ProductsAside__item">
|
|
17
|
+
<products-types
|
|
18
|
+
:has-selected-icon="hasSelectedIcon"
|
|
19
|
+
:selected-icon-circle="selectedIconCircle" />
|
|
20
|
+
</div>
|
|
14
21
|
<div class="ProductsAside__item">
|
|
15
22
|
<products-brands
|
|
16
|
-
:has-selected-icon="hasSelectedIcon"
|
|
23
|
+
:has-selected-icon="hasSelectedIcon"
|
|
24
|
+
:selected-icon-circle="selectedIconCircle" />
|
|
17
25
|
</div>
|
|
18
26
|
<div class="ProductsAside__item">
|
|
19
27
|
<products-colors />
|
|
@@ -22,14 +30,15 @@
|
|
|
22
30
|
<products-attributes
|
|
23
31
|
:has-selected-icon="hasSelectedIcon" />
|
|
24
32
|
<products-tags
|
|
25
|
-
:has-selected-icon="
|
|
33
|
+
:has-selected-icon="haAttributesSelectedIcon"
|
|
34
|
+
:has-remove-icon="hasRemoveIcon" />
|
|
26
35
|
</div>
|
|
27
36
|
</div>
|
|
28
37
|
</div>
|
|
29
38
|
</template>
|
|
30
39
|
|
|
31
40
|
<script>
|
|
32
|
-
|
|
41
|
+
import ProductsTypes from '@lancom/shared/components/products/products_types/products-types';
|
|
33
42
|
import { mapGetters } from 'vuex';
|
|
34
43
|
import ProductsBrands from '@lancom/shared/components/products/products_brands/products-brands';
|
|
35
44
|
import ProductsTags from '@lancom/shared/components/products/products_tags/products-tags';
|
|
@@ -40,7 +49,7 @@ import { generateProductsLink } from '@lancom/shared/assets/js/utils/product';
|
|
|
40
49
|
export default {
|
|
41
50
|
name: 'ProductsAside',
|
|
42
51
|
components: {
|
|
43
|
-
|
|
52
|
+
ProductsTypes,
|
|
44
53
|
ProductsBrands,
|
|
45
54
|
ProductsTags,
|
|
46
55
|
ProductsAttributes,
|
|
@@ -51,9 +60,25 @@ export default {
|
|
|
51
60
|
type: Boolean,
|
|
52
61
|
default: false
|
|
53
62
|
},
|
|
63
|
+
hasRemoveIcon: {
|
|
64
|
+
type: Boolean,
|
|
65
|
+
default: false
|
|
66
|
+
},
|
|
67
|
+
selectedIconCircle: {
|
|
68
|
+
type: Boolean,
|
|
69
|
+
default: true
|
|
70
|
+
},
|
|
71
|
+
haAttributesSelectedIcon: {
|
|
72
|
+
type: Boolean,
|
|
73
|
+
default: false
|
|
74
|
+
},
|
|
54
75
|
hasThumbs: {
|
|
55
76
|
type: Boolean,
|
|
56
77
|
default: true
|
|
78
|
+
},
|
|
79
|
+
hasProductTypes: {
|
|
80
|
+
type: Boolean,
|
|
81
|
+
default: false
|
|
57
82
|
}
|
|
58
83
|
},
|
|
59
84
|
data() {
|
|
@@ -10,10 +10,13 @@
|
|
|
10
10
|
:class="{
|
|
11
11
|
'ProductsBrands__item--active': brand.alias === currentBrand
|
|
12
12
|
}">
|
|
13
|
-
<products-link
|
|
13
|
+
<products-link
|
|
14
|
+
class="ProductsBrands__more"
|
|
15
|
+
:brand="brand.alias === currentBrand ? null : brand.alias">
|
|
14
16
|
<checked-icon
|
|
15
17
|
v-if="hasSelectedIcon"
|
|
16
|
-
:checked="brand.alias === currentBrand"
|
|
18
|
+
:checked="brand.alias === currentBrand"
|
|
19
|
+
:circle="selectedIconCircle" />
|
|
17
20
|
{{ brand.name }}
|
|
18
21
|
</products-link>
|
|
19
22
|
</div>
|
|
@@ -38,6 +41,10 @@ export default {
|
|
|
38
41
|
hasSelectedIcon: {
|
|
39
42
|
type: Boolean,
|
|
40
43
|
default: false
|
|
44
|
+
},
|
|
45
|
+
selectedIconCircle: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
default: false
|
|
41
48
|
}
|
|
42
49
|
},
|
|
43
50
|
computed: {
|
|
@@ -11,6 +11,16 @@
|
|
|
11
11
|
class="labelless">
|
|
12
12
|
</multiselect>
|
|
13
13
|
</div>
|
|
14
|
+
<div class="ProductsFilters__search hidden-sm-and-down">
|
|
15
|
+
<input
|
|
16
|
+
v-model="search"
|
|
17
|
+
name="search"
|
|
18
|
+
placeholder="Search"
|
|
19
|
+
type="text"
|
|
20
|
+
class="form-field no-label tiny-placeholder labelless"
|
|
21
|
+
@change="goToTextSearch" />
|
|
22
|
+
<i class="icon-search"></i>
|
|
23
|
+
</div>
|
|
14
24
|
<div
|
|
15
25
|
class="ProductsFilters__filter hidden-md-and-up"
|
|
16
26
|
:class="{
|
|
@@ -15,6 +15,9 @@
|
|
|
15
15
|
}">
|
|
16
16
|
<products-link :tags="tag.alias">
|
|
17
17
|
{{ tag.name }}
|
|
18
|
+
<i
|
|
19
|
+
v-if="hasRemoveIcon && selectedTags.includes(tag.alias)"
|
|
20
|
+
class="icon-cancel"></i>
|
|
18
21
|
</products-link>
|
|
19
22
|
</div>
|
|
20
23
|
</div>
|
|
@@ -34,6 +37,10 @@ export default {
|
|
|
34
37
|
hasSelectedIcon: {
|
|
35
38
|
type: Boolean,
|
|
36
39
|
default: false
|
|
40
|
+
},
|
|
41
|
+
hasRemoveIcon: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
default: false
|
|
37
44
|
}
|
|
38
45
|
},
|
|
39
46
|
computed: {
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
class="ProductsTypes__more">
|
|
14
14
|
<checked-icon
|
|
15
15
|
v-if="hasSelectedIcon"
|
|
16
|
-
:checked="type.alias === currentType"
|
|
16
|
+
:checked="type.alias === currentType"
|
|
17
|
+
:circle="selectedIconCircle" />
|
|
17
18
|
<div
|
|
18
19
|
v-if="hasThumbs && type.icon"
|
|
19
20
|
class="ProductsTypes__item-icon"
|
|
@@ -46,6 +47,10 @@ export default {
|
|
|
46
47
|
type: Boolean,
|
|
47
48
|
default: false
|
|
48
49
|
},
|
|
50
|
+
selectedIconCircle: {
|
|
51
|
+
type: Boolean,
|
|
52
|
+
default: false
|
|
53
|
+
},
|
|
49
54
|
hasThumbs: {
|
|
50
55
|
type: Boolean,
|
|
51
56
|
default: true
|