orderiom-api-package 0.3.51 → 0.3.53
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 +1 -1
- package/src/modules/order.js +28 -0
- package/src/modules/restaurant.js +14 -2
package/package.json
CHANGED
package/src/modules/order.js
CHANGED
|
@@ -887,6 +887,34 @@ const actions = {
|
|
|
887
887
|
return false;
|
|
888
888
|
});
|
|
889
889
|
},
|
|
890
|
+
editBasketExtraInfo({rootState, commit}, data) {
|
|
891
|
+
let basketId = undefined;
|
|
892
|
+
try {
|
|
893
|
+
basketId = calculateBasketIdParameter(
|
|
894
|
+
!!rootState.orderiomApiPackage.auth.privateToken,
|
|
895
|
+
data.restaurantId
|
|
896
|
+
);
|
|
897
|
+
} catch (e) {
|
|
898
|
+
console.error(e);
|
|
899
|
+
return {type: "error", msg: "Basket not found"};
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
return $http.post("api/basket/update-extraInfo", {
|
|
903
|
+
basketId,
|
|
904
|
+
restaurantId: data.restaurantId || restaurantIdEnv,
|
|
905
|
+
...data,
|
|
906
|
+
}).then((res) =>
|
|
907
|
+
updateBasket({
|
|
908
|
+
commit,
|
|
909
|
+
basketId,
|
|
910
|
+
res,
|
|
911
|
+
restaurantId: data.restaurantId || restaurantIdEnv,
|
|
912
|
+
})
|
|
913
|
+
).catch(err => {
|
|
914
|
+
console.error(err);
|
|
915
|
+
return false;
|
|
916
|
+
});
|
|
917
|
+
},
|
|
890
918
|
getTableExternalOrder({ commit }, { restaurantId, tableName }) {
|
|
891
919
|
commit("setExternalTableOrders", {});
|
|
892
920
|
return $http
|
|
@@ -11,7 +11,8 @@ const state = () => ({
|
|
|
11
11
|
testimonials: [],
|
|
12
12
|
fetchingRestaurantInfo: false,
|
|
13
13
|
fetchingBlogs: false,
|
|
14
|
-
reservedTables:[]
|
|
14
|
+
reservedTables:[],
|
|
15
|
+
LegalContent:[]
|
|
15
16
|
});
|
|
16
17
|
|
|
17
18
|
const mutations = {
|
|
@@ -53,7 +54,10 @@ const mutations = {
|
|
|
53
54
|
},
|
|
54
55
|
finishFetchingBlogs(state){
|
|
55
56
|
state.fetchingBlogs = false;
|
|
56
|
-
}
|
|
57
|
+
},
|
|
58
|
+
setLegalContent(state , data){
|
|
59
|
+
state.LegalContent = data;
|
|
60
|
+
}
|
|
57
61
|
};
|
|
58
62
|
|
|
59
63
|
const actions = {
|
|
@@ -233,6 +237,14 @@ const actions = {
|
|
|
233
237
|
return commonErrorCallback()(error);
|
|
234
238
|
})
|
|
235
239
|
},
|
|
240
|
+
getLegalContent({commit} , restaurantId){
|
|
241
|
+
return $http.get('api/restaurant/informationPages',{params:{restaurantId}}).then(res=>{
|
|
242
|
+
commit('setLegalContent',res.data.data.information_pages)
|
|
243
|
+
}).catch(error => {
|
|
244
|
+
commit('setRestaurants', [])
|
|
245
|
+
return commonErrorCallback()(error);
|
|
246
|
+
})
|
|
247
|
+
}
|
|
236
248
|
}
|
|
237
249
|
export default {
|
|
238
250
|
namespaced: true,
|