@lancom/shared 0.0.65 → 0.0.66
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/scss/ui_kit/_typography.scss +9 -1
- package/components/product/layouts/product_colors_selector/product_colors_selector_options/product-colors-selector-options.vue +1 -1
- package/components/product/product_price_range/product-price-range.vue +32 -5
- package/nuxt.config.js +12 -11
- package/package.json +1 -1
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
@import "@/assets/scss/variables";
|
|
2
2
|
.lc {
|
|
3
|
+
&_bold {
|
|
4
|
+
font-weight: 800 !important;
|
|
5
|
+
}
|
|
3
6
|
&_capitalize {
|
|
4
7
|
text-transform: capitalize;
|
|
5
8
|
}
|
|
@@ -190,7 +193,12 @@
|
|
|
190
193
|
font-size: 10px;
|
|
191
194
|
line-height: 110%;
|
|
192
195
|
}
|
|
193
|
-
|
|
196
|
+
&_regular11 {
|
|
197
|
+
font-style: normal;
|
|
198
|
+
font-weight: normal;
|
|
199
|
+
font-size: 11px;
|
|
200
|
+
line-height: 110%;
|
|
201
|
+
}
|
|
194
202
|
&_regular12 {
|
|
195
203
|
font-style: normal;
|
|
196
204
|
font-weight: normal;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
:key="color._id"
|
|
6
6
|
v-tooltip="color.name"
|
|
7
7
|
class="ProductColorsSelectorOptions__color"
|
|
8
|
-
:class="{ selected:
|
|
8
|
+
:class="{ selected: editableColor === color }"
|
|
9
9
|
@click="toggleSelection(color)">
|
|
10
10
|
<product-color-image
|
|
11
11
|
:color="color"
|
|
@@ -4,29 +4,51 @@
|
|
|
4
4
|
<div
|
|
5
5
|
v-if="product[minPriceAttr] === product[maxPriceAttr]"
|
|
6
6
|
class="ProductPriceRange__price lc_h4">
|
|
7
|
-
|
|
7
|
+
<div
|
|
8
|
+
v-if="withGst"
|
|
9
|
+
class="lc_h4">
|
|
10
|
+
{{ product[minPriceAttr] | tax(gstTax) | price }}
|
|
11
|
+
<span class="lc_regular11 lc_bold">inc. GST</span>
|
|
12
|
+
</div>
|
|
13
|
+
<div :class="withGst ? 'lc_regular11' : 'lc_h4'">
|
|
14
|
+
{{ prePriceText }} {{ product[minPriceAttr] | price }} + GST
|
|
15
|
+
</div>
|
|
8
16
|
</div>
|
|
9
17
|
<div
|
|
10
18
|
v-else
|
|
11
|
-
class="ProductPriceRange__price
|
|
12
|
-
|
|
19
|
+
class="ProductPriceRange__price">
|
|
20
|
+
<div
|
|
21
|
+
v-if="withGst"
|
|
22
|
+
class="lc_h4">
|
|
23
|
+
{{ product[minPriceAttr] | tax(gstTax) | price }} {{ rangeDivider }} {{ product[maxPriceAttr] | tax(gstTax) | price }}
|
|
24
|
+
<span class="lc_regular11 lc_bold"> inc. GST</span>
|
|
25
|
+
</div>
|
|
26
|
+
<div :class="withGst ? 'lc_regular11' : 'lc_h4'">
|
|
27
|
+
{{ prePriceText }} {{ product[minPriceAttr] | price }} {{ rangeDivider }} {{ product[maxPriceAttr] | price }} + GST
|
|
28
|
+
</div>
|
|
13
29
|
</div>
|
|
14
30
|
</div>
|
|
15
31
|
</template>
|
|
16
32
|
|
|
17
33
|
<script>
|
|
18
|
-
import {
|
|
34
|
+
import { mapGetters } from 'vuex';
|
|
35
|
+
import { price, tax } from '@lancom/shared/assets/js/utils/filters';
|
|
19
36
|
|
|
20
37
|
export default {
|
|
21
38
|
name: 'ProductPriceRange',
|
|
22
39
|
filters: {
|
|
23
|
-
price
|
|
40
|
+
price,
|
|
41
|
+
tax
|
|
24
42
|
},
|
|
25
43
|
props: {
|
|
26
44
|
product: {
|
|
27
45
|
type: Object,
|
|
28
46
|
required: true
|
|
29
47
|
},
|
|
48
|
+
withGst: {
|
|
49
|
+
type: Object,
|
|
50
|
+
required: true
|
|
51
|
+
},
|
|
30
52
|
minPriceAttr: {
|
|
31
53
|
type: String,
|
|
32
54
|
default: 'minPrice'
|
|
@@ -43,6 +65,11 @@ export default {
|
|
|
43
65
|
type: String,
|
|
44
66
|
default: '-'
|
|
45
67
|
}
|
|
68
|
+
},
|
|
69
|
+
computed: {
|
|
70
|
+
...mapGetters([
|
|
71
|
+
'gstTax'
|
|
72
|
+
])
|
|
46
73
|
}
|
|
47
74
|
};
|
|
48
75
|
</script>
|
package/nuxt.config.js
CHANGED
|
@@ -86,8 +86,8 @@ module.exports = (config, axios) => ({
|
|
|
86
86
|
item: data.map(item => {
|
|
87
87
|
const spliceFirstImage = images => (images || []).splice(0, 1)[0];
|
|
88
88
|
const getImages = images => (images || []).length > 0 ? images : null;
|
|
89
|
-
const image = spliceFirstImage(item.
|
|
90
|
-
const images = getImages(item.
|
|
89
|
+
const image = spliceFirstImage(item.frontImages) || spliceFirstImage(item.backImages) || {};
|
|
90
|
+
const images = getImages(item.backImages) || getImages(item.frontImages) || [];
|
|
91
91
|
return {
|
|
92
92
|
title: { _text: `${item.name} ${item.color}-${item.size}` },
|
|
93
93
|
link: { _text: `https://${config.HOST_NAME}${item.link}` },
|
|
@@ -97,19 +97,20 @@ module.exports = (config, axios) => ({
|
|
|
97
97
|
'g:size_system': 'AU',
|
|
98
98
|
'g:size_type': 'regular',
|
|
99
99
|
'g:gender': { _text: item.gender },
|
|
100
|
-
'g:material': { _text: item.
|
|
100
|
+
'g:material': { _text: item.material },
|
|
101
101
|
'g:brand': { _text: item.brand },
|
|
102
102
|
'g:condition': { _text: item.condition },
|
|
103
103
|
'g:mpn': { _text: item.mpn },
|
|
104
104
|
'g:color': { _text: item.color },
|
|
105
|
-
'g:image_link': image
|
|
106
|
-
'g:additional_image_link': images.map(i => i
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
105
|
+
'g:image_link': { _text: image },
|
|
106
|
+
'g:additional_image_link': images.map(i => ({ _text: i })),
|
|
107
|
+
'g:price': { _text: `${(item.maxUnprintedPrice || 0).toFixed(2)}AUD` },
|
|
108
|
+
'g:availability': { _text: item.availability },
|
|
109
|
+
'g:google_product_category': { _text: 2047 },
|
|
110
|
+
'g:product_type': { _text: item.productType },
|
|
111
|
+
'g:is_bundle': { _text: item.bundle },
|
|
112
|
+
'g:identifier_exists': 'no',
|
|
113
|
+
'g:product_weight': { _text: item.weight }
|
|
113
114
|
};
|
|
114
115
|
})
|
|
115
116
|
};
|