orderiom-api-package 0.4.57 → 0.4.59

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.57",
3
+ "version": "0.4.59",
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",
@@ -192,6 +192,7 @@ const actions = {
192
192
  .post("api/basket/add", {
193
193
  basketId,
194
194
  productId: data.productId,
195
+ basketProductId: data.basketProductId ? data.basketProductId : undefined,
195
196
  quantity: !data.quantity || data.quantity < 1 ? 1 : data.quantity,
196
197
  attributeItems: data.attributeItems.length
197
198
  ? data.attributeItems
@@ -845,7 +846,12 @@ const actions = {
845
846
  duration: data.duration || undefined,
846
847
  restaurantId: data.restaurantId,
847
848
  }).then(res => {
848
- dispatch("product/getBasket", data.restaurantId, {root: true});
849
+ if(data.getBasket === undefined || !!data.getBasket){
850
+ dispatch("product/getBasket", data.restaurantId, {root: true});
851
+ }else{
852
+ commit('product/setDeliveryTime', delivery_time + ':00');
853
+ }
854
+
849
855
  return res;
850
856
  }).catch(error => {
851
857
  const status = error.response ? error.response.status : null;