@lancom/shared 0.0.98 → 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 +12 -7
- package/components/common/checkbox.vue +13 -1
- package/package.json +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
|
},
|
|
@@ -55,13 +58,6 @@ export default {
|
|
|
55
58
|
createOrderWoTask(orderId, task) {
|
|
56
59
|
return _post(`admin/order/${orderId}/wo-tasks`, task);
|
|
57
60
|
},
|
|
58
|
-
saveWoTask(task) {
|
|
59
|
-
const url = `admin/warehouse/${task.warehouse}/tasks/${task._id}`;
|
|
60
|
-
return task._id ? _put(url, task) : _post(url, task);
|
|
61
|
-
},
|
|
62
|
-
fetchWarehouseTaskById(warehouse, task) {
|
|
63
|
-
return _get(`admin/warehouse/${warehouse}/tasks/${task}`);
|
|
64
|
-
},
|
|
65
61
|
fetchPages() {
|
|
66
62
|
return _get('admin/pages');
|
|
67
63
|
},
|
|
@@ -216,6 +212,15 @@ export default {
|
|
|
216
212
|
removeWarehouse(id) {
|
|
217
213
|
return _delete(`admin/warehouse/${id}`);
|
|
218
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
|
+
},
|
|
219
224
|
async fetchBanners(params) {
|
|
220
225
|
return sortByName(await _get('admin/banners', params));
|
|
221
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 {
|