orderiom-api-package
Advanced tools
Comparing version 0.4.47 to 0.4.48
{ | ||
"name": "orderiom-api-package", | ||
"version": "0.4.47", | ||
"version": "0.4.48", | ||
"description": "This package will install all necessary API calls for every orderiom restaurant", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -1,2 +0,2 @@ | ||
import {commonErrorCallback, calculateBasketIdParameter, updateBasket, deliveryCodeToName, weekdays, $http} from '../common'; | ||
import {commonErrorCallback, calculateBasketIdParameter, updateBasket, formatDate, formatTime, deliveryCodeToName, weekdays, $http} from '../common'; | ||
@@ -326,2 +326,12 @@ const state = () => ({ | ||
} | ||
let delivery_time = undefined; | ||
if(state.deliveryTime){ | ||
delivery_time = new Date(state.deliveryTime); | ||
delivery_time = [ | ||
formatDate(delivery_time), | ||
formatTime(delivery_time) | ||
].join(' ') | ||
} | ||
return $http.get("api/restaurant/products", { | ||
@@ -331,3 +341,3 @@ params: { | ||
restaurantId: data.restaurantId, | ||
delivery_time: state.deliveryTime || undefined, | ||
delivery_time, | ||
basketId: basketId | ||
@@ -334,0 +344,0 @@ } |
126364
3146