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> |
||
|---|---|---|
| .. | ||
| public/icons | ||
| src | ||
| Dockerfile | ||
| index.html | ||
| nginx.conf | ||
| package-lock.json | ||
| package.json | ||
| tsconfig.json | ||
| vite.config.ts | ||