Skip to content
Snippets Groups Projects
Commit 27436960 authored by Antoine Gaudron-Desjardins's avatar Antoine Gaudron-Desjardins
Browse files

fix css for button in mobile phone and order for timetable

parent 5a028bdc
Branches
No related tags found
1 merge request!43fix css for button in mobile phone and order for timetable
Pipeline #44353 passed
...@@ -44,7 +44,8 @@ def add_slot(slots_list, start_time, end_time, function): ...@@ -44,7 +44,8 @@ def add_slot(slots_list, start_time, end_time, function):
average_waiting_time = function(start_time, end_time) average_waiting_time = function(start_time, end_time)
if average_waiting_time: if average_waiting_time:
name = 60 * start_time.hour + start_time.minute name = 60 * start_time.hour + start_time.minute
slots_list.append(schemas.RecordRead(name=name, time=average_waiting_time)) slots_list.append(schemas.RecordRead(
name=name, time=average_waiting_time))
def get_avg_graph_points(place: str, weekday: int, min_time: time, def get_avg_graph_points(place: str, weekday: int, min_time: time,
...@@ -260,8 +261,11 @@ def get_restaurants(db: Session): ...@@ -260,8 +261,11 @@ def get_restaurants(db: Session):
restaurants = [] restaurants = []
for place in places: for place in places:
opening_hours = db.query(models.OpeningHours).filter( opening_hours = db.query(
models.OpeningHours.place == place.place, models.OpeningHours.day == weekday).all() models.OpeningHours).filter(
models.OpeningHours.place == place.place,
models.OpeningHours.day == weekday).order_by(
models.OpeningHours.open_time).all()
opening_hours_formated = [ opening_hours_formated = [
f"{row.open_time.strftime('%Hh%M')}-{row.close_time.strftime('%Hh%M')}" for row in opening_hours] f"{row.open_time.strftime('%Hh%M')}-{row.close_time.strftime('%Hh%M')}" for row in opening_hours]
timetable = "/".join(opening_hours_formated) timetable = "/".join(opening_hours_formated)
......
...@@ -129,7 +129,7 @@ ...@@ -129,7 +129,7 @@
top: 0; top: 0;
height: 3rem; height: 3rem;
width: 3rem; width: 3rem;
margin: 1rem; margin: 0.5rem;
padding: 0.5rem; padding: 0.5rem;
border-radius: 5px; border-radius: 5px;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment