Merged in fix/refetching-availability-on-select (pull request #2204)

don't use rateCode to determine if bookingCode should come from the room or the 'big' input

* don't use rateCode to determine if bookingCode should come from the room or the 'big' input


Approved-by: Linus Flood
This commit is contained in:
Joakim Jäderberg
2025-05-23 09:55:35 +00:00
parent c27290717b
commit 231ea05348
4 changed files with 25 additions and 33 deletions

View File

@@ -431,10 +431,9 @@ export const hotelQueryRouter = router({
.query(async function ({ ctx, input }) {
input.booking.rooms = input.booking.rooms.map((room) => ({
...room,
bookingCode: room.rateCode
? room.bookingCode
: input.booking.bookingCode,
bookingCode: room.bookingCode || input.booking.bookingCode,
}))
const availability = await getRoomsAvailability(
input,
ctx.token,