@lancom/shared 0.0.162 → 0.0.163

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.
@@ -1,4 +1,4 @@
1
- import { mapGetters, mapActions } from 'vuex';
1
+ import { mapGetters, mapActions, mapMutations } from 'vuex';
2
2
  import api from '@lancom/shared/assets/js/api';
3
3
  import { price, shortDate, tax } from '@lancom/shared/assets/js/utils/filters';
4
4
  import { convertQuoteToOrder } from '@lancom/shared/assets/js/utils/quote';
@@ -26,6 +26,7 @@ export default {
26
26
  },
27
27
  methods: {
28
28
  ...mapActions('quote', ['selectOption', 'clear']),
29
+ ...mapMutations('quote', ['setOrder']),
29
30
  optionGst(option) {
30
31
  return tax(option.total, this.gstTax) - option.total;
31
32
  },
@@ -33,6 +34,7 @@ export default {
33
34
  try {
34
35
  this.processing = true;
35
36
  this.order = await this.createOrder(option);
37
+ this.setOrder(this.order);
36
38
  this.clear();
37
39
  } catch (e) {
38
40
  const { message } = (e.response && e.response.data) || e;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lancom/shared",
3
- "version": "0.0.162",
3
+ "version": "0.0.163",
4
4
  "description": "lancom common scripts",
5
5
  "author": "e.tokovenko <e.tokovenko@gmail.com>",
6
6
  "repository": {
package/store/quote.js CHANGED
@@ -65,6 +65,9 @@ export const mutations = {
65
65
  setQuote(state, quote) {
66
66
  state.quote = quote;
67
67
  },
68
+ setOrder(state, order) {
69
+ state.quote.order = order;
70
+ },
68
71
  setOption(state, option) {
69
72
  state.option = option;
70
73
  },