@lancom/shared 0.0.147 → 0.0.148

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.
@@ -46,7 +46,8 @@
46
46
  :key="simpleProduct._id"
47
47
  :simple-product="simpleProduct"
48
48
  :entity="entity"
49
- :display-unit-price="displayUnitPrice" />
49
+ :display-unit-price="displayUnitPrice"
50
+ @change="onChangeQty" />
50
51
  </div>
51
52
  <div class="CartEntityColorSimpleProducts__totals">
52
53
  <div class="CartEntityColorSimpleProducts__total">
@@ -119,6 +119,7 @@ export default {
119
119
  if (this.$refs.input) {
120
120
  this.$refs.input.blur();
121
121
  }
122
+ this.$emit('change');
122
123
  },
123
124
  onFocus() {
124
125
  this.defaultValue = '';
@@ -135,6 +136,7 @@ export default {
135
136
  amount: this.formatAmount(this.model + 1),
136
137
  shop: this.shop
137
138
  });
139
+ this.$emit('change');
138
140
  },
139
141
  decrease() {
140
142
  this.setSimpleProductAmount({
@@ -142,6 +144,7 @@ export default {
142
144
  amount: this.formatAmount(this.model - 1),
143
145
  shop: this.shop
144
146
  });
147
+ this.$emit('change');
145
148
  }
146
149
  }
147
150
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lancom/shared",
3
- "version": "0.0.147",
3
+ "version": "0.0.148",
4
4
  "description": "lancom common scripts",
5
5
  "author": "e.tokovenko <e.tokovenko@gmail.com>",
6
6
  "repository": {
package/store/cart.js CHANGED
@@ -49,7 +49,7 @@ export const getters = {
49
49
  suburb: ({ suburb }) => suburb,
50
50
  cartPricing: ({ cartPricing }) => cartPricing,
51
51
  cartProductsPricing: ({ cartPricing }) => (cartPricing && cartPricing.products) || {},
52
- isEmpty: (state, { simpleProductsQuantity }) => simpleProductsQuantity === 0,
52
+ isEmpty: (state, { entities }) => (entities || []).length === 0,
53
53
  quantities: ({ entities }) => ({
54
54
  products: getProductsQuantities(entities),
55
55
  prints: getPrintsQuantities(entities)