orderiom-api-package 0.3.15 → 0.3.17
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
package/src/messages/de-api.json
CHANGED
|
@@ -162,5 +162,6 @@
|
|
|
162
162
|
"There was an error in fetching the blogs": "Beim Abrufen der Blogs ist ein Fehler aufgetreten",
|
|
163
163
|
"There was an error in fetching the blog": "Beim Abrufen des Blogs ist ein Fehler aufgetreten",
|
|
164
164
|
"Something went wrong": "Etwas ist schief gelaufen",
|
|
165
|
-
"Basket not found": "Korb nicht gefunden"
|
|
165
|
+
"Basket not found": "Korb nicht gefunden",
|
|
166
|
+
"full_capacity": "Die Kapazität ist voll"
|
|
166
167
|
}
|
package/src/messages/en-api.json
CHANGED
|
@@ -162,5 +162,6 @@
|
|
|
162
162
|
"There was an error in fetching the blogs": "There was an error in fetching the blogs",
|
|
163
163
|
"There was an error in fetching the blog": "There was an error in fetching the blog",
|
|
164
164
|
"Something went wrong": "Something went wrong",
|
|
165
|
-
"Basket not found": "Basket not found"
|
|
165
|
+
"Basket not found": "Basket not found",
|
|
166
|
+
"full_capacity": "Capacity is full"
|
|
166
167
|
}
|
package/src/modules/order.js
CHANGED
|
@@ -581,8 +581,11 @@ const actions = {
|
|
|
581
581
|
},
|
|
582
582
|
addDeliveryTimeToBasket({ dispatch, rootState }, data) {
|
|
583
583
|
const basket = JSON.parse(localStorage.getItem("basket"));
|
|
584
|
+
const restaurantId = parseInt(data.restaurantId ? data.restaurantId : restaurantIdEnv)
|
|
584
585
|
const basketId = !rootState.orderiomApiPackage.auth.privateToken ? {
|
|
585
|
-
basketId: basket.find(
|
|
586
|
+
basketId: basket.find(basket =>
|
|
587
|
+
parseInt(basket.restaurantId) === parseInt(restaurantId)
|
|
588
|
+
).basketId
|
|
586
589
|
} : {}
|
|
587
590
|
return axios
|
|
588
591
|
.post("api/basket/add-delivery-time", {
|
|
@@ -590,11 +593,11 @@ const actions = {
|
|
|
590
593
|
delivery_time: data.date && data.time ? data.date + " " + data.time : null,
|
|
591
594
|
deliveryType: data.deliveryType,
|
|
592
595
|
duration: data.duration || undefined,
|
|
593
|
-
restaurantId
|
|
596
|
+
restaurantId
|
|
594
597
|
})
|
|
595
598
|
.then((res) => {
|
|
596
599
|
// console.log(res);
|
|
597
|
-
dispatch('product/getBasket',
|
|
600
|
+
dispatch('product/getBasket', restaurantId, { root: true })
|
|
598
601
|
return {
|
|
599
602
|
type: 'success',
|
|
600
603
|
msg: 'ok'
|