From 81aeeac3d27bd5688185cae32a8e3e8e06e86b1f Mon Sep 17 00:00:00 2001 From: NguyenND Date: Tue, 28 Jul 2026 15:09:12 -0400 Subject: [PATCH] Jul 28 - Update schedule page's referred time --- CLAUDE.md | 22 ++++++++- README.md | 11 ++++- app.py | 79 +++++++++++++++++++++++++++----- static/css/style.css | 3 ++ static/js/demo-booking.js | 95 +++++++++++++++++++++++++++++++++++++++ templates/demo.html | 11 +++-- 6 files changed, 203 insertions(+), 18 deletions(-) create mode 100644 static/js/demo-booking.js diff --git a/CLAUDE.md b/CLAUDE.md index 0b8c528..98b8ed7 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -223,8 +223,26 @@ shows only `is_published` topics (sections with no published topics are hidden). the posted time must be in that list, the date must parse, be today-or-later, within `DEMO_MAX_DAYS_AHEAD`, and be a weekday. Dates/times are stored exactly as picked; `DEMO_TIMEZONE_LABEL` is display-only (no tz conversion anywhere). -- **One appointment per slot:** a request for a (date, time) that already has a - non-`cancelled` row is rejected with a flash. Cancelling frees the slot. +- **One appointment per slot**, enforced in three places that share the same + helpers (`taken_slots`, `available_slots`, `demo_day_status` in `app.py`): + 1. `GET /demo/slots?date=YYYY-MM-DD` → JSON `{open, reason, slots[]}`; + `static/js/demo-booking.js` rebuilds the time ` @@ -108,6 +111,8 @@ + +