@lancom/shared 0.0.424 → 0.0.427

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.
Files changed (38) hide show
  1. package/assets/js/api/admin.js +7 -33
  2. package/assets/js/api/index.js +3 -17
  3. package/components/common/coupon_select/coupon-select.vue +2 -12
  4. package/components/common/phone_input/phone-input.vue +3 -15
  5. package/components/common/postcode_select/postcode-select.vue +1 -3
  6. package/components/customer/customer.vue +2 -2
  7. package/components/customer/customer_navigation_menu/customer-navigation-menu.vue +7 -11
  8. package/components/editor/editor_layers/editor-layers.vue +13 -1
  9. package/components/editor/editor_layers/editor_layers_layer/editor-layers-layer.scss +20 -2
  10. package/components/editor/editor_layers/editor_layers_layer/editor-layers-layer.vue +22 -4
  11. package/components/editor/editor_workspace/editor_workspace_side/editor-workspace-side.vue +7 -19
  12. package/components/pages/customer/sign_in/sign-in.vue +2 -2
  13. package/components/product/editor_pricing/editor-pricing.vue +16 -10
  14. package/components/product/product.vue +12 -0
  15. package/components/product/product_reviews/product-reviews.vue +6 -6
  16. package/components/product/related_products/related-products.vue +4 -4
  17. package/package.json +1 -1
  18. package/routes/index.js +0 -10
  19. package/store/auth.js +0 -1
  20. package/store/index.js +3 -12
  21. package/store/product.js +37 -1
  22. package/assets/js/utils/share-promises/index.js +0 -76
  23. package/components/customer/customer_preferences_form/customer-preferences-form.scss +0 -12
  24. package/components/customer/customer_preferences_form/customer-preferences-form.vue +0 -87
  25. package/components/pages/customer/preferences/preferences.vue +0 -79
  26. package/components/resource/resource_view/resource-view.mixin.js +0 -74
  27. package/components/resource/resource_view/resource-view.scss +0 -13
  28. package/components/resource/resource_view/resource-view.vue +0 -97
  29. package/components/resource/resource_view/resource_view_prints/resource-view-prints.scss +0 -7
  30. package/components/resource/resource_view/resource_view_prints/resource-view-prints.vue +0 -42
  31. package/components/resource/resource_view/resource_view_prints/resource_view_print/resource-view-print.scss +0 -5
  32. package/components/resource/resource_view/resource_view_prints/resource_view_print/resource-view-print.vue +0 -54
  33. package/components/resource/resource_view/resource_view_prints/resource_view_print/resource_view_print_products/resource-view-print-products.scss +0 -0
  34. package/components/resource/resource_view/resource_view_prints/resource_view_print/resource_view_print_products/resource-view-print-products.vue +0 -45
  35. package/components/resource/resource_view/resource_view_prints/resource_view_print/resource_view_print_products/resource_view_print_product/resource-view-print-product.scss +0 -0
  36. package/components/resource/resource_view/resource_view_prints/resource_view_print/resource_view_print_products/resource_view_print_product/resource-view-print-product.vue +0 -44
  37. package/pages/customer/preferences.vue +0 -33
  38. package/pages/order/_token/resource/_resource.vue +0 -53
@@ -3,12 +3,6 @@ import { _get, _post, _delete, _put } from './helpers';
3
3
  import { sortSizes } from './../utils/sizes';
4
4
  import { sortByName } from './../utils/filters';
5
5
 
6
- const CACHE = {
7
- PRINT_AREAS: 'print-areas',
8
- PACKAGES: 'packages'
9
- };
10
- const promiseCache = new Map();
11
-
12
6
  export default {
13
7
  updateInventoryFromLink(link, warehouse) {
14
8
  const url = `admin/products/inventory/link${warehouse ? `?warehouse=${warehouse}` : ''}`;
@@ -116,9 +110,6 @@ export default {
116
110
  saveOrder(order) {
117
111
  return order._id ? _put(`admin/order/${order._id}`, order) : _post('admin/order', order);
118
112
  },
119
- validateOrderDate(order, field) {
120
- return _post(`admin/order/${order._id}/validate-date`, { [field]: order[field] });
121
- },
122
113
  fetchPurchaseOrders(params) {
123
114
  return _get(`admin/purchase-orders`, params);
124
115
  },
@@ -224,13 +215,8 @@ export default {
224
215
  removeCategory(id) {
225
216
  return _delete(`admin/categories/${id}`);
226
217
  },
227
- dropPackagesCache() {
228
- promiseCache.delete(CACHE.PACKAGES);
229
- },
230
218
  fetchPackages() {
231
- const promise = promiseCache.get(CACHE.PACKAGES) || _get('admin/packages');
232
- promiseCache.set(CACHE.PACKAGES, promise);
233
- return promise;
219
+ return _get('admin/packages');
234
220
  },
235
221
  fetchPackageById(id) {
236
222
  return _get(`admin/packages/${id}`);
@@ -674,16 +660,8 @@ export default {
674
660
  removePrintType(id) {
675
661
  return _delete(`admin/print-types/${id}`);
676
662
  },
677
- dropPrintAreasCache() {
678
- promiseCache.delete(CACHE.PRINT_AREAS);
679
- },
680
- fetchPrintAreas(params) {
681
- if (params) {
682
- return _get('admin/print-areas', params);
683
- }
684
- const promise = promiseCache.get(CACHE.PRINT_AREAS) || _get('admin/print-areas');
685
- promiseCache.set(CACHE.PRINT_AREAS, promise);
686
- return promise;
663
+ fetchPrintAreas() {
664
+ return _get('admin/print-areas');
687
665
  },
688
666
  fetchPrintAreaById(id) {
689
667
  return _get(`admin/print-areas/${id}`);
@@ -694,8 +672,8 @@ export default {
694
672
  removePrintArea(id) {
695
673
  return _delete(`admin/print-areas/${id}`);
696
674
  },
697
- fetchPrintSizes(params) {
698
- return _get('admin/print-sizes', params);
675
+ fetchPrintSizes() {
676
+ return _get('admin/print-sizes');
699
677
  },
700
678
  fetchPrintSizeById(id) {
701
679
  return _get(`admin/print-sizes/${id}`);
@@ -826,11 +804,7 @@ export default {
826
804
  findResources(query) {
827
805
  return _get(`admin/order/resources?search=${query || ''}`);
828
806
  },
829
- approveMockupRequest(order, resource) {
830
- const shopId = order.shop?._id || order.shop;
831
- return _post(`admin/shop/${shopId}/order/${order._id}/resources/${resource._id}/approve-request`, {});
832
- },
833
807
  getReOrderReport(params) {
834
- return _get('admin/reports/re-order', params);
835
- }
808
+ return _get(`admin/reports/re-order`, params);
809
+ },
836
810
  };
@@ -1,15 +1,10 @@
1
+
1
2
  import { _get, _post, _put, _delete, _patch } from './helpers';
2
3
  import adminApi from './admin';
3
4
  import { unminifySimpleProducts } from './utils/simple-products';
4
5
  import { unminifyProduct } from './utils/product';
5
- import { getSharePromise } from './../utils/share-promises';
6
-
7
- const shareRequestsPromises = getSharePromise(5 * 60 * 1000);
8
6
 
9
7
  const api = {
10
- clearAllSharePromises() {
11
- return _post('clear-share-promises');
12
- },
13
8
  fetchClientSettings(shop, params) {
14
9
  return _get(`shop/${shop}/client-settings`, params);
15
10
  },
@@ -25,9 +20,6 @@ const api = {
25
20
  saveCustomer(customer, shop) {
26
21
  return customer._id ? _patch(`shop/${shop}/customer/${customer.accessToken}`, customer) : _post(`shop/${shop}/customer`, customer);
27
22
  },
28
- fetchCustomer(accessToken, shop) {
29
- return _get(`shop/${shop}/customer/${accessToken}`);
30
- },
31
23
  authCustomer(customer, shop) {
32
24
  return _post(`shop/${shop}/customer/login`, customer);
33
25
  },
@@ -77,8 +69,7 @@ const api = {
77
69
  return _get(`shop/${shop}/menus`);
78
70
  },
79
71
  fetchBanners(shop, params) {
80
- const KEY = `shop/${shop}/banners_${JSON.stringify(params || {})}`;
81
- return shareRequestsPromises.share(KEY, () => _get(`shop/${shop}/banners`, params));
72
+ return _get(`shop/${shop}/banners`, params);
82
73
  },
83
74
  fetchProductsKits(shop, params) {
84
75
  return _get(`shop/${shop}/products-kit`, params);
@@ -93,8 +84,7 @@ const api = {
93
84
  return _get(`shop/${shop}/news/${alias}?preview=${preview}`);
94
85
  },
95
86
  fetchNewsTags(shop, params) {
96
- const KEY = `shop/${shop}/news-tag_${JSON.stringify(params || {})}`
97
- return shareRequestsPromises.share(KEY, () => _get(`shop/${shop}/news-tag`, params));
87
+ return _get(`shop/${shop}/news-tag`, params);
98
88
  },
99
89
  fetchNewsTag(shop, alias) {
100
90
  return _get(`shop/${shop}/news-tag/${alias}`);
@@ -132,10 +122,6 @@ const api = {
132
122
  addOrderTimeline(id, item) {
133
123
  return _post(`order/${id}/timeline`, item);
134
124
  },
135
- approveOrderMockup(order, resource) {
136
- const shopId = order.shop?._id || order.shop;
137
- return _post(`shop/${shopId}/order/${order._id}/resources/${resource._id}/approve`, resource);
138
- },
139
125
  generateApprovalPDFs(token) {
140
126
  return _post(`order/${token}/approval-pdfs`);
141
127
  },
@@ -74,7 +74,7 @@
74
74
  <div
75
75
  v-else
76
76
  class="lc_caption form-help is-danger">
77
- Invalid coupon: Min Order for Coupon: {{ minOrderValue | price(currency) }}
77
+ Invalid coupon: Min Order for Coupon: {{ value.minOrderValue | price(currency) }}
78
78
  </div>
79
79
  <div v-if="hasQualifyingProducts" class="lc_caption mb-10">
80
80
  <div v-if="noQualifyingProductsInCart">
@@ -129,18 +129,8 @@ export default {
129
129
  hasQualifyingProductsInCart() {
130
130
  return this.sumQualifyingProductsInCart > 0;
131
131
  },
132
- minOrderValue() {
133
- const value = [
134
- this.value,
135
- ...(this.value?.values || [])
136
- ]
137
- .filter(v => v?.minOrderValue > 0)
138
- .sort((a, b) => a.minOrderValue - b.minOrderValue)[0];
139
-
140
- return value?.minOrderValue || 0;
141
- },
142
132
  isValidPricing() {
143
- return !this.minOrderValue || this.pricing.coupon;
133
+ return !this.value?.minOrderValue || this.pricing.coupon;
144
134
  },
145
135
  model: {
146
136
  get() {
@@ -1,9 +1,9 @@
1
1
  <template>
2
2
  <div>
3
- <div :class="containerClassname">
3
+ <div class="form-row">
4
4
  <label
5
5
  v-if="labelless"
6
- :class="labelClassname"
6
+ class="form-label"
7
7
  @click="$refs.phone.$el.focus()">
8
8
  {{ displayLabelText }}
9
9
  </label>
@@ -31,8 +31,8 @@
31
31
  :disabled="disabled"
32
32
  :name="'phone' + uniqueKey"
33
33
  type="text"
34
+ class="form-field"
34
35
  :class="{
35
- [inputClassname]: true,
36
36
  'is-danger': errors.length,
37
37
  filled: model,
38
38
  labelless
@@ -115,18 +115,6 @@ export default {
115
115
  namePrefix: {
116
116
  type: String,
117
117
  default: ''
118
- },
119
- containerClassname: {
120
- type: String,
121
- default: 'form-row'
122
- },
123
- labelClassname: {
124
- type: String,
125
- default: 'form-label'
126
- },
127
- inputClassname: {
128
- type: String,
129
- default: 'form-field'
130
118
  }
131
119
  },
132
120
  data() {
@@ -177,9 +177,7 @@ export default {
177
177
  if (this.suburb) {
178
178
  const option = this.createOptionFromSuburb(this.suburb);
179
179
  this.selected = option;
180
- if (this.selected.value) {
181
- await this.handleSearch(this.selected.value.trim());
182
- }
180
+ await this.handleSearch(this.selected.value.trim())
183
181
  }
184
182
  },
185
183
  methods: {
@@ -70,10 +70,10 @@ export default {
70
70
  ...mapActions('auth', ['update_user']),
71
71
  createdCustomer({ customer: user, token }) {
72
72
  this.update_user({ user, token });
73
- this.$router.push('/');
73
+ this.$router.push('/customer/orders');
74
74
  },
75
75
  signin() {
76
- this.$router.push('/');
76
+ this.$router.push('/customer/orders');
77
77
  }
78
78
  }
79
79
  };
@@ -15,12 +15,6 @@
15
15
  <script>
16
16
  export default {
17
17
  name: 'CustomerMenu',
18
- props: {
19
- activeMenuItem: {
20
- type: String,
21
- required: true
22
- }
23
- },
24
18
  data() {
25
19
  return {
26
20
  menuItems: [{
@@ -35,12 +29,14 @@ export default {
35
29
  label: 'Coupons',
36
30
  key: 'coupons',
37
31
  url: '/customer/coupons'
38
- }, {
39
- label: 'Preferences',
40
- key: 'preferences',
41
- url: '/customer/preferences'
42
32
  }]
43
33
  };
34
+ },
35
+ props: {
36
+ activeMenuItem: {
37
+ type: String,
38
+ required: true
39
+ }
44
40
  }
45
41
  };
46
42
  </script>
@@ -72,5 +68,5 @@ export default {
72
68
  background-color: $green;
73
69
  }
74
70
  }
75
- }
71
+ }
76
72
  </style>
@@ -66,10 +66,14 @@
66
66
  :key="`${layer.createdAt}-${index}`"
67
67
  :layer="layer"
68
68
  :active="selectedLayer && selectedLayer.createdAt === layer.createdAt"
69
+ :visible-move-up="layer !== group.layers[0]"
70
+ :visible-move-down="layer !== group.layers[group.layers.length - 1]"
69
71
  @select="setSelectedLayer(layer)"
70
72
  @edit="editLayer(layer)"
71
73
  @duplicate="duplicateLayer(layer)"
72
- @remove="removeLayer(layer)">
74
+ @remove="removeLayer(layer)"
75
+ @up="moveUp(layer)"
76
+ @down="moveDown(layer)">
73
77
  </editor-layers-layer>
74
78
  </div>
75
79
  </div>
@@ -166,6 +170,8 @@ export default {
166
170
  'setSelectedLayerField',
167
171
  'addTemplateLayer',
168
172
  'removeTemplateLayer',
173
+ 'moveUpTemplateLayer',
174
+ 'moveDownTemplateLayer',
169
175
  'updateTemplateLayer',
170
176
  'setEditableSide',
171
177
  'setSelectedPrintArea',
@@ -217,6 +223,12 @@ export default {
217
223
  this.removeTemplateLayer(layer);
218
224
  this.setSelectedLayer(null);
219
225
  },
226
+ moveUp(layer) {
227
+ this.moveUpTemplateLayer(layer);
228
+ },
229
+ moveDown(layer) {
230
+ this.moveDownTemplateLayer(layer);
231
+ },
220
232
  closeEditableLayer(invalid) {
221
233
  if (invalid) {
222
234
  this.removeTemplateLayer(this.selectedLayer);
@@ -100,13 +100,31 @@
100
100
  &__edit {
101
101
  width: 100%;
102
102
  }
103
- &__remove {
103
+ &__controls{
104
104
  position: absolute;
105
105
  top: 16px;
106
106
  right: 12px;
107
107
  font-size: 18px;
108
108
  color: #777;
109
109
  cursor: pointer;
110
+ display: flex;
111
+ span {
112
+ position: relative;
113
+ }
114
+ }
115
+ &__up {
116
+ // position: absolute;
117
+ // top: 4px;
118
+ // right: 0;
119
+ display: inline-block;
120
+ transform: rotate(90deg);
121
+ }
122
+ &__down {
123
+ // position: absolute;
124
+ // top: 4px;
125
+ // right: 0;
126
+ display: inline-block;
127
+ transform: rotateZ(-90deg);
110
128
  }
111
129
  &__actions {
112
130
  display: flex;
@@ -137,4 +155,4 @@
137
155
  }
138
156
  }
139
157
  }
140
- }
158
+ }
@@ -3,9 +3,21 @@
3
3
  class="EditorLayersLayer__wrapper"
4
4
  :class="{ active }"
5
5
  @click="$emit('select')">
6
- <i
7
- class="icon-delete EditorLayersLayer__remove"
8
- @click="$emit('remove')"></i>
6
+ <div class="EditorLayersLayer__controls">
7
+ <span v-if="visibleMoveUp">
8
+ <i
9
+ class="icon-arrow-left EditorLayersLayer__up"
10
+ @click="$emit('up')"></i>
11
+ </span>
12
+ <span v-if="visibleMoveDown">
13
+ <i
14
+ class="icon-arrow-left EditorLayersLayer__down"
15
+ @click="$emit('down')"></i>
16
+ </span>
17
+ <i
18
+ class="icon-delete"
19
+ @click="$emit('remove')"></i>
20
+ </div>
9
21
  <div class="EditorLayersLayer__thumb">
10
22
  <i
11
23
  v-if="layerIcon"
@@ -81,12 +93,18 @@ import { number } from '@lancom/shared/assets/js/utils/filters';
81
93
 
82
94
  export default {
83
95
  name: 'EditorLayersLayer',
84
- mixins: [printLayerMixin],
85
96
  filters: { number },
97
+ mixins: [printLayerMixin],
86
98
  props: {
87
99
  active: {
88
100
  type: Boolean,
89
101
  default: false
102
+ },
103
+ visibleMoveUp: {
104
+ type: Boolean
105
+ },
106
+ visibleMoveDown: {
107
+ type: Boolean
90
108
  }
91
109
  },
92
110
  computed: {
@@ -176,7 +176,6 @@ export default {
176
176
  backgroundImageUrl: null,
177
177
  backgroundImageLoaded: false,
178
178
  deleteButtonPos: null,
179
- offsetWarningVisible: false,
180
179
  drawingInProcess: false,
181
180
  breakpoints: new Breakpoints()
182
181
  };
@@ -192,7 +191,10 @@ export default {
192
191
  'selectedLayer',
193
192
  'selectedLayerCopy',
194
193
  'editorSize',
195
- 'editModeSelectedLayer'
194
+ 'editModeSelectedLayer',
195
+ 'offsetWarningVisible',
196
+ 'showRecommendationToUseLargerImage',
197
+ 'showErrorAboutSmallImage'
196
198
  ]),
197
199
  editableLayersCount() {
198
200
  return this.editableLayers?.length;
@@ -240,21 +242,6 @@ export default {
240
242
  height: `${height * ratio}px`,
241
243
  };
242
244
  },
243
- showRecommendationToUseLargerImage() {
244
- return (
245
- this.selectedLayer &&
246
- this.selectedLayer.type === 'art' &&
247
- this.selectedLayer.dpi >= 75 &&
248
- this.selectedLayer.dpi <= 100
249
- );
250
- },
251
- showErrorAboutSmallImage() {
252
- return (
253
- this.selectedLayer &&
254
- this.selectedLayer.type === 'art' &&
255
- this.selectedLayer.dpi < 75
256
- );
257
- },
258
245
  printAreaIsSmall() {
259
246
  const code = this.printAreaSize?.alias || this.printAreaSize;
260
247
  return code === 'rect10';
@@ -315,7 +302,8 @@ export default {
315
302
  'setSelectedLayerField',
316
303
  'setEditModeSelectedLayer',
317
304
  'setSelectedLayer',
318
- 'removeTemplateLayer'
305
+ 'removeTemplateLayer',
306
+ 'setOffsetWarningVisible'
319
307
  ]),
320
308
  ...mapMutations('layers', [
321
309
  'setLayersThumbnail'
@@ -480,7 +468,7 @@ export default {
480
468
  this.deleteButtonPos = pos;
481
469
  },
482
470
  setOffsetWarningVisibility(visible) {
483
- this.offsetWarningVisible = visible;
471
+ this.setOffsetWarningVisible(visible);
484
472
  },
485
473
  toogleBoundBox(state, option) {
486
474
  if (!this.fabricHelper || ['mini', 'xs'].includes(this.breakpoints.is)) {
@@ -23,8 +23,8 @@ export default {
23
23
  };
24
24
  },
25
25
  methods: {
26
- onSignin(faq) {
27
- this.$router.push('/');
26
+ onSignin() {
27
+ this.$router.push('/customer/orders');
28
28
  }
29
29
  }
30
30
  };
@@ -64,7 +64,7 @@
64
64
  v-else-if="isValidOrderQuantity"
65
65
  class="EditorPricing__main-alert">
66
66
  <img src="~static/images/smile.svg" />
67
- All good to go!
67
+ {{ hasPrintIssues ? 'Proceed with order, Will be in touch regarding print issue' : 'All good to go!' }}
68
68
  </div>
69
69
 
70
70
  <div
@@ -108,7 +108,6 @@ import addToCartMixin from '@lancom/shared/mixins/add-to-cart';
108
108
 
109
109
  export default {
110
110
  name: 'EditorPricing',
111
- mixins: [addToCartMixin],
112
111
  filters: {
113
112
  price,
114
113
  tax,
@@ -119,13 +118,7 @@ export default {
119
118
  EditorPricingDetails,
120
119
  AddToCartBtn
121
120
  },
122
- data() {
123
- return {
124
- price: null,
125
- showDetails: false,
126
- calculatePriceWithDebounce: debounce(() => this.calculateProductPrice({ shop: this.shop, country: this.country, currency: this.currency }), 500)
127
- };
128
- },
121
+ mixins: [addToCartMixin],
129
122
  props: {
130
123
  hasCartBtn: {
131
124
  type: Boolean,
@@ -136,6 +129,13 @@ export default {
136
129
  default: true
137
130
  }
138
131
  },
132
+ data() {
133
+ return {
134
+ price: null,
135
+ showDetails: false,
136
+ calculatePriceWithDebounce: debounce(() => this.calculateProductPrice({ shop: this.shop, country: this.country, currency: this.currency }), 500)
137
+ };
138
+ },
139
139
  computed: {
140
140
  ...mapGetters(['shop', 'country', 'currency']),
141
141
  ...mapGetters('product', [
@@ -149,8 +149,14 @@ export default {
149
149
  'isPrintPricing',
150
150
  'minimumOrderQuantity',
151
151
  'priceIncludeGST',
152
- 'multipack'
152
+ 'multipack',
153
+ 'offsetWarningVisible',
154
+ 'showRecommendationToUseLargerImage',
155
+ 'showErrorAboutSmallImage'
153
156
  ]),
157
+ hasPrintIssues() {
158
+ return this.offsetWarningVisible || this.showRecommendationToUseLargerImage || this.showErrorAboutSmallImage;
159
+ },
154
160
  hasUsedSimpleProducts() {
155
161
  return this.usedSimpleProducts.length > 0;
156
162
  },
@@ -32,6 +32,12 @@
32
32
  <section class="Product__section">
33
33
  <wizard-editor />
34
34
  </section>
35
+ <!-- <section class="Product__section">
36
+ <product-colors-selector v-if="productDetails" />
37
+ </section> -->
38
+ <!-- <section class="Product__section">
39
+ <product-tier-prices :product="product" />
40
+ </section> -->
35
41
  <section class="Product__section">
36
42
  <product-fabric-and-size-info :product="product" />
37
43
  </section>
@@ -53,17 +59,23 @@ import RelatedProducts from '@lancom/shared/components/product/related_products/
53
59
  import Gallery from '@lancom/shared/components/product/gallery/gallery';
54
60
  import { generateProductLink } from '@lancom/shared/assets/js/utils/product';
55
61
  import ProductMainInfo from './layouts/product_main_info/product-main-info';
62
+ import ProductColorsSelector from './product_colors_selector/product-colors-selector';
63
+ import ProductTierPrices from './layouts/product_tier_prices/product-tier-prices';
56
64
  import ProductFabricAndSizeInfo from './layouts/product_fabric_and_size_info/product-fabric-and-size-info';
57
65
  import ProductPackaging from './layouts/product_packaging/product-packaging';
58
66
  import ProductModelMeasurements from './layouts/product_model_measurements/product-model-measurements';
59
67
  import ProductSizeTable from './layouts/product_size_table/product-size-table';
60
68
  import WizardEditor from './wizard-editor/wizard-editor.vue';
61
69
 
70
+
71
+ // import ProductLabelsCustomization from './layouts/product_labels_customization/product-labels-customization';
62
72
 
63
73
  export default {
64
74
  name: 'Product',
65
75
  components: {
66
76
  ProductMainInfo,
77
+ ProductColorsSelector,
78
+ ProductTierPrices,
67
79
  ProductFabricAndSizeInfo,
68
80
  ProductPackaging,
69
81
  ProductModelMeasurements,
@@ -41,12 +41,6 @@ export default {
41
41
  ProductReview
42
42
  },
43
43
  mixins: [],
44
- props: {
45
- product: {
46
- type: Object,
47
- required: true
48
- }
49
- },
50
44
  data() {
51
45
  const reviews = this.product.reviews || [];
52
46
  const [, mainReviewId] = (this.$route.hash || '').match(/review-([a-z0-9]+)/i) || [];
@@ -62,6 +56,12 @@ export default {
62
56
  ].filter(review => !!review)
63
57
  };
64
58
  },
59
+ props: {
60
+ product: {
61
+ type: Object,
62
+ required: true
63
+ }
64
+ },
65
65
  computed: {
66
66
  currentReview() {
67
67
  return this.reviews[this.activeIndex];
@@ -36,15 +36,15 @@ export default {
36
36
  products: []
37
37
  };
38
38
  },
39
- async fetch() {
40
- const { products } = await api.fetchRelatedProducts(this.shop._id, this.product.alias, { needShuffle: true });
41
- this.products = products.splice(0, 6);
42
- },
43
39
  computed: {
44
40
  ...mapGetters(['shop']),
45
41
  hasProducts() {
46
42
  return this.products.length > 0;
47
43
  }
44
+ },
45
+ async fetch() {
46
+ const { products } = await api.fetchRelatedProducts(this.shop._id, this.product.alias, { needShuffle: true });
47
+ this.products = products.splice(0, 6);
48
48
  }
49
49
  };
50
50
  </script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lancom/shared",
3
- "version": "0.0.424",
3
+ "version": "0.0.427",
4
4
  "description": "lancom common scripts",
5
5
  "author": "e.tokovenko <e.tokovenko@gmail.com>",
6
6
  "repository": {
package/routes/index.js CHANGED
@@ -87,11 +87,6 @@ module.exports = function(routes, resolve, config) {
87
87
  path: '/order/:token/payment',
88
88
  component: resolve('@lancom/shared/pages/order/_token/payment/index.vue'),
89
89
  chunkName: 'pages/order/payment'
90
- }, {
91
- name: 'order-resource',
92
- path: '/order/:token/resource/:resource',
93
- component: resolve('@lancom/shared/pages/order/_token/resource/_resource.vue'),
94
- chunkName: 'pages/order/resource'
95
90
  }, {
96
91
  name: 'order-payment-invoice',
97
92
  path: '/order/:token/payment/invoice/:invoice',
@@ -147,11 +142,6 @@ module.exports = function(routes, resolve, config) {
147
142
  path: '/customer/password/:token',
148
143
  component: resolve('@lancom/shared/pages/customer/password/_token.vue'),
149
144
  chunkName: 'pages/customer/password/reset'
150
- }, {
151
- name: 'customer-preferences',
152
- path: '/customer/preferences',
153
- component: resolve('@lancom/shared/pages/customer/preferences.vue'),
154
- chunkName: 'pages/customer/preferences'
155
145
  }, {
156
146
  name: 'checkout-cart',
157
147
  path: '/checkout/cart',
package/store/auth.js CHANGED
@@ -18,7 +18,6 @@ export const getters = {
18
18
  isGuestUser: state => !state.token,
19
19
  isAdmin: state => checkRoles(state.user, ['admin']),
20
20
  isContentEditor: state => checkRoles(state.user, ['admin', 'content-editor']),
21
- isDesigner: state => checkRoles(state.user, ['admin', 'designer']),
22
21
  isWarehouse: state => checkRoles(state.user, ['admin', 'warehouse']),
23
22
  user: state => state.user,
24
23
  userWarehouse: state => state.user?.warehouse,