hvac/frontend
jtricerolph dc8c9df719 Fix: a booking arriving in a few days showed 'booked' instead of 'vacant'
resolveGoverningBooking() was letting an upcoming (not-today) booking govern colour,
so any room with something booked within the 7-day lookahead showed green 'Booked'
regardless of how far off the arrival was. 'booked' should only apply when someone's
actually arriving tonight.

Now a booking only governs state/colour when it covers today (arriving today,
mid-stay, or departing today) — otherwise the room is genuinely vacant. The soonest
upcoming booking (if any) is surfaced separately as vacant_nights, a countdown to
the next arrival, purely informational and no longer tied to colour. Dashboard shows
'Vacant N nights' when something's booked within the window, or 'Vacant 7+ nights'
when nothing was found in the fetched window at all.

New zone_state.vacant_nights column, threaded through saveZoneState/pollOnce/status.js.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-25 11:10:35 +00:00
..
public/icons Add PWA manifest support and icons 2026-07-29 17:28:39 +00:00
src Fix: a booking arriving in a few days showed 'booked' instead of 'vacant' 2026-08-25 11:10:35 +00:00
Dockerfile Scaffold Phase 1 hvac app — NewBook-driven room TRV heating scheduler 2026-07-26 18:00:42 +00:00
index.html Add iOS install hint + Apple PWA meta tags, fix missing beforeinstallprompt handler 2026-08-06 14:12:12 +00:00
nginx.conf Scaffold Phase 1 hvac app — NewBook-driven room TRV heating scheduler 2026-07-26 18:00:42 +00:00
package-lock.json Scaffold Phase 1 hvac app — NewBook-driven room TRV heating scheduler 2026-07-26 18:00:42 +00:00
package.json Add PWA manifest support and icons 2026-07-29 17:28:39 +00:00
tsconfig.json Scaffold Phase 1 hvac app — NewBook-driven room TRV heating scheduler 2026-07-26 18:00:42 +00:00
vite.config.ts Add PWA manifest support and icons 2026-07-29 17:28:39 +00:00