@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.
@@ -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, params) {
89
- return _put(`admin/purchase-order/${purchaseOrder._id}/shipments/${shipment._id}`, shipment, params);
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`);
@@ -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, params) => axiosApiInstance.put(buildPath(url), { ...data, __v: undefined }, { params, headers: prepareHeaders() }).then(response => response.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);
@@ -0,0 +1,10 @@
1
+ .CouponSelect {
2
+ &__clear {
3
+ font-size: 13px;
4
+ margin-left: 5px;
5
+ border-bottom: 1px dashed black;
6
+ display: inline-block;
7
+ cursor: pointer;
8
+ line-height: 14px;
9
+ }
10
+ }
@@ -48,7 +48,15 @@
48
48
  <div
49
49
  v-if="isValidPricing"
50
50
  class="lc_h4">
51
- {{ value.value | price }} OFF
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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lancom/shared",
3
- "version": "0.0.175",
3
+ "version": "0.0.177",
4
4
  "description": "lancom common scripts",
5
5
  "author": "e.tokovenko <e.tokovenko@gmail.com>",
6
6
  "repository": {