@lancom/shared 0.0.437 → 0.0.439
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/components/asides/contact_us/contact-us.scss +2 -2
- package/components/asides/contact_us/contact-us.vue +8 -0
- package/components/checkout/order/order-checkout-method/order-checkout-method.vue +10 -1
- package/components/customer/signin_form/signin-form.vue +19 -12
- package/components/product/product_pricing_tiers/product-pricing-tiers.scss +5 -0
- package/components/product/product_pricing_tiers/product-pricing-tiers.vue +1 -0
- package/components/product/product_stock_status/product-stock-status.vue +16 -4
- package/components/product/products_size_selector_color/product_size_selector_color/product-size-selector-color.scss +4 -0
- package/components/product/products_size_selector_color/product_size_selector_color/product-size-selector-color.vue +6 -1
- package/mixins/product-view.js +6 -4
- package/package.json +1 -1
- package/store/product.js +21 -2
|
@@ -119,6 +119,14 @@
|
|
|
119
119
|
</span>
|
|
120
120
|
</div>
|
|
121
121
|
</div>
|
|
122
|
+
<div
|
|
123
|
+
v-if="contacts.workingInfo"
|
|
124
|
+
class="ContactUs__contacts-row">
|
|
125
|
+
<span
|
|
126
|
+
class="ContactUs__contacts-entity-value"
|
|
127
|
+
v-html="contacts.workingInfo">
|
|
128
|
+
</span>
|
|
129
|
+
</div>
|
|
122
130
|
<div class="ContactUs__contacts-row">
|
|
123
131
|
<div class="ContactUs__contacts-entity">
|
|
124
132
|
<i class="icon-mail-alt ContactUs__contacts-entity-icon"></i>
|
|
@@ -35,7 +35,16 @@
|
|
|
35
35
|
@save="createdCustomer($event)" />
|
|
36
36
|
<signin-form
|
|
37
37
|
v-else
|
|
38
|
-
@signin="signin()"
|
|
38
|
+
@signin="signin()">
|
|
39
|
+
<template #actions>
|
|
40
|
+
<progress-steps-controls
|
|
41
|
+
next-btn-class="white"
|
|
42
|
+
:show-prev="false"
|
|
43
|
+
label-next="Checkout as Guest"
|
|
44
|
+
style="margin-top: 0;"
|
|
45
|
+
@next="$emit('next')" />
|
|
46
|
+
</template>
|
|
47
|
+
</signin-form>
|
|
39
48
|
</div>
|
|
40
49
|
</div>
|
|
41
50
|
</div>
|
|
@@ -81,18 +81,25 @@
|
|
|
81
81
|
{{ error }}
|
|
82
82
|
</div>
|
|
83
83
|
<div class="form-actions">
|
|
84
|
-
<
|
|
85
|
-
class="
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
84
|
+
<div class="row">
|
|
85
|
+
<div class="col-6">
|
|
86
|
+
<btn
|
|
87
|
+
class="btn btn-black"
|
|
88
|
+
:btn-processing="processing"
|
|
89
|
+
:btn-disabled="processing"
|
|
90
|
+
:btn-block="true"
|
|
91
|
+
btn-type="button"
|
|
92
|
+
btn-label="Log in"
|
|
93
|
+
@onclick="submit()">
|
|
94
|
+
<i
|
|
95
|
+
slot="icon-after"
|
|
96
|
+
class="icon-arrow-right"></i>
|
|
97
|
+
</btn>
|
|
98
|
+
</div>
|
|
99
|
+
<div class="col-6">
|
|
100
|
+
<slot name="actions"></slot>
|
|
101
|
+
</div>
|
|
102
|
+
</div>
|
|
96
103
|
</div>
|
|
97
104
|
</div>
|
|
98
105
|
</validation-observer>
|
|
@@ -19,6 +19,11 @@
|
|
|
19
19
|
background: #FFF;
|
|
20
20
|
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.10), 0 2px 4px -2px rgba(0, 0, 0, 0.10);
|
|
21
21
|
cursor: pointer;
|
|
22
|
+
transition: all 0.3s ease;
|
|
23
|
+
&:hover {
|
|
24
|
+
transform: translateY(-3px);
|
|
25
|
+
box-shadow: 0 4px 8px -1px rgba(0, 0, 0, 0.30), 0 2px 4px -2px rgba(0, 0, 0, 0.30);
|
|
26
|
+
}
|
|
22
27
|
&-single-price {
|
|
23
28
|
padding: 12px 0;
|
|
24
29
|
border-radius: 8px;
|
|
@@ -15,16 +15,28 @@ import { PRODUCT_STOCK_STATUS_COLORS } from '@lancom/shared/assets/js/constants/
|
|
|
15
15
|
|
|
16
16
|
export default {
|
|
17
17
|
name: 'ProductStockStatus',
|
|
18
|
+
data() {
|
|
19
|
+
const { color, size } = this.$route.query;
|
|
20
|
+
return {
|
|
21
|
+
isDefaultSimpleProductStock: !!color && !!size
|
|
22
|
+
};
|
|
23
|
+
},
|
|
18
24
|
computed: {
|
|
19
|
-
...mapGetters('product', [
|
|
25
|
+
...mapGetters('product', [
|
|
26
|
+
'stockStatus',
|
|
27
|
+
'defaultSimpleProductStockStatus',
|
|
28
|
+
'defaultSimpleProduct'
|
|
29
|
+
]),
|
|
20
30
|
capitalizedStockStatus() {
|
|
21
|
-
|
|
31
|
+
const status = this.isDefaultSimpleProductStock ? this.defaultSimpleProductStockStatus : this.stockStatus;
|
|
32
|
+
if (!status) {
|
|
22
33
|
return '';
|
|
23
34
|
}
|
|
24
|
-
return
|
|
35
|
+
return status.charAt(0).toUpperCase() + status.slice(1);
|
|
25
36
|
},
|
|
26
37
|
stockStatusColor() {
|
|
27
|
-
|
|
38
|
+
const status = this.isDefaultSimpleProductStock ? this.defaultSimpleProductStockStatus : this.stockStatus
|
|
39
|
+
return PRODUCT_STOCK_STATUS_COLORS[status] || 'green';
|
|
28
40
|
}
|
|
29
41
|
}
|
|
30
42
|
};
|
|
@@ -46,12 +46,17 @@
|
|
|
46
46
|
</div>
|
|
47
47
|
</template>
|
|
48
48
|
</v-popover>
|
|
49
|
+
<span
|
|
50
|
+
v-if="printsPrice > 0"
|
|
51
|
+
class="ProductSizeSelectorColor__divider">
|
|
52
|
+
+
|
|
53
|
+
</span>
|
|
49
54
|
<v-popover
|
|
50
55
|
v-if="printsPrice > 0"
|
|
51
56
|
trigger="hover"
|
|
52
57
|
:delay="{ show: 200, hide: 400 }"
|
|
53
58
|
popover-class="tooltip popover white"
|
|
54
|
-
class="ProductSizeSelectorColor__price
|
|
59
|
+
class="ProductSizeSelectorColor__price"
|
|
55
60
|
style="display: inline-block;">
|
|
56
61
|
<span class="lc_regular13">
|
|
57
62
|
{{ productPrintsPrice | price(currency) }}
|
package/mixins/product-view.js
CHANGED
|
@@ -19,7 +19,7 @@ export default (IS_PRODUCT_PRESET_PRINT_PRICING, isEditor = false) => ({
|
|
|
19
19
|
},
|
|
20
20
|
async asyncData({ store, params, error, query, redirect, res }) {
|
|
21
21
|
try {
|
|
22
|
-
const { print, color, colour } = query;
|
|
22
|
+
const { print, color, colour, size } = query;
|
|
23
23
|
const { shop, country, stockCountry, currency } = store.getters;
|
|
24
24
|
const data = {
|
|
25
25
|
shop: shop._id,
|
|
@@ -28,7 +28,8 @@ export default (IS_PRODUCT_PRESET_PRINT_PRICING, isEditor = false) => ({
|
|
|
28
28
|
country: country?._id,
|
|
29
29
|
currency: currency?._id,
|
|
30
30
|
print,
|
|
31
|
-
defaultColor: color || colour
|
|
31
|
+
defaultColor: color || colour,
|
|
32
|
+
defaultSize: size
|
|
32
33
|
};
|
|
33
34
|
|
|
34
35
|
await store.dispatch('product/fetchProduct', data);
|
|
@@ -212,14 +213,15 @@ export default (IS_PRODUCT_PRESET_PRINT_PRICING, isEditor = false) => ({
|
|
|
212
213
|
staticLink,
|
|
213
214
|
getProductQuery() {
|
|
214
215
|
const { slug } = this.$route.params;
|
|
215
|
-
const { color, colour } = this.$route.query;
|
|
216
|
+
const { color, colour, size } = this.$route.query;
|
|
216
217
|
const data = {
|
|
217
218
|
shop: this.shop._id,
|
|
218
219
|
slug,
|
|
219
220
|
country: this.country?._id,
|
|
220
221
|
stockCountry: this.stockCountry?._id,
|
|
221
222
|
currency: this.currency?._id,
|
|
222
|
-
defaultColor: color || colour
|
|
223
|
+
defaultColor: color || colour,
|
|
224
|
+
defaultSize: size
|
|
223
225
|
};
|
|
224
226
|
|
|
225
227
|
return data;
|
package/package.json
CHANGED
package/store/product.js
CHANGED
|
@@ -45,6 +45,7 @@ export const state = () => ({
|
|
|
45
45
|
availablePrintTypes: null,
|
|
46
46
|
isPrintPricing: false,
|
|
47
47
|
editableColor: null,
|
|
48
|
+
defaultSize: null,
|
|
48
49
|
selectedLayer: null,
|
|
49
50
|
selectedLayerCopy: null,
|
|
50
51
|
editablePrintArea: null,
|
|
@@ -75,6 +76,7 @@ export const getters = {
|
|
|
75
76
|
productDetails: ({ productDetails }) => productDetails,
|
|
76
77
|
productDetailsLoaded: ({ productDetails }) => !!productDetails,
|
|
77
78
|
editorSize: ({ editorSize }) => editorSize,
|
|
79
|
+
defaultSize: ({ defaultSize }) => defaultSize,
|
|
78
80
|
editorSizeBreakpoints: ({ editorSizeBreakpoints }) => editorSizeBreakpoints,
|
|
79
81
|
template: ({ template }) => template,
|
|
80
82
|
layers: ({ template }) => template.layers || [],
|
|
@@ -87,7 +89,14 @@ export const getters = {
|
|
|
87
89
|
usedSimpleProducts: ({ template }) => (template.simpleProducts || []).filter(p => p.amount > 0),
|
|
88
90
|
usedSimpleProductsQuantity: ({ template }) => (template.simpleProducts || []).filter(p => p.amount > 0).reduce((sum, { amount }) => sum + amount, 0),
|
|
89
91
|
usedBigSizeSimpleProductsQuantity: (state, { usedSimpleProducts }) => filterBigSize(usedSimpleProducts).reduce((sum, { amount }) => sum + amount, 0),
|
|
90
|
-
defaultSimpleProduct: ({ productDetails, editableColor }) => {
|
|
92
|
+
defaultSimpleProduct: ({ productDetails, editableColor, defaultSize }) => {
|
|
93
|
+
let simpleProduct = null;
|
|
94
|
+
if (defaultSize) {
|
|
95
|
+
simpleProduct = productDetails.simpleProducts.find(({ color, size }) => color._id === editableColor?._id && size?.shortName === defaultSize);
|
|
96
|
+
if (simpleProduct) {
|
|
97
|
+
return simpleProduct;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
91
100
|
return editableColor && (
|
|
92
101
|
productDetails.simpleProducts.find(({ color, size }) => color._id === editableColor._id && size.alias === 'small')
|
|
93
102
|
|| productDetails.simpleProducts.find(({ color }) => color._id === editableColor._id)
|
|
@@ -214,6 +223,9 @@ export const getters = {
|
|
|
214
223
|
return PRODUCT_STOCK_STATUS.NOT_IN_STOCK;
|
|
215
224
|
}
|
|
216
225
|
},
|
|
226
|
+
defaultSimpleProductStockStatus: (state, { defaultSimpleProduct }) => {
|
|
227
|
+
return defaultSimpleProduct?.quantityStock > 0 ? PRODUCT_STOCK_STATUS.ALL_IN_STOCK : PRODUCT_STOCK_STATUS.NOT_IN_STOCK;
|
|
228
|
+
},
|
|
217
229
|
previewPrintArea: ({ previewPrintArea }) => previewPrintArea
|
|
218
230
|
};
|
|
219
231
|
|
|
@@ -249,7 +261,7 @@ export const actions = {
|
|
|
249
261
|
});
|
|
250
262
|
}
|
|
251
263
|
},
|
|
252
|
-
async fetchProductDetails({ commit, state }, { shop, slug, country, stockCountry, currency, defaultColor = 'white' }) {
|
|
264
|
+
async fetchProductDetails({ commit, state }, { shop, slug, country, stockCountry, currency, defaultColor = 'white', defaultSize }) {
|
|
253
265
|
const params = { country, currency, stockCountry };
|
|
254
266
|
commit('setLoadingProductDetails', true);
|
|
255
267
|
const response = await api.fetchProductDetails(shop, slug, params);
|
|
@@ -263,6 +275,10 @@ export const actions = {
|
|
|
263
275
|
state.availableColors[0];
|
|
264
276
|
commit('setEditableColor', editableColor);
|
|
265
277
|
|
|
278
|
+
if (defaultSize) {
|
|
279
|
+
commit('setDefaultSize', defaultSize);
|
|
280
|
+
}
|
|
281
|
+
|
|
266
282
|
let images = editableColor
|
|
267
283
|
? [
|
|
268
284
|
...(state.product.images || []).filter(image => image.color === editableColor._id),
|
|
@@ -377,6 +393,9 @@ export const mutations = {
|
|
|
377
393
|
setBanners(state, banners) {
|
|
378
394
|
state.banners = banners;
|
|
379
395
|
},
|
|
396
|
+
setDefaultSize(state, size) {
|
|
397
|
+
state.defaultSize = size;
|
|
398
|
+
},
|
|
380
399
|
setPriceIncludeGST(state, priceIncludeGST) {
|
|
381
400
|
state.priceIncludeGST = priceIncludeGST;
|
|
382
401
|
},
|