|
|
|
@ -1639,6 +1639,18 @@ define(function(require) { |
|
|
|
|
|
|
|
if (customHours.lunchbreak.enabled) { |
|
|
|
var lunchbreakRule = strategyData.temporalRules.lunchbreak; |
|
|
|
|
|
|
|
// make sure the lunch rule is only valid on days the business is open
|
|
|
|
delete lunchbreakRule.wdays; |
|
|
|
var lunchwdays = []; |
|
|
|
_.each(customHours.opendays, function(val) { |
|
|
|
lunchwdays.push(val.substring(4).toLowerCase()); |
|
|
|
}); |
|
|
|
|
|
|
|
lunchbreakRule = $.extend(true, { |
|
|
|
wdays: lunchwdays |
|
|
|
}, lunchbreakRule); |
|
|
|
|
|
|
|
lunchbreakRule.time_window_start = monster.util.timeToSeconds(customHours.lunchbreak.from); |
|
|
|
lunchbreakRule.time_window_stop = monster.util.timeToSeconds(customHours.lunchbreak.to); |
|
|
|
tmpRulesRequests.lunchbreak = function(callback) { |
|
|
|
|