@lancom/shared 0.0.423 → 0.0.426

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.
@@ -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)) {
@@ -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
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lancom/shared",
3
- "version": "0.0.423",
3
+ "version": "0.0.426",
4
4
  "description": "lancom common scripts",
5
5
  "author": "e.tokovenko <e.tokovenko@gmail.com>",
6
6
  "repository": {
package/store/product.js CHANGED
@@ -45,6 +45,7 @@ export const state = () => ({
45
45
  selectedPrintUnderbases: {},
46
46
  selectedPrintUnderbase: false,
47
47
  editModeSelectedLayer: false,
48
+ offsetWarningVisible: false,
48
49
  selectedPrintAreas: {},
49
50
  productPricing: null,
50
51
  selectedTab: null,
@@ -162,6 +163,22 @@ export const getters = {
162
163
  const price = pricing?.prints?.prints?.reduce((sum , print) => sum + (+print.priceWithoutTax || 0), 0) || maxPrintsPrice;
163
164
  return price;
164
165
  },
166
+ offsetWarningVisible: ({ offsetWarningVisible }) => offsetWarningVisible,
167
+ showRecommendationToUseLargerImage: ({ selectedLayer }) => {
168
+ return (
169
+ selectedLayer &&
170
+ selectedLayer.type === 'art' &&
171
+ selectedLayer.dpi >= 75 &&
172
+ selectedLayer.dpi <= 100
173
+ );
174
+ },
175
+ showErrorAboutSmallImage: ({ selectedLayer }) => {
176
+ return (
177
+ selectedLayer &&
178
+ selectedLayer.type === 'art' &&
179
+ selectedLayer.dpi < 75
180
+ );
181
+ }
165
182
  };
166
183
 
167
184
  export const actions = {
@@ -319,6 +336,9 @@ export const mutations = {
319
336
  setPriceIncludeGST(state, priceIncludeGST) {
320
337
  state.priceIncludeGST = priceIncludeGST;
321
338
  },
339
+ setOffsetWarningVisible(state, offsetWarningVisible) {
340
+ state.offsetWarningVisible = offsetWarningVisible;
341
+ },
322
342
  setLoadError(state, error) {
323
343
  state.loadError = error;
324
344
  },