Differentiate arrived vs arriving-today in Rooms Accessible View
A confirmed booking for today that hasn't checked in yet is accessible — staff can get in before the guest arrives. Previously it was lumped with in-room guests and greyed out. Backend: classifyBookingStatus() splits NewBook 'staying' bookings by status string (normalised). Statuses containing 'arriv', 'inhouse' or 'checkedin' → occupied; everything else → arriving. /api/occupancy now returns both occupied_site_ids and arriving_site_ids. Frontend: - Occupied rooms: greyed out + 'Occupied' badge (guest physically in room) - Arriving today: normal display + amber 'Arrival today' badge (access now, prioritise before guest checks in) - Chip label shows 'Rooms (X free • Y arriving • Z occupied)' breakdown Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
3fc23eaecc
commit
25d6323aa4
4 changed files with 61 additions and 15 deletions
|
|
@ -84,7 +84,7 @@ export function resolveTask(id: number, body: {
|
|||
export function addComment(id: number, note: string, addToTemplate = false): Promise<{ ok: boolean; added_to_template: boolean }> {
|
||||
return request(`/tasks/${id}/comments`, { method: 'POST', body: JSON.stringify({ note, add_to_template: addToTemplate }) })
|
||||
}
|
||||
export function fetchOccupancy(): Promise<{ date: string; occupied_site_ids: string[] }> {
|
||||
export function fetchOccupancy(): Promise<{ date: string; occupied_site_ids: string[]; arriving_site_ids: string[] }> {
|
||||
return request('/occupancy')
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue