Commit cb69072d authored by Renfred Harper's avatar Renfred Harper

Rename restaurant current attribute

parent 8a1da07c
......@@ -90,12 +90,12 @@ function update_grid(restaurants) {
if (day === end_day) {
if (now <= Date.parse(time.end_time)) {
restaurant.open = true;
restaurant.current = time;
restaurant.current_time = time;
return false;
}
} else {
restaurant.open = true;
restaurant.current = time;
restaurant.current_time = time;
return false;
}
......@@ -105,25 +105,25 @@ function update_grid(restaurants) {
if (day === start_day) {
if (now >= Date.parse(time.start_time)) {
restaurant.open = true;
restaurant.current = time;
restaurant.current_time = time;
return false;
}
} else {
restaurant.open = true;
restaurant.current = time;
restaurant.current_time = time;
return false;
}
}
} else if (start_day < end_day) {
if (day > start_day && day < end_day) {
restaurant.open = true;
restaurant.current = time;
restaurant.current_time = time;
return false;
}
} else if (start_day > end_day) {
if (day > start_day || day < end_day) {
restaurant.open = true;
restaurant.current = time;
restaurant.current_time = time;
return false;
}
}
......
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