@lancom/shared 0.0.149 → 0.0.151
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 +14 -2
- package/components/product/gallery/gallery.vue +4 -3
- package/components/quotes/quote_request/quote-request.vue +2 -1
- package/components/quotes/quote_view/quote_product_color_simple_products/quote-product-color-simple-products.vue +2 -2
- package/mixins/meta-info.js +10 -0
- package/nuxt.config.js +5 -3
- package/package.json +1 -1
package/assets/js/api/admin.js
CHANGED
|
@@ -4,6 +4,18 @@ import { sortSizes } from './../utils/sizes';
|
|
|
4
4
|
import { sortByName } from './../utils/filters';
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
|
+
fetchPostcodes() {
|
|
8
|
+
return _get('admin/postcodes');
|
|
9
|
+
},
|
|
10
|
+
fetchPostcodeById(id) {
|
|
11
|
+
return _get(`admin/postcode/${id}`);
|
|
12
|
+
},
|
|
13
|
+
savePostcode(postcode) {
|
|
14
|
+
return postcode._id ? _put(`admin/postcode/${postcode._id}`, postcode) : _post('admin/postcode', postcode);
|
|
15
|
+
},
|
|
16
|
+
removePostcode(id) {
|
|
17
|
+
return _delete(`admin/postcode/${id}`);
|
|
18
|
+
},
|
|
7
19
|
fetchNews() {
|
|
8
20
|
return _get('admin/news');
|
|
9
21
|
},
|
|
@@ -67,8 +79,8 @@ export default {
|
|
|
67
79
|
orderSubOrders(body) {
|
|
68
80
|
return _post('admin/sub-orders/ordered', body);
|
|
69
81
|
},
|
|
70
|
-
|
|
71
|
-
return _post(`admin/shop/${order.shop}/order/${order._id}/invoice`, invoice);
|
|
82
|
+
saveOrderSubsequentInvoice(order, invoice) {
|
|
83
|
+
return invoice._id ? _put(`admin/shop/${order.shop}/order/${order._id}/invoice/${invoice._id}`, invoice) : _post(`admin/shop/${order.shop}/order/${order._id}/invoice`, invoice);
|
|
72
84
|
},
|
|
73
85
|
sendOrderSubsequentInvoice(order, invoice) {
|
|
74
86
|
return _post(`admin/shop/${order.shop}/order/${order._id}/invoice/${invoice}/send`);
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
@click="goToSlideAndChangeColor(index)"
|
|
68
68
|
v-lazy:background-image="staticLink(image.small)">
|
|
69
69
|
<div class="Gallery__small-printed">
|
|
70
|
-
{{ image.printType ? 'Printed' : (product.prePrint ? product.prePrintText : 'Blank') }}
|
|
70
|
+
{{ image.printType ? 'Printed' : (product.prePrint ? product.prePrintText : image.colorName || 'Blank') }}
|
|
71
71
|
</div>
|
|
72
72
|
</div>
|
|
73
73
|
</vue-slick-carousel>
|
|
@@ -137,7 +137,7 @@ export default {
|
|
|
137
137
|
};
|
|
138
138
|
},
|
|
139
139
|
computed: {
|
|
140
|
-
...mapGetters('product', ['product', 'images', 'editableColor']),
|
|
140
|
+
...mapGetters('product', ['product', 'images', 'editableColor', 'availableColors']),
|
|
141
141
|
hasValidFilters() {
|
|
142
142
|
return this.validFilters.length > 1;
|
|
143
143
|
},
|
|
@@ -154,7 +154,8 @@ export default {
|
|
|
154
154
|
name: printType.name,
|
|
155
155
|
pricing
|
|
156
156
|
};
|
|
157
|
-
|
|
157
|
+
const color = this.availableColors.find(({ _id }) => _id === image.color);
|
|
158
|
+
return { ...image, print, colorName: color?.name };
|
|
158
159
|
});
|
|
159
160
|
}
|
|
160
161
|
},
|
|
@@ -48,14 +48,14 @@
|
|
|
48
48
|
{{ group.amount }}
|
|
49
49
|
</div>
|
|
50
50
|
</div>
|
|
51
|
-
<div class="QuoteProductColorSimpleProducts__total mt-6">
|
|
51
|
+
<!-- <div class="QuoteProductColorSimpleProducts__total mt-6">
|
|
52
52
|
<div class="lc_title-small">
|
|
53
53
|
Total price:
|
|
54
54
|
</div>
|
|
55
55
|
<div class="lc_body-small">
|
|
56
56
|
{{ group.productsTotal | price }}
|
|
57
57
|
</div>
|
|
58
|
-
</div>
|
|
58
|
+
</div> -->
|
|
59
59
|
</div>
|
|
60
60
|
</div>
|
|
61
61
|
</div>
|
package/mixins/meta-info.js
CHANGED
|
@@ -26,6 +26,8 @@ const metaInfo = {
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
head() {
|
|
29
|
+
const hasQueryParams = Object.keys(this.$route.query || {}).length > 0;
|
|
30
|
+
|
|
29
31
|
const { title, short_text: shortText, image, meta = {} } = this.routeInfo || {};
|
|
30
32
|
const pageItemMeta = this.pageItem?.meta || {};
|
|
31
33
|
|
|
@@ -37,6 +39,14 @@ const metaInfo = {
|
|
|
37
39
|
content: pageTitle
|
|
38
40
|
}];
|
|
39
41
|
|
|
42
|
+
if (hasQueryParams) {
|
|
43
|
+
metaTags.push({
|
|
44
|
+
hid: 'robots',
|
|
45
|
+
name: 'robots',
|
|
46
|
+
content: 'noindex'
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
|
|
40
50
|
const pageDescription = this.fillWithItemData(pageItemMeta.description || meta.description || shortText);
|
|
41
51
|
if (pageDescription) {
|
|
42
52
|
metaTags.push({
|
package/nuxt.config.js
CHANGED
|
@@ -110,9 +110,11 @@ module.exports = (config, axios, { raygunClient } = {}) => ({
|
|
|
110
110
|
const catalogFrontImages = (product.images || []).filter(i => (i.types || []).includes('catalog_front')).map(i => i.image);
|
|
111
111
|
const image = spliceFirstImage(feedImages) || spliceFirstImage(frontImages) || spliceFirstImage(catalogFrontImages) || spliceFirstImage(backImages) || {};
|
|
112
112
|
const images = getImages(backImages) || getImages(frontImages) || [];
|
|
113
|
-
const
|
|
114
|
-
|
|
115
|
-
|
|
113
|
+
const feedTitle = (product.feedTitle || '')
|
|
114
|
+
.replace(/{colour}/g, sp.color.name)
|
|
115
|
+
.replace(/{size}/g, sp.size.name)
|
|
116
|
+
.replace(/{brand}/g, product.brand.name)
|
|
117
|
+
const title = feedTitle || `${product.name} ${sp.color.name}`;
|
|
116
118
|
const description = `${product.description || product.fabricInfoShort || product.name || ''}`
|
|
117
119
|
.replace(/ /g, ' ')
|
|
118
120
|
.replace(/·/, '·');
|