Commit cdf228c1 authored by Renfred Harper's avatar Renfred Harper

Set resturants without opentimes to closed

parent b4470d34
...@@ -76,8 +76,11 @@ function update_grid(restaurants) { ...@@ -76,8 +76,11 @@ function update_grid(restaurants) {
if (schedule === undefined) { if (schedule === undefined) {
schedule = restaurant.main_schedule; schedule = restaurant.main_schedule;
} }
restaurant.current_schedule = schedule;
// Open the restaurants that are open, leave the rest closed. // Open the restaurants that are open, leave the rest closed.
if (schedule.open_times.length === 0) {
restaurant.open = false;
}
restaurant.current_schedule = schedule;
$.each(schedule.open_times, function (idx, time) { $.each(schedule.open_times, function (idx, time) {
var start_day = time.start_day; var start_day = time.start_day;
var end_day = time.end_day; var end_day = time.end_day;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment