@lancom/shared 0.0.97 → 0.0.101
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 +31 -1
- package/components/checkout/order/order-billing-information/order-billing-information.vue +10 -5
- package/components/common/checkbox.vue +13 -1
- package/components/common/file_uploader.vue +1 -0
- package/components/order/order_view/order-view.vue +3 -0
- package/components/product/product_size_selector/product_size_selector_color/product_size_selector_color_cell/product-size-selector-color-cell.vue +1 -1
- package/components/static_page/static-page.vue +7 -1
- package/package.json +1 -1
- package/plugins/aos-animation.js +1 -1
package/assets/js/api/admin.js
CHANGED
|
@@ -40,6 +40,9 @@ export default {
|
|
|
40
40
|
calculateShipmentRates(order, shipment) {
|
|
41
41
|
return _get(`admin/shop/${order.shop}/order/${order._id}/shipment/${shipment._id || shipment.guid}/calculate-shipping`);
|
|
42
42
|
},
|
|
43
|
+
createPrintLabels(order, shipment, rate) {
|
|
44
|
+
return _post(`admin/shop/${order.shop}/order/${order._id}/shipment/${shipment._id || shipment.guid}/print-labels`, rate);
|
|
45
|
+
},
|
|
43
46
|
createOrderRefund(order, refund, shop) {
|
|
44
47
|
return _post(`shop/${shop}/order/${order}/refund`, refund);
|
|
45
48
|
},
|
|
@@ -49,6 +52,12 @@ export default {
|
|
|
49
52
|
chargeOrderRefund(order, refund, shop) {
|
|
50
53
|
return _post(`shop/${shop}/order/${order}/refund/${refund}/charge`);
|
|
51
54
|
},
|
|
55
|
+
fetchOrderWoTasks(orderId) {
|
|
56
|
+
return _get(`admin/order/${orderId}/wo-tasks`);
|
|
57
|
+
},
|
|
58
|
+
createOrderWoTask(orderId, task) {
|
|
59
|
+
return _post(`admin/order/${orderId}/wo-tasks`, task);
|
|
60
|
+
},
|
|
52
61
|
fetchPages() {
|
|
53
62
|
return _get('admin/pages');
|
|
54
63
|
},
|
|
@@ -92,7 +101,7 @@ export default {
|
|
|
92
101
|
return _post(`shop/${shop}/user/reset-password`, user);
|
|
93
102
|
},
|
|
94
103
|
fetchUsers() {
|
|
95
|
-
return _get('admin/
|
|
104
|
+
return _get('admin/users');
|
|
96
105
|
},
|
|
97
106
|
fetchUserById(id) {
|
|
98
107
|
return _get(`admin/user/${id}`);
|
|
@@ -109,6 +118,12 @@ export default {
|
|
|
109
118
|
removeUser(id) {
|
|
110
119
|
return _delete(`admin/user/${id}`);
|
|
111
120
|
},
|
|
121
|
+
fetchInventoryHistory(params) {
|
|
122
|
+
return _get('admin/inventory-history', params);
|
|
123
|
+
},
|
|
124
|
+
fetchInventory(params) {
|
|
125
|
+
return _get('admin/inventory');
|
|
126
|
+
},
|
|
112
127
|
fetchProducts(params) {
|
|
113
128
|
return _get('admin/products', params);
|
|
114
129
|
},
|
|
@@ -203,6 +218,15 @@ export default {
|
|
|
203
218
|
removeWarehouse(id) {
|
|
204
219
|
return _delete(`admin/warehouse/${id}`);
|
|
205
220
|
},
|
|
221
|
+
fetchWarehouseTaskById(id) {
|
|
222
|
+
return _get(`admin/warehouse-task/${id}`);
|
|
223
|
+
},
|
|
224
|
+
saveWarehouseTask(task) {
|
|
225
|
+
return task._id ? _put(`admin/warehouse-task/${task._id}`, task) : _post('admin/warehouse-task', task);
|
|
226
|
+
},
|
|
227
|
+
removeWarehouseTask(id) {
|
|
228
|
+
return _delete(`admin/warehouse-task/${id}`);
|
|
229
|
+
},
|
|
206
230
|
async fetchBanners(params) {
|
|
207
231
|
return sortByName(await _get('admin/banners', params));
|
|
208
232
|
},
|
|
@@ -370,5 +394,11 @@ export default {
|
|
|
370
394
|
},
|
|
371
395
|
removeEmailTemplate(id) {
|
|
372
396
|
return _delete(`admin/email-templates/${id}`);
|
|
397
|
+
},
|
|
398
|
+
fetchPrinters() {
|
|
399
|
+
return _get('admin/printers');
|
|
400
|
+
},
|
|
401
|
+
sendToPrinter(job) {
|
|
402
|
+
return _post('admin/printers/job', job);
|
|
373
403
|
}
|
|
374
404
|
};
|
|
@@ -5,15 +5,14 @@
|
|
|
5
5
|
</div>
|
|
6
6
|
<div class="OrderBillingInformation__form">
|
|
7
7
|
<validation-observer
|
|
8
|
-
ref="form"
|
|
9
|
-
v-slot="{ invalid }">
|
|
8
|
+
ref="form">
|
|
10
9
|
<div class="OrderBillingInformation__content">
|
|
11
10
|
<address-form
|
|
12
11
|
:address="order.shippingAddress"
|
|
13
12
|
:without-additional-info="true" />
|
|
14
13
|
</div>
|
|
15
14
|
<progress-steps-controls
|
|
16
|
-
:disabled-next="
|
|
15
|
+
:disabled-next="!isValid"
|
|
17
16
|
@prev="$emit('prev')"
|
|
18
17
|
@next="submit" />
|
|
19
18
|
</validation-observer>
|
|
@@ -40,11 +39,17 @@ export default {
|
|
|
40
39
|
},
|
|
41
40
|
data() {
|
|
42
41
|
return {
|
|
43
|
-
copyToShippingAddress: true
|
|
42
|
+
copyToShippingAddress: true,
|
|
43
|
+
isValid: true
|
|
44
44
|
};
|
|
45
45
|
},
|
|
46
46
|
methods: {
|
|
47
|
-
submit() {
|
|
47
|
+
async submit() {
|
|
48
|
+
this.isValid = await this.$refs.form.validate() && !!this.order.shippingAddress.postcode;
|
|
49
|
+
if (!this.isValid) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
|
|
48
53
|
if (this.copyToShippingAddress) {
|
|
49
54
|
this.order.shippingAddress = { ...this.order.shippingAddress };
|
|
50
55
|
this.$emit('next');
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div
|
|
3
|
+
class="Checkbox__wrapper"
|
|
4
|
+
:class="{
|
|
5
|
+
'Checkbox__wrapper--disabled': disabled
|
|
6
|
+
}">
|
|
3
7
|
<input
|
|
4
8
|
:id="id"
|
|
5
9
|
v-model="model"
|
|
10
|
+
:disabled="disabled"
|
|
6
11
|
class="Checkbox__input"
|
|
7
12
|
type="checkbox"
|
|
8
13
|
@change="$emit('change', model)" />
|
|
@@ -27,6 +32,9 @@ export default {
|
|
|
27
32
|
checkedValue: {
|
|
28
33
|
default: true
|
|
29
34
|
},
|
|
35
|
+
disabled: {
|
|
36
|
+
default: false
|
|
37
|
+
},
|
|
30
38
|
uncheckedValue: {
|
|
31
39
|
default: false
|
|
32
40
|
},
|
|
@@ -94,6 +102,10 @@ html[dir=rtl] {
|
|
|
94
102
|
line-height: 16px;
|
|
95
103
|
display: inline-block;
|
|
96
104
|
margin: 2px 0;
|
|
105
|
+
&--disabled {
|
|
106
|
+
pointer-events: none;
|
|
107
|
+
opacity: .7;
|
|
108
|
+
}
|
|
97
109
|
}
|
|
98
110
|
|
|
99
111
|
&__input {
|
|
@@ -83,6 +83,7 @@ export default {
|
|
|
83
83
|
const url = image && staticLink(image.thumb);
|
|
84
84
|
this.$emit('onuploaded', { ...image, url });
|
|
85
85
|
} catch (e) {
|
|
86
|
+
console.dir(e);
|
|
86
87
|
this.onProgress(0);
|
|
87
88
|
const { message, data } = e.response.data;
|
|
88
89
|
if (message === 'Conversion failed' && this.hasConversionErrorModal) {
|
|
@@ -94,7 +94,7 @@ export default {
|
|
|
94
94
|
return (this.simpleProduct || {}).amount || this.defaultValue;
|
|
95
95
|
},
|
|
96
96
|
set(value) {
|
|
97
|
-
const outOfStockQuantity = this.simpleProduct?.quantityStock
|
|
97
|
+
const outOfStockQuantity = this.simpleProduct?.quantityStock;
|
|
98
98
|
if (outOfStockQuantity && outOfStockQuantity < value && this.showMaxModal) {
|
|
99
99
|
const message = `Maximum value: ${outOfStockQuantity}`;
|
|
100
100
|
this.showConfirmationModal(message);
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<article class="StaticPage__wrapper">
|
|
3
|
-
<h1
|
|
3
|
+
<h1
|
|
4
|
+
v-if="visibleTitle"
|
|
5
|
+
class="StaticPage__title lc_h1">
|
|
4
6
|
{{ item.title }}
|
|
5
7
|
</h1>
|
|
6
8
|
<div
|
|
@@ -16,6 +18,10 @@ export default {
|
|
|
16
18
|
item: {
|
|
17
19
|
type: Object,
|
|
18
20
|
required: true
|
|
21
|
+
},
|
|
22
|
+
visibleTitle: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: true
|
|
19
25
|
}
|
|
20
26
|
}
|
|
21
27
|
};
|
package/package.json
CHANGED