@lancom/shared 0.0.273 → 0.0.275

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.
@@ -140,6 +140,9 @@ export default {
140
140
  exportOrderToShippingService(order, shipment) {
141
141
  return _post(`admin/shop/${order.shop?._id || order.shop}/order/${order._id}/shipment/${shipment._id || shipment.guid}/export-to-shipping-service`, shipment);
142
142
  },
143
+ returnShipments(body) {
144
+ return _post('admin/shipments/return', body);
145
+ },
143
146
  markShipmentAsDispatched(order, shipment) {
144
147
  return _post(`admin/shop/${order.shop?._id || order.shop}/order/${order._id}/shipment/${shipment._id || shipment.guid}/dispatched`, shipment);
145
148
  },
@@ -167,6 +170,9 @@ export default {
167
170
  sendOrderRefundRequest(order, refund, shop) {
168
171
  return _post(`shop/${shop}/order/${order}/refund/${refund}/send`);
169
172
  },
173
+ generateRefundInvoice(order, refund, shop) {
174
+ return _post(`shop/${shop}/order/${order}/refund/${refund}/invoice`);
175
+ },
170
176
  chargeOrderRefund(order, refund, shop) {
171
177
  return _post(`shop/${shop}/order/${order}/refund/${refund}/charge`);
172
178
  },
@@ -498,6 +504,9 @@ export default {
498
504
  fetchWarehouseLocationById(id) {
499
505
  return _get(`admin/warehouse-locations/${id}`);
500
506
  },
507
+ fetchWarehouseLocationProducts(id) {
508
+ return _get(`admin/warehouse-locations/${id}/products`);
509
+ },
501
510
  saveWarehouseLocation(item) {
502
511
  return item._id ? _put(`admin/warehouse-locations/${item._id}`, item) : _post('admin/warehouse-locations', item);
503
512
  },
@@ -1,6 +1,9 @@
1
1
  export function convertQuoteToOrder(quote, option) {
2
2
  const files = [quote.file, ...(quote.files || [])].filter(f => !!f);
3
3
  return {
4
+ isUrgent: quote.isUrgent,
5
+ deliveryBy: quote.deliveryBy,
6
+ deliveryAfter: quote.deliveryAfter,
4
7
  referenceField: quote.reference,
5
8
  paymentMethod: option.paymentMethod || 'deposit',
6
9
  billingAddress: quote.address,
@@ -44,7 +44,7 @@
44
44
  background-image: url(../../../static/images/paid.svg);
45
45
  background-repeat: no-repeat;
46
46
  background-position: 0px 0px;
47
- background-size: contain;
47
+ background-size: 500px;
48
48
  }
49
49
  &--small {
50
50
  margin: 0 0;
@@ -50,11 +50,15 @@
50
50
  }
51
51
 
52
52
  .Gallery {
53
+ &__wrapper {
54
+ position: relative;
55
+ }
53
56
  &__big,
54
57
  &__small {
55
58
  overflow: hidden;
56
59
  position: relative;
57
60
  margin: 20px 0;
61
+ z-index: 1;
58
62
  }
59
63
  &__zoom {
60
64
  position: absolute;
@@ -195,4 +199,21 @@
195
199
  background-color: $gray;
196
200
  margin-top: 20px;
197
201
  }
202
+ &__zoom-image {
203
+ position: absolute;
204
+ right: -250px;
205
+ top: 0;
206
+ width: 350px;
207
+ height: 350px;
208
+ z-index: 2;
209
+ background-color: white;
210
+ box-shadow: 0 0 10px gray;
211
+ overflow: hidden;
212
+ pointer-events: none;
213
+ img {
214
+ position: absolute;
215
+ max-width: 800px;
216
+ max-height: 800px;
217
+ }
218
+ }
198
219
  }
@@ -5,9 +5,10 @@
5
5
  <img
6
6
  :src="staticLink(currentImage.large)"
7
7
  :alt="product.name"
8
- width="400"
9
- height="400"
10
- class="Gallery__big-image-src" />
8
+ class="Gallery__big-image-src"
9
+ @mouseenter="startZoom"
10
+ @mousemove="updateZoomWithThrottle"
11
+ @mouseleave="stopZoom" />
11
12
  <div
12
13
  v-if="currentImage.print"
13
14
  class="Gallery__big-print">
@@ -37,6 +38,14 @@
37
38
  Next
38
39
  </button>
39
40
  </div>
41
+ <div
42
+ v-if="isZooming"
43
+ class="Gallery__zoom-image">
44
+ <img
45
+ :src="staticLink(currentImage.large)"
46
+ :style="zoomImageStyles"
47
+ class="Gallery__zoom-image-src" />
48
+ </div>
40
49
  <div class="Gallery__small">
41
50
  <div
42
51
  v-for="(image, index) in visibleImages"
@@ -96,6 +105,7 @@ import { mapGetters, mapActions } from 'vuex';
96
105
  import { staticLink } from '@lancom/shared/assets/js/utils/filters';
97
106
  import { isValidImageTypes } from '@lancom/shared/assets/js/utils/colors';
98
107
  import Price from '@lancom/shared/components/common/price';
108
+ import throttle from 'lodash.throttle';
99
109
 
100
110
  export default {
101
111
  name: 'Gallery',
@@ -127,7 +137,10 @@ export default {
127
137
  galerySize: null,
128
138
  backgroundSize: null,
129
139
  backgroundPosition: null,
130
- skipUpdateGallery: false
140
+ skipUpdateGallery: false,
141
+ zoomImageStyles: null,
142
+ isZooming: false,
143
+ updateZoomWithThrottle: throttle(this.updateZoom, 50, { trailing: false }),
131
144
  };
132
145
  },
133
146
  computed: {
@@ -183,6 +196,22 @@ export default {
183
196
  methods: {
184
197
  ...mapActions('product', ['selectColor']),
185
198
  staticLink,
199
+ startZoom() {
200
+ this.isZooming = true;
201
+ },
202
+ stopZoom() {
203
+ this.isZooming = false;
204
+ this.zoomImageStyles = null;
205
+ },
206
+ updateZoom(e) {
207
+ if (this.isZooming) {
208
+ const { offsetX, offsetY } = e;
209
+ this.zoomImageStyles = {
210
+ top: `${-offsetY * 2 + 175}px`,
211
+ left: `${-offsetX * 2 + 175}px`
212
+ };
213
+ }
214
+ },
186
215
  goToSlideAndChangeColor(index) {
187
216
  this.skipUpdateGallery = true;
188
217
  const { color } = this.filteredImages[index] || {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lancom/shared",
3
- "version": "0.0.273",
3
+ "version": "0.0.275",
4
4
  "description": "lancom common scripts",
5
5
  "author": "e.tokovenko <e.tokovenko@gmail.com>",
6
6
  "repository": {