orderiom-api-package 0.4.67 → 0.4.68

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orderiom-api-package",
3
- "version": "0.4.67",
3
+ "version": "0.4.68",
4
4
  "description": "This package will install all necessary API calls for every orderiom restaurant",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -31,6 +31,7 @@ const state = () => ({
31
31
  showPinnedProducts: false,
32
32
  fetchingProducts: false,
33
33
  categoriesFetchedOnce: false,
34
+ pinnedProductsFetchedOnce: false
34
35
  });
35
36
  const getters = {
36
37
  fetchingProducts(state){
@@ -166,6 +167,9 @@ const mutations = {
166
167
  setCategoriesFetchedOnce(state){
167
168
  state.categoriesFetchedOnce = true;
168
169
  },
170
+ setPinnedProductsFetchedOnce(state){
171
+ state.pinnedProductsFetchedOnce = true;
172
+ },
169
173
  setFetchingProducts(state, isFetching){
170
174
  state.fetchingProducts = isFetching;
171
175
  },
@@ -411,7 +415,9 @@ const actions = {
411
415
  return { ...res, data: res.data.data }
412
416
  }).catch(
413
417
  commonErrorCallback()
414
- );
418
+ ).finally(() => {
419
+ commit('setPinnedProductsFetchedOnce');
420
+ });
415
421
  },
416
422
  getBasket({ commit, rootState }, data) {
417
423
  if(['string', 'number', 'undefined'].includes(typeof data)) data = {restaurantId: data};