orderiom-api-package 0.4.22 → 0.4.23
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/product.js +5 -2
package/package.json
CHANGED
package/src/modules/product.js
CHANGED
|
@@ -108,12 +108,15 @@ const getters = {
|
|
|
108
108
|
|
|
109
109
|
const result = new Date();
|
|
110
110
|
const closedToday = rootState.orderiomApiPackage.restaurant.restaurantInfo ? rootState.orderiomApiPackage.restaurant.restaurantInfo.closed : false;
|
|
111
|
+
const delayTime = Number(rootState.orderiomApiPackage.restaurant.restaurantInfo[`${dt}_hours`] || 0);
|
|
111
112
|
const minHour =
|
|
112
|
-
result.getHours() +
|
|
113
|
+
result.getHours() + parseInt(delayTime / 60);
|
|
114
|
+
const minMinutes =
|
|
115
|
+
result.getMinutes() + (delayTime % 60);
|
|
113
116
|
const isTomorrow = closedToday && minHour < 24;
|
|
114
117
|
result.setHours(
|
|
115
118
|
isTomorrow ? 24 : minHour,
|
|
116
|
-
isTomorrow ? 0 :
|
|
119
|
+
isTomorrow ? 0 : minMinutes,
|
|
117
120
|
0,
|
|
118
121
|
0
|
|
119
122
|
);
|