From 614a8fcb922026fe5c965173049454be5976a390 Mon Sep 17 00:00:00 2001 From: john gravois Date: Mon, 24 Jun 2024 14:17:24 -0700 Subject: [PATCH] add 90 min option, hide stale reservations, expose next hour midday --- app/routes/faq.tsx | 14 ++++++++++++-- app/routes/reservation-list.tsx | 8 ++++++-- app/routes/reservations.new.tsx | 10 ++++++++++ flyer.png | Bin 0 -> 321038 bytes 4 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 flyer.png diff --git a/app/routes/faq.tsx b/app/routes/faq.tsx index 05337a2..7daf7c5 100644 --- a/app/routes/faq.tsx +++ b/app/routes/faq.tsx @@ -104,11 +104,21 @@ export default function FAQ() { @mel-thomas -  ðŸŽ¨. icons courtesy of  +  ðŸŽ¨ +

+

+ {" "} + icons courtesy of  font awesome - . + , image courtesy of  + + @nicholasjio/unsplash +

diff --git a/app/routes/reservation-list.tsx b/app/routes/reservation-list.tsx index 3392e28..f3409d5 100644 --- a/app/routes/reservation-list.tsx +++ b/app/routes/reservation-list.tsx @@ -61,7 +61,8 @@ const TimeSlots = ({ })} > {rezTimes.map((num) => { - const isPast = num <= offsetNow.getHours() + 1 && isToday; + const isPast = num <= offsetNow.getHours() && isToday; + const isJustPast = num === offsetNow.getHours() && isToday; const onHourPrivate = reservations.find( (r) => isOverlapping(r, date, num) && !r.openPlay, @@ -82,7 +83,10 @@ const TimeSlots = ({ const onHourIsReserved = onHourPrivate || onHourOpenPlay; const halfHourIsReserved = halfHourPrivate || halfHourOpenPlay; - if (isPast && !onHourIsReserved && !halfHourIsReserved) { + if ( + isPast && + !(isJustPast && (onHourIsReserved || halfHourIsReserved)) + ) { return null; } diff --git a/app/routes/reservations.new.tsx b/app/routes/reservations.new.tsx index 0858fb2..4274fac 100644 --- a/app/routes/reservations.new.tsx +++ b/app/routes/reservations.new.tsx @@ -148,6 +148,16 @@ export default function NewReservationPage() { /> +