@lancom/shared 0.0.322 → 0.0.323
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/order/order_view/order-view.mixin.js +14 -0
- package/components/order/order_view/order-view.vue +34 -0
- package/components/product/gallery/gallery.vue +1 -1
- package/components/quotes/quote_view/quote-view.vue +8 -6
- package/feeds/google-shopping.js +1 -1
- package/package.json +1 -1
- package/store/quote.js +1 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { mapGetters } from 'vuex';
|
|
2
2
|
import { price, shortDate, tax } from '@lancom/shared/assets/js/utils/filters';
|
|
3
3
|
import { getShopCountrySettings } from '@lancom/shared/assets/js/utils/shop';
|
|
4
|
+
import { isSameAddresses } from '@lancom/shared/assets/js/utils/address';
|
|
4
5
|
|
|
5
6
|
export default {
|
|
6
7
|
filters: {
|
|
@@ -34,6 +35,9 @@ export default {
|
|
|
34
35
|
isPaid() {
|
|
35
36
|
return this.model.paymentStatus === 'paid';
|
|
36
37
|
},
|
|
38
|
+
isDisplayShippingAddress() {
|
|
39
|
+
return !isSameAddresses(this.order.shippingAddress, this.displayAddress);
|
|
40
|
+
},
|
|
37
41
|
orderId() {
|
|
38
42
|
return `${this.order.code}`.replace('ORDER', '');
|
|
39
43
|
},
|
|
@@ -67,6 +71,16 @@ export default {
|
|
|
67
71
|
purchaseOrderNumber() {
|
|
68
72
|
return this.invoice?.purchaseOrderNumber || this.order.purchaseOrderNumber;
|
|
69
73
|
},
|
|
74
|
+
shippingAddress() {
|
|
75
|
+
return [
|
|
76
|
+
this.order.shippingAddress?.addressLine1,
|
|
77
|
+
this.order.shippingAddress?.addressLine2,
|
|
78
|
+
this.order.shippingAddress?.city,
|
|
79
|
+
this.order.shippingAddress?.postcode,
|
|
80
|
+
this.order.shippingAddress?.state,
|
|
81
|
+
this.order.shippingAddress?.country
|
|
82
|
+
].filter(i => !!i).join(', ');
|
|
83
|
+
},
|
|
70
84
|
orderAddress() {
|
|
71
85
|
return [
|
|
72
86
|
this.displayAddress.addressLine1,
|
|
@@ -64,6 +64,11 @@
|
|
|
64
64
|
<div class="lc_regular16">
|
|
65
65
|
<b>Order</b>
|
|
66
66
|
</div>
|
|
67
|
+
<div
|
|
68
|
+
v-if="isDisplayShippingAddress"
|
|
69
|
+
class="mt-10">
|
|
70
|
+
<b>Billing Address</b>
|
|
71
|
+
</div>
|
|
67
72
|
<div class="lc_regular16">
|
|
68
73
|
{{ fullName }}
|
|
69
74
|
</div>
|
|
@@ -86,6 +91,35 @@
|
|
|
86
91
|
<div class="lc_regular16">
|
|
87
92
|
{{ additionalInfo }}
|
|
88
93
|
</div>
|
|
94
|
+
<div
|
|
95
|
+
v-if="isDisplayShippingAddress && order.shippingAddress"
|
|
96
|
+
class="mt-10">
|
|
97
|
+
<div>
|
|
98
|
+
<b>Shipping Address</b>
|
|
99
|
+
</div>
|
|
100
|
+
<div class="lc_regular16">
|
|
101
|
+
{{ order.shippingAddress.fullName }}
|
|
102
|
+
</div>
|
|
103
|
+
<div
|
|
104
|
+
v-if="order.shippingAddress.company"
|
|
105
|
+
class="lc_regular16">
|
|
106
|
+
{{ order.shippingAddress.company }}
|
|
107
|
+
</div>
|
|
108
|
+
<div
|
|
109
|
+
v-if="order.shippingAddress.phone"
|
|
110
|
+
class="lc_regular16">
|
|
111
|
+
{{ order.shippingAddress.phone }}
|
|
112
|
+
</div>
|
|
113
|
+
<div class="lc_regular16">
|
|
114
|
+
{{ order.shippingAddress.email }}
|
|
115
|
+
</div>
|
|
116
|
+
<div class="lc_regular16">
|
|
117
|
+
{{ shippingAddress }}
|
|
118
|
+
</div>
|
|
119
|
+
<div class="lc_regular16">
|
|
120
|
+
{{ order.shippingAddress.additionalInfo }}
|
|
121
|
+
</div>
|
|
122
|
+
</div>
|
|
89
123
|
</td>
|
|
90
124
|
<td
|
|
91
125
|
v-if="model.paid"
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
<div
|
|
19
19
|
v-if="currentImage.print.pricing"
|
|
20
20
|
class="Gallery__big-print-price">
|
|
21
|
-
Printing at <price :price="currentImage.print.pricing.price" /> for ({{
|
|
21
|
+
Printing at <price :price="currentImage.print.pricing.price" /> for ({{ currentImage.print.pricing.min || 1 }}+)
|
|
22
22
|
</div>
|
|
23
23
|
<div class="Gallery__big-print-price-info">
|
|
24
24
|
example only
|
|
@@ -30,12 +30,14 @@
|
|
|
30
30
|
<tr>
|
|
31
31
|
<td>
|
|
32
32
|
<div><b>QUOTE</b></div>
|
|
33
|
-
<div
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
<div v-if="quote.address">
|
|
34
|
+
<div>{{ quote.address.fullName }}</div>
|
|
35
|
+
<div v-if="quote.address.company">{{ quote.address.company }}</div>
|
|
36
|
+
<div v-if="quote.address.phone">{{ quote.address.phone }}</div>
|
|
37
|
+
<div>{{ quote.address.email }}</div>
|
|
38
|
+
<div>{{ quoteAddress }}</div>
|
|
39
|
+
<div>{{ quote.address.additionalInfo }}</div>
|
|
40
|
+
</div>
|
|
39
41
|
</td>
|
|
40
42
|
<td class="w-50">
|
|
41
43
|
<div><b>{{ MESSAGES.DIRECT_DEPOSIT_DETAILS || 'DIRECT DEPOSIT DETAILS'}}</b></div>
|
package/feeds/google-shopping.js
CHANGED
|
@@ -41,7 +41,7 @@ async function googleShoppingFeed(axios, config, availableStores, country, endSl
|
|
|
41
41
|
const backImages = (product.images || []).filter(i => (i.types || []).includes('back') && sp.color._id === i.color).map(i => i.image);
|
|
42
42
|
const catalogFrontImages = (product.images || []).filter(i => (i.types || []).includes('catalog_front')).map(i => i.image);
|
|
43
43
|
const image = spliceFirstImage(feedImages) || spliceFirstImage(frontImages) || spliceFirstImage(catalogFrontImages) || spliceFirstImage(backImages) || null;
|
|
44
|
-
const images = getImages(backImages) || getImages(frontImages) || [];
|
|
44
|
+
const images = (!backImages?.includes(image) && getImages(backImages)) || (!frontImages?.includes(image) && getImages(frontImages)) || [];
|
|
45
45
|
const feedTitle = (product.feedTitle || '')
|
|
46
46
|
.replace(/{colour}/g, sp.color.name)
|
|
47
47
|
.replace(/{size}/g, sp.size.name)
|
package/package.json
CHANGED
package/store/quote.js
CHANGED
|
@@ -10,6 +10,7 @@ export const state = () => ({
|
|
|
10
10
|
|
|
11
11
|
export const getters = {
|
|
12
12
|
quote: ({ quote }) => quote,
|
|
13
|
+
address: ({ quote }) => quote.address || quote.billingAddress,
|
|
13
14
|
viewedOptions: ({ viewedOptions }) => viewedOptions,
|
|
14
15
|
viewedOptionsMap: ({ viewedOptions }) => viewedOptions?.reduce((data, option) => ({ ...data, [option]: true }), {}),
|
|
15
16
|
option: ({ option }) => option,
|