Skip to content
Snippets Groups Projects

fix css for button in mobile phone and order for timetable

Merged Antoine Gaudron-Desjardins requested to merge small_fix into main
2 files
+ 8
4
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 7
3
@@ -44,7 +44,8 @@ def add_slot(slots_list, start_time, end_time, function):
average_waiting_time = function(start_time, end_time)
if average_waiting_time:
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,
@@ -260,8 +261,11 @@ def get_restaurants(db: Session):
restaurants = []
for place in places:
opening_hours = db.query(models.OpeningHours).filter(
models.OpeningHours.place == place.place, models.OpeningHours.day == weekday).all()
opening_hours = db.query(
models.OpeningHours).filter(
models.OpeningHours.place == place.place,
models.OpeningHours.day == weekday).order_by(
models.OpeningHours.open_time).all()
opening_hours_formated = [
f"{row.open_time.strftime('%Hh%M')}-{row.close_time.strftime('%Hh%M')}" for row in opening_hours]
timetable = "/".join(opening_hours_formated)
Loading