Room planner: semantic flow filters, forward arrow, padlock + guest name fixes
- Flow filter chips are now semantic: Departing = depart|B2B, Arriving = arrive|B2B, so B2B rooms appear in both chips. Adds missing Arriving filter. - Forward → button added to date bar (right of datepicker) - booking_locked normalised to real boolean — NewBook returns '0'/'1' strings which were all truthy, causing padlock on every room - guest_name fallback: also try booking.guest_name (flat field) before account_for_name in case NewBook omits the guests[] array Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
1ab864f4e3
commit
fbe913c01c
4 changed files with 45 additions and 24 deletions
|
|
@ -18,7 +18,7 @@ function filterBookingData(booking, canSeeGuest, canSeeRate, canSeeAllNotes, vis
|
|||
booking_arrival: booking.booking_arrival,
|
||||
booking_departure: booking.booking_departure,
|
||||
booking_eta: booking.booking_eta,
|
||||
booking_locked: booking.booking_locked,
|
||||
booking_locked: booking.booking_locked === true || booking.booking_locked === 1 || booking.booking_locked === '1',
|
||||
pax: booking.pax,
|
||||
site_id: booking.site_id,
|
||||
custom_fields: booking.custom_fields || [],
|
||||
|
|
@ -26,7 +26,7 @@ function filterBookingData(booking, canSeeGuest, canSeeRate, canSeeAllNotes, vis
|
|||
|
||||
if (canSeeGuest) {
|
||||
const guests = booking.guests || []
|
||||
out.guest_name = guests[0]?.guest_name || booking.account_for_name || null
|
||||
out.guest_name = guests[0]?.guest_name || booking.guest_name || booking.account_for_name || null
|
||||
}
|
||||
|
||||
if (canSeeRate) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue