@lancom/shared 0.0.203 → 0.0.205

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.
@@ -428,6 +428,9 @@ export default {
428
428
  fetchWarehouseLocations(params) {
429
429
  return _get('admin/warehouse-locations', params);
430
430
  },
431
+ fetchWarehouseAllocations(warehouse, params) {
432
+ return _get(`admin/warehouse/${warehouse}/allocations`, params);
433
+ },
431
434
  fetchWarehouseLocationById(id) {
432
435
  return _get(`admin/warehouse-locations/${id}`);
433
436
  },
@@ -23,7 +23,7 @@ export default {
23
23
  },
24
24
  computed: {
25
25
  ...mapGetters('quote', ['quote', 'option', 'proceedOption', 'selectedOption', 'depositInfo', 'shopContacts', 'quoteAddress', 'quoteId', 'options', 'gstTax']),
26
- ...mapGetters(['shop'])
26
+ ...mapGetters(['shop', 'country', 'currency'])
27
27
  },
28
28
  methods: {
29
29
  ...mapActions('quote', ['selectOption', 'clear']),
@@ -48,6 +48,8 @@ export default {
48
48
  createOrder(option) {
49
49
  const orderData = {
50
50
  shop: this.shop._id,
51
+ country: this.country?._id,
52
+ currency: this.currency?._id,
51
53
  ...convertQuoteToOrder(this.quote, option)
52
54
  };
53
55
  return api.createOrder(orderData, this.shop._id);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lancom/shared",
3
- "version": "0.0.203",
3
+ "version": "0.0.205",
4
4
  "description": "lancom common scripts",
5
5
  "author": "e.tokovenko <e.tokovenko@gmail.com>",
6
6
  "repository": {
package/store/index.js CHANGED
@@ -45,14 +45,14 @@ export const actions = {
45
45
  commit('setMenus', menus);
46
46
  commit('setShop', shop);
47
47
  commit('setSettings', shop.settings);
48
- if (req.headers.cookie) {
49
- const { country, currency } = cookieparser.parse(req.headers.cookie);
50
- const headers = (req && req.headers) ? Object.assign({}, req.headers) : {};
51
- const params = { country, currency, ip: headers['x-real-ip'] || req.ip };
52
- const settings = await api.fetchClientSettings(shop._id, params);
53
- commit('setCountry', settings.country);
54
- commit('setCurrency', settings.currency);
55
- }
48
+ // if (req.headers.cookie) {
49
+ const { country, currency } = (req.headers.cookie && cookieparser.parse(req.headers.cookie)) || {};
50
+ const headers = (req && req.headers) ? Object.assign({}, req.headers) : {};
51
+ const params = { country, currency, ip: headers['x-real-ip'] || req.ip };
52
+ const settings = await api.fetchClientSettings(shop._id, params);
53
+ commit('setCountry', settings.country);
54
+ commit('setCurrency', settings.currency);
55
+ // }
56
56
  try {
57
57
  if (req.headers.cookie) {
58
58
  const { auth } = cookieparser.parse(req.headers.cookie);