Sync active room stays when booking expected dates change
All checks were successful
build-and-deploy / build-deploy (push) Successful in 37s
All checks were successful
build-and-deploy / build-deploy (push) Successful in 37s
This commit is contained in:
@@ -1361,6 +1361,7 @@ ROOM STAYS + CARDS APIS
|
||||
What it does:
|
||||
|
||||
- Returns active stays with booking and guest details.
|
||||
- expectedCheckoutAt is resolved per active stay (room_stay.planned_checkout_at), with booking expected checkout as fallback.
|
||||
- Includes per-stay nightlyRate (nullable when rate was not set on room stay).
|
||||
- AGENT-only users are blocked.
|
||||
|
||||
@@ -1822,7 +1823,11 @@ BOOKING APIS
|
||||
What it does:
|
||||
|
||||
- Updates planned dates on booking (expectedCheckInAt, expectedCheckOutAt), not actual checkout.
|
||||
- Updates booking-level expected dates only; does not auto-change room_stay checkout timestamps.
|
||||
- Updates booking-level expected dates.
|
||||
- After validation, auto-syncs linked active room stays (checked-out stays are not modified):
|
||||
- OPEN booking: active stay fromAt is synced to expectedCheckInAt (when provided).
|
||||
- OPEN/CHECKED_IN booking: active stay planned checkout is synced to expectedCheckOutAt (when provided).
|
||||
- Does not auto-close room stays and does not overwrite actual room_stay.to_at timestamps.
|
||||
- For OPEN bookings: can update both expected check-in and expected check-out.
|
||||
- For OPEN bookings with linked room stays: each stay start/end must remain inside expected booking window.
|
||||
- For CHECKED_IN: can update only expectedCheckOutAt (check-in change is blocked).
|
||||
|
||||
Reference in New Issue
Block a user