spans_next was using departure > viewDate (today), which made any 1-night booking extend the card to the right. Fixed to departure > tomorrow so the card only extends when it's also active tomorrow. Night counter used Date.parse() on NewBook datetime strings, which browsers parse as local time and shift off by hours in BST. Replaced with utcDay() which slices the YYYY-MM-DD prefix and calls Date.UTC() — always correct. When multiple bookings overlap today, prefer the one arriving today so an arriving guest takes priority over a stale stopover. Also treat a co-active non-arriving booking as the B2B departing context. Force previous-day bracket to show as "departed" (purple) when that booking departs today, without waiting for NewBook to update its status field. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| src | ||
| Dockerfile | ||
| index.html | ||
| nginx.conf | ||
| package.json | ||
| tsconfig.json | ||
| vite.config.ts | ||