@lancom/shared 0.0.95 → 0.0.99
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
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}`);
|
|
@@ -191,6 +200,9 @@ export default {
|
|
|
191
200
|
async fetchWarehouses(params) {
|
|
192
201
|
return sortByName(await _get('admin/warehouse', params));
|
|
193
202
|
},
|
|
203
|
+
fetchWarehouseLocations(params) {
|
|
204
|
+
return _get('admin/warehouse/locations', params);
|
|
205
|
+
},
|
|
194
206
|
fetchWarehouseById(id) {
|
|
195
207
|
return _get(`admin/warehouse/${id}`);
|
|
196
208
|
},
|
|
@@ -200,6 +212,15 @@ export default {
|
|
|
200
212
|
removeWarehouse(id) {
|
|
201
213
|
return _delete(`admin/warehouse/${id}`);
|
|
202
214
|
},
|
|
215
|
+
fetchWarehouseTaskById(id) {
|
|
216
|
+
return _get(`admin/warehouse-task/${id}`);
|
|
217
|
+
},
|
|
218
|
+
saveWarehouseTask(task) {
|
|
219
|
+
return task._id ? _put(`admin/warehouse-task/${task._id}`, task) : _post('admin/warehouse-task', task);
|
|
220
|
+
},
|
|
221
|
+
removeWarehouseTask(id) {
|
|
222
|
+
return _delete(`admin/warehouse-task/${id}`);
|
|
223
|
+
},
|
|
203
224
|
async fetchBanners(params) {
|
|
204
225
|
return sortByName(await _get('admin/banners', params));
|
|
205
226
|
},
|
|
@@ -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 {
|
|
@@ -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);
|
package/mixins/meta-info.js
CHANGED
|
@@ -82,7 +82,12 @@ const metaInfo = {
|
|
|
82
82
|
|
|
83
83
|
return {
|
|
84
84
|
title: pageTitle,
|
|
85
|
-
meta: metaTags
|
|
85
|
+
meta: metaTags,
|
|
86
|
+
link: [{
|
|
87
|
+
hid: 'canonical',
|
|
88
|
+
rel: 'canonical',
|
|
89
|
+
href: `https://${process.env.HOST_NAME}${this.$route.path === '/' ? '' : this.$route.path}`
|
|
90
|
+
}]
|
|
86
91
|
};
|
|
87
92
|
},
|
|
88
93
|
getRoute() {
|