Commit graph

4 commits

Author SHA1 Message Date
d8ad753a62 Fix available_rooms to use is_included flag from room category settings
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-20 12:32:45 +00:00
4e783bd508 Fix available_rooms query: use newbook_occupancy_report_data not daily_occupancy
The table is newbook_occupancy_report_data (per-category rows). Aggregate
SUM(available - maintenance) WHERE category_id != '5' to get the correct
available room count excluding overflow and maintenance.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-20 11:32:35 +00:00
e04ae18711 Fix /public/forecast/rooms to use available_rooms excluding overflow
Replace static system_config.total_rooms (80, includes overflow) with
per-day available_rooms from daily_occupancy table. This ensures
occupancy % is calculated against the correct base (non-overflow rooms)
consistent with how the rest of the app reports occupancy. Falls back
to system_config.total_rooms when daily_occupancy has no data for a date.
Also adds available_rooms per-day to the response payload.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-20 10:51:51 +00:00
75d2c1fa9d Forecasting app: hybrid port to HNF stack
Python FastAPI ML backend kept intact; auth replaced with central hnf_session cookie verification. Frontend rebuilt on React 18 + TS + Vite with stack design system, Plotly charts retained. Shared Postgres via DATABASE_URL; schema applied on startup.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-04 18:49:34 +00:00