@lancom/shared 0.0.107 → 0.0.108

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.
@@ -45,13 +45,15 @@
45
45
  </span>
46
46
  </validation-provider>
47
47
  <div v-if="value">
48
- <div class="mt-10 lc_h4">
48
+ <div
49
+ v-if="isValidPricing"
50
+ class="lc_h4">
49
51
  {{ value.value | price }} OFF
50
52
  </div>
51
53
  <div
52
- v-if="value.minOrderValue"
53
- class="mt-10 lc_caption">
54
- Min Order For Coupon: {{ value.minOrderValue | price }}
54
+ v-else
55
+ class="lc_caption form-help is-danger">
56
+ Invalid coupon: Min Order for Coupon: {{ value.minOrderValue | price }}
55
57
  </div>
56
58
  </div>
57
59
  </div>
@@ -71,6 +73,9 @@ export default {
71
73
  value: {
72
74
  type: Object
73
75
  },
76
+ pricing: {
77
+ type: Object
78
+ },
74
79
  labelText: {
75
80
  type: String,
76
81
  default: 'Coupon'
@@ -85,6 +90,9 @@ export default {
85
90
  },
86
91
  computed: {
87
92
  ...mapGetters(['shop']),
93
+ isValidPricing() {
94
+ return !this.value.minOrderValue || this.pricing.coupon;
95
+ },
88
96
  model: {
89
97
  get() {
90
98
  return this.value?.code;
@@ -127,7 +127,7 @@ export default {
127
127
  set(option) {
128
128
  this.selected = option;
129
129
  this.$emit('input', option.value);
130
- this.$emit('select', this.suburbs.find(({ postcode }) => postcode === option.value));
130
+ this.$emit('select', this.suburbs.find(({ _id }) => _id === option._id));
131
131
  }
132
132
  }
133
133
  },
@@ -149,10 +149,11 @@ export default {
149
149
  this.options = [];
150
150
  }
151
151
  },
152
- createOptionFromSuburb({ locality, state, postcode, city }) {
152
+ createOptionFromSuburb({ locality, state, postcode, city, _id }) {
153
153
  return {
154
154
  label: [locality || city, state, postcode].filter(i => !!i).join(', '),
155
- value: postcode
155
+ value: postcode,
156
+ _id: _id
156
157
  };
157
158
  }
158
159
  }
@@ -104,7 +104,6 @@ export default {
104
104
  this.$emit('layer-added', { layer, toEditMode: true });
105
105
  },
106
106
  async handleUploaded({ url, size }) {
107
- debugger
108
107
  const layer = await this.createLayer({ type: 'art', url, size });
109
108
  this.$emit('layer-added', { layer, toEditMode: false });
110
109
  }
@@ -8,6 +8,10 @@
8
8
  placeholder="Search products"
9
9
  type="text"
10
10
  class="form-field no-label tiny-placeholder labelless"
11
+ autocomplete="off"
12
+ autocorrect="off"
13
+ autocapitalize="off"
14
+ spellcheck="false"
11
15
  @input="searchWithDebounce"
12
16
  @focus="showResults"
13
17
  @blur="hideResults" />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lancom/shared",
3
- "version": "0.0.107",
3
+ "version": "0.0.108",
4
4
  "description": "lancom common scripts",
5
5
  "author": "e.tokovenko <e.tokovenko@gmail.com>",
6
6
  "repository": {