@lancom/shared 0.0.175 → 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);
|
|
@@ -48,7 +48,15 @@
|
|
|
48
48
|
<div
|
|
49
49
|
v-if="isValidPricing"
|
|
50
50
|
class="lc_h4">
|
|
51
|
-
|
|
51
|
+
<span v-if="value.showCouponIsApplied">
|
|
52
|
+
COUPON APPLIED
|
|
53
|
+
</span>
|
|
54
|
+
<span v-else>
|
|
55
|
+
{{ value.value | price }} OFF
|
|
56
|
+
</span>
|
|
57
|
+
<span
|
|
58
|
+
class="CouponSelect__clear"
|
|
59
|
+
@click="clearCoupon()">remove</span>
|
|
52
60
|
</div>
|
|
53
61
|
<div
|
|
54
62
|
v-else
|
|
@@ -108,6 +116,10 @@ export default {
|
|
|
108
116
|
}
|
|
109
117
|
},
|
|
110
118
|
methods: {
|
|
119
|
+
clearCoupon() {
|
|
120
|
+
this.model = null;
|
|
121
|
+
this.code = null;
|
|
122
|
+
},
|
|
111
123
|
async validateCoupon() {
|
|
112
124
|
this.notValidCoupon = false;
|
|
113
125
|
if (this.code) {
|