@lancom/shared 0.0.202 → 0.0.204
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 +2 -5
- package/assets/js/utils/filters.js +1 -1
- package/components/checkout/order/order-payment-information/order-payment-information.vue +4 -1
- package/components/checkout/order/order-review/order-review.vue +4 -1
- package/components/editor/editor_print_area_options/editor_print_area_option/editor-print-area-option.vue +2 -2
- package/components/editor/editor_workspace/editor-workspace.vue +1 -1
- package/components/editor/editor_workspace/editor_workspace_side/editor-workspace-side.vue +2 -2
- package/components/quotes/quote_view/quote-view.mixin.js +3 -1
- package/nuxt.config.js +2 -1
- package/package.json +1 -1
- package/store/index.js +8 -8
package/assets/js/api/admin.js
CHANGED
|
@@ -58,8 +58,8 @@ export default {
|
|
|
58
58
|
getCanonicalProductProducts(id) {
|
|
59
59
|
return _get(`admin/canonical-product/${id}/products`);
|
|
60
60
|
},
|
|
61
|
-
fetchShops() {
|
|
62
|
-
return _get('admin/shops');
|
|
61
|
+
fetchShops(params) {
|
|
62
|
+
return _get('admin/shops', params);
|
|
63
63
|
},
|
|
64
64
|
fetchShopById(id) {
|
|
65
65
|
return _get(`admin/shops/${id}`);
|
|
@@ -389,9 +389,6 @@ export default {
|
|
|
389
389
|
async fetchCurrencies(params) {
|
|
390
390
|
return sortByName(await _get('admin/currencies', params));
|
|
391
391
|
},
|
|
392
|
-
async fetchCountries(params) {
|
|
393
|
-
return sortByName(await _get('admin/countries', params));
|
|
394
|
-
},
|
|
395
392
|
fetchCountryById(id) {
|
|
396
393
|
return _get(`admin/countries/${id}`);
|
|
397
394
|
},
|
|
@@ -103,6 +103,7 @@ export default {
|
|
|
103
103
|
};
|
|
104
104
|
},
|
|
105
105
|
computed: {
|
|
106
|
+
...mapGetters(['country', 'currency']),
|
|
106
107
|
...mapGetters(['orderSettings']),
|
|
107
108
|
...mapGetters('order', ['card']),
|
|
108
109
|
...mapGetters('cart', ['entities', 'notEmptySimpleProducts', 'cartPricing'])
|
|
@@ -158,7 +159,9 @@ export default {
|
|
|
158
159
|
...this.order,
|
|
159
160
|
products: this.entities,
|
|
160
161
|
pricing: this.cartPricing,
|
|
161
|
-
shop: this.shop._id
|
|
162
|
+
shop: this.shop._id,
|
|
163
|
+
currency: this.currency?._id,
|
|
164
|
+
country: this.country?._id
|
|
162
165
|
});
|
|
163
166
|
} else {
|
|
164
167
|
const data = {
|
|
@@ -74,6 +74,7 @@ export default {
|
|
|
74
74
|
};
|
|
75
75
|
},
|
|
76
76
|
computed: {
|
|
77
|
+
...mapGetters(['country','currency']),
|
|
77
78
|
...mapGetters('cart', ['entities', 'notEmptySimpleProducts', 'cartPricing']),
|
|
78
79
|
isPaymentOrder() {
|
|
79
80
|
return this.order.paymentMethod === ORDER_PAYMENT_METHOD.CARD;
|
|
@@ -95,7 +96,9 @@ export default {
|
|
|
95
96
|
...this.order,
|
|
96
97
|
products: this.entities,
|
|
97
98
|
pricing: this.cartPricing,
|
|
98
|
-
shop: this.shop._id
|
|
99
|
+
shop: this.shop._id,
|
|
100
|
+
currency: this.currency?._id,
|
|
101
|
+
country: this.country?._id
|
|
99
102
|
});
|
|
100
103
|
} else {
|
|
101
104
|
const data = {
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
class="EditorPrintAreaOption__content"
|
|
5
5
|
:class="{ selected }"
|
|
6
6
|
@click="handleClick"
|
|
7
|
-
@mouseover="
|
|
8
|
-
@mouseleave="
|
|
7
|
+
@mouseover="$emit('option-mouseover', option)"
|
|
8
|
+
@mouseleave="$emit('option-mouseleave', option)">
|
|
9
9
|
<div class="lc_caption">
|
|
10
10
|
{{ option.label }}
|
|
11
11
|
</div>
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
<editor-print-area-options
|
|
92
92
|
v-if="productDetailsLoaded"
|
|
93
93
|
:product="product"
|
|
94
|
-
:selected="selectedPrintArea"
|
|
94
|
+
:selected="selectedPrintArea._id"
|
|
95
95
|
:side="editableSide.id"
|
|
96
96
|
@select="selectPrintArea"
|
|
97
97
|
@option-mouseover="toogleBoundBox(true, $event)"
|
|
@@ -89,7 +89,7 @@ export default {
|
|
|
89
89
|
type: Object
|
|
90
90
|
},
|
|
91
91
|
printAreaSize: {
|
|
92
|
-
type:
|
|
92
|
+
type: Object,
|
|
93
93
|
required: true
|
|
94
94
|
},
|
|
95
95
|
zoomSize: {
|
|
@@ -150,7 +150,7 @@ export default {
|
|
|
150
150
|
);
|
|
151
151
|
},
|
|
152
152
|
printAreaIsSmall() {
|
|
153
|
-
return this.printAreaSize === 'rect10';
|
|
153
|
+
return this.printAreaSize.alias === 'rect10';
|
|
154
154
|
},
|
|
155
155
|
backgroundColor() {
|
|
156
156
|
return this.backgroundImageLoaded && this.editableColor?.rgb;
|
|
@@ -23,7 +23,7 @@ export default {
|
|
|
23
23
|
},
|
|
24
24
|
computed: {
|
|
25
25
|
...mapGetters('quote', ['quote', 'option', 'proceedOption', 'selectedOption', 'depositInfo', 'shopContacts', 'quoteAddress', 'quoteId', 'options', 'gstTax']),
|
|
26
|
-
...mapGetters(['shop'])
|
|
26
|
+
...mapGetters(['shop', 'country', 'currency'])
|
|
27
27
|
},
|
|
28
28
|
methods: {
|
|
29
29
|
...mapActions('quote', ['selectOption', 'clear']),
|
|
@@ -48,6 +48,8 @@ export default {
|
|
|
48
48
|
createOrder(option) {
|
|
49
49
|
const orderData = {
|
|
50
50
|
shop: this.shop._id,
|
|
51
|
+
country: this.country?._id,
|
|
52
|
+
currency: this.currency?._id,
|
|
51
53
|
...convertQuoteToOrder(this.quote, option)
|
|
52
54
|
};
|
|
53
55
|
return api.createOrder(orderData, this.shop._id);
|
package/nuxt.config.js
CHANGED
|
@@ -81,7 +81,8 @@ module.exports = (config, axios, { raygunClient } = {}) => ({
|
|
|
81
81
|
PROD_CDN_URL: process.env.PROD_CDN_URL,
|
|
82
82
|
DEV_CDN_URL: process.env.DEV_CDN_URL,
|
|
83
83
|
PROD_S3_BUCKET: process.env.PROD_S3_BUCKET,
|
|
84
|
-
DEV_S3_BUCKET: process.env.DEV_S3_BUCKET
|
|
84
|
+
DEV_S3_BUCKET: process.env.DEV_S3_BUCKET,
|
|
85
|
+
STATIC_URL: process.env.STATIC_URL
|
|
85
86
|
},
|
|
86
87
|
build: {
|
|
87
88
|
publicPath: '/client/',
|
package/package.json
CHANGED
package/store/index.js
CHANGED
|
@@ -45,14 +45,14 @@ export const actions = {
|
|
|
45
45
|
commit('setMenus', menus);
|
|
46
46
|
commit('setShop', shop);
|
|
47
47
|
commit('setSettings', shop.settings);
|
|
48
|
-
if (req.headers.cookie) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
48
|
+
// if (req.headers.cookie) {
|
|
49
|
+
const { country, currency } = (req.headers.cookie && cookieparser.parse(req.headers.cookie)) || {};
|
|
50
|
+
const headers = (req && req.headers) ? Object.assign({}, req.headers) : {};
|
|
51
|
+
const params = { country, currency, ip: headers['x-real-ip'] || req.ip };
|
|
52
|
+
const settings = await api.fetchClientSettings(shop._id, params);
|
|
53
|
+
commit('setCountry', settings.country);
|
|
54
|
+
commit('setCurrency', settings.currency);
|
|
55
|
+
// }
|
|
56
56
|
try {
|
|
57
57
|
if (req.headers.cookie) {
|
|
58
58
|
const { auth } = cookieparser.parse(req.headers.cookie);
|