orderiom-api-package
Advanced tools
Comparing version 0.4.53 to 0.4.54
{ | ||
"name": "orderiom-api-package", | ||
"version": "0.4.53", | ||
"version": "0.4.54", | ||
"description": "This package will install all necessary API calls for every orderiom restaurant", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -31,5 +31,9 @@ import {commonErrorCallback, calculateBasketIdParameter, updateBasket, formatDate, formatTime, deliveryCodeToName, weekdays, $http} from '../common'; | ||
pinnedProducts: null, | ||
showPinnedProducts: false | ||
showPinnedProducts: false, | ||
fetchingProducts: false, | ||
}); | ||
const getters = { | ||
fetchingProducts(state){ | ||
return !!state.orderiomApiPackage.product.fetchingProducts; | ||
}, | ||
subCategories(state){ | ||
@@ -158,2 +162,5 @@ if(!state.products) return [] | ||
const mutations = { | ||
setFetchingProducts(state, isFetching){ | ||
state.fetchingProducts = isFetching; | ||
}, | ||
setSelectedDate(state, date) { | ||
@@ -349,2 +356,3 @@ state.selectedDate = date | ||
commit('setFetchingProducts', true); | ||
return $http.get("api/restaurant/products", { | ||
@@ -369,3 +377,5 @@ params: { | ||
commonErrorCallback() | ||
); | ||
).finish(() => { | ||
commit('setFetchingProducts', false); | ||
}); | ||
}, | ||
@@ -372,0 +382,0 @@ getPinnedProducts({ commit, state, rootState }, data) { |
127182
3169