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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orderiom-api-package",
3
- "version": "0.3.52",
3
+ "version": "0.3.54",
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",
@@ -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