orderiom-api-package 0.4.49 → 0.4.51
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/index.js +3 -1
- package/package.json +1 -1
- package/src/modules/product.js +10 -2
package/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import apiStore from './src';
|
|
2
2
|
import enMsg from "./src/messages/en-api.json";
|
|
3
3
|
import deMsg from "./src/messages/de-api.json";
|
|
4
|
+
import frMsg from './src/messages/fr-api.json';
|
|
4
5
|
import {$http, weekdays, formatDate, formatTime} from './src/common';
|
|
5
6
|
|
|
6
7
|
function install(Vue, options = {}, config = {}) {
|
|
@@ -11,9 +12,10 @@ export default {
|
|
|
11
12
|
install,
|
|
12
13
|
enMsg,
|
|
13
14
|
deMsg,
|
|
15
|
+
frMsg,
|
|
14
16
|
modules: apiStore.modules,
|
|
15
17
|
$http,
|
|
16
18
|
weekdays,
|
|
17
19
|
formatDate,
|
|
18
20
|
formatTime,
|
|
19
|
-
}
|
|
21
|
+
}
|
package/package.json
CHANGED
package/src/modules/product.js
CHANGED
|
@@ -69,12 +69,20 @@ const getters = {
|
|
|
69
69
|
: 'restaurantTakeawayTimes';
|
|
70
70
|
return rootState.orderiomApiPackage.restaurant.restaurantInfo[property] || [];
|
|
71
71
|
},
|
|
72
|
-
disabledDates(state, getters){
|
|
72
|
+
disabledDates(state, getters, rootState){
|
|
73
73
|
const allowedWeekDays = Array.from(new Set(
|
|
74
74
|
getters.deliveryTimes.map(item => item.weekday)
|
|
75
75
|
)).map(item => weekdays.indexOf(item) + 1)
|
|
76
76
|
|
|
77
|
-
return
|
|
77
|
+
return [
|
|
78
|
+
{
|
|
79
|
+
weekdays: [1, 2, 3, 4, 5, 6, 7].filter(item => !allowedWeekDays.includes(item)),
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
start: rootState.orderiomApiPackage.restaurant.restaurantInfo.restaurant_close_times || null,
|
|
83
|
+
end: rootState.orderiomApiPackage.restaurant.restaurantInfo.restaurant_end_close_times || null
|
|
84
|
+
}
|
|
85
|
+
];
|
|
78
86
|
},
|
|
79
87
|
availableTimes(state, getters){
|
|
80
88
|
const result = {};
|