@lancom/shared 0.0.124 → 0.0.125
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 +15 -0
- package/package.json +1 -1
package/assets/js/api/admin.js
CHANGED
|
@@ -37,6 +37,21 @@ export default {
|
|
|
37
37
|
saveOrder(order) {
|
|
38
38
|
return order._id ? _put(`admin/order/${order._id}`, order) : _post('admin/order', order);
|
|
39
39
|
},
|
|
40
|
+
fetchPurchaseOrders(params) {
|
|
41
|
+
return _get(`admin/purchase-orders`, params);
|
|
42
|
+
},
|
|
43
|
+
fetchPurchaseOrderById(id, params) {
|
|
44
|
+
return _get(`admin/purchase-order/${id}`, params);
|
|
45
|
+
},
|
|
46
|
+
savePurchaseOrder(purchaseOrder) {
|
|
47
|
+
return purchaseOrder._id ? _put(`admin/purchase-order/${purchaseOrder._id}`, purchaseOrder) : _post('admin/purchase-order', purchaseOrder);
|
|
48
|
+
},
|
|
49
|
+
fetchPurchaseOrderWoTasks(purchaseOrderId) {
|
|
50
|
+
return _get(`admin/purchase-order/${purchaseOrderId}/wo-tasks`);
|
|
51
|
+
},
|
|
52
|
+
orderSubOrders(body) {
|
|
53
|
+
return _post('admin/sub-orders/ordered', body);
|
|
54
|
+
},
|
|
40
55
|
createOrderSubsequentInvoice(order, invoice) {
|
|
41
56
|
return _post(`admin/shop/${order.shop}/order/${order._id}/invoice`, invoice);
|
|
42
57
|
},
|