orderiom-api-package 0.3.52 → 0.3.54
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/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-basket-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
|