@lancom/shared 0.0.176 → 0.0.177
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
|
@@ -85,8 +85,8 @@ export default {
|
|
|
85
85
|
savePurchaseOrder(purchaseOrder) {
|
|
86
86
|
return purchaseOrder._id ? _put(`admin/purchase-order/${purchaseOrder._id}`, purchaseOrder) : _post('admin/purchase-order', purchaseOrder);
|
|
87
87
|
},
|
|
88
|
-
savePurchaseOrderShipment(purchaseOrder, shipment
|
|
89
|
-
return _put(`admin/purchase-order/${purchaseOrder._id}/shipments/${shipment._id}`, shipment
|
|
88
|
+
savePurchaseOrderShipment(purchaseOrder, shipment) {
|
|
89
|
+
return _put(`admin/purchase-order/${purchaseOrder._id}/shipments/${shipment._id}`, shipment);
|
|
90
90
|
},
|
|
91
91
|
fetchPurchaseOrderWoTasks(purchaseOrderId) {
|
|
92
92
|
return _get(`admin/purchase-order/${purchaseOrderId}/wo-tasks`);
|
package/assets/js/api/helpers.js
CHANGED
|
@@ -38,6 +38,6 @@ export const prepareHeaders = method => {
|
|
|
38
38
|
|
|
39
39
|
export const _post = (url, data, config) => axiosApiInstance.post(buildPath(url), data, { ...config, headers: prepareHeaders() }).then(response => response.data);
|
|
40
40
|
export const _get = (url, params) => axiosApiInstance.get(buildPath(url), { params, headers: prepareHeaders('get') }).then(response => response.data);
|
|
41
|
-
export const _put = (url, data
|
|
41
|
+
export const _put = (url, data) => axiosApiInstance.put(buildPath(url), { ...data, __v: undefined }, { headers: prepareHeaders() }).then(response => response.data);
|
|
42
42
|
export const _patch = (url, data) => axiosApiInstance.patch(buildPath(url), { ...data, __v: undefined }, { headers: prepareHeaders() }).then(response => response.data);
|
|
43
43
|
export const _delete = (url, data) => axiosApiInstance.delete(buildPath(url), { data, headers: prepareHeaders() }).then(response => response.data);
|