Show Arrival today alongside Departing for back-to-back turnovers
fetchRoomOccupancy() was dropping a site from `arriving` as soon as it was also `departing`, on the assumption departing always wins. But a departing room can have a same-day incoming booking already confirmed — worth flagging on its own, not silently swallowed. Site now stays in both sets when that's the case; the Rooms Accessible View card renders both the purple "Departing" and amber "Arrival today" badges together. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
8ddb99d2d7
commit
e3e7e60594
2 changed files with 12 additions and 6 deletions
|
|
@ -258,7 +258,9 @@ export default function Summary() {
|
|||
const sid = t.newbook_site_id ? String(t.newbook_site_id) : null
|
||||
const isOccupied = roomsView && !!sid && occupiedSiteIds.has(sid)
|
||||
const isDeparting = roomsView && !!sid && !isOccupied && departingSiteIds.has(sid)
|
||||
const isArriving = roomsView && !!sid && !isOccupied && !isDeparting && arrivingSiteIds.has(sid)
|
||||
// Not exclusive with isDeparting — a departing room can also have a same-day
|
||||
// incoming booking (back-to-back turnover), and both badges should show.
|
||||
const isArriving = roomsView && !!sid && !isOccupied && arrivingSiteIds.has(sid)
|
||||
return (
|
||||
<div
|
||||
key={t.id}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue