Skip to content
Snippets Groups Projects
Commit 14b3fd00 authored by Aymeric Chaumont's avatar Aymeric Chaumont
Browse files

linting

parent 39943b5f
No related branches found
No related tags found
2 merge requests!29Time dependence,!28improve front
...@@ -14,7 +14,7 @@ from db import models, schemas ...@@ -14,7 +14,7 @@ from db import models, schemas
def get_waiting_time(place: str, db: Session): def get_waiting_time(place: str, db: Session):
""" Get the last estimated waiting time for the given place """ """ Get the last estimated waiting time for the given place """
current_date = datetime.now(tz=pytz.timezone("Europe/Paris")) current_date = datetime.now(tz=pytz.timezone("Europe/Paris"))
weekday, current_time = current_date.weekday(), date.time() weekday, current_time = current_date.weekday(), current_date.time()
first_timeslot = get_timeslot(place, weekday, True, db) first_timeslot = get_timeslot(place, weekday, True, db)
if first_timeslot and current_time < first_timeslot[0]: if first_timeslot and current_time < first_timeslot[0]:
return first_timeslot[0].hour, first_timeslot[0].minute return first_timeslot[0].hour, first_timeslot[0].minute
......
...@@ -28,7 +28,12 @@ export default function App() { ...@@ -28,7 +28,12 @@ export default function App() {
setRestaurantsList([ setRestaurantsList([
{ name: "RU Eiffel", status: true, waiting_time: 17, timetable: "11h30-14h / 18h30-21h" }, { name: "RU Eiffel", status: true, waiting_time: 17, timetable: "11h30-14h / 18h30-21h" },
{ name: "RU Bréguet", status: true, waiting_time: 25, timetable: "11h30-14h" }, { name: "RU Bréguet", status: true, waiting_time: 25, timetable: "11h30-14h" },
{ name: "Lieu de vie", status: false, waiting_time: null, timetable: "11h30-14h / 18h30-21h" }, {
name: "Lieu de vie",
status: false,
waiting_time: null,
timetable: "11h30-14h / 18h30-21h",
},
{ name: "Caféteria Eiffel", status: false, waiting_time: null, timetable: "18h30-21h" }, { name: "Caféteria Eiffel", status: false, waiting_time: null, timetable: "18h30-21h" },
{ name: "Caféteria Bréguet", status: true, waiting_time: null, timetable: "18h30-21h" }, { name: "Caféteria Bréguet", status: true, waiting_time: null, timetable: "18h30-21h" },
]); ]);
......
import React from "react"; import React from "react";
export default function Details() { export default function Details() {
return( return <div>details page</div>;
<div>details page</div>
)
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment