Merged in feat/SW-1076-no-room-availability (pull request #1467)

Feat/SW-1076 no room availability

* fix: update booking error codes

* feat(SW-1076): handle no room availabilty on enter-details

* fix: parse to json in api mutation instead of expecting json

* fix: remove 'isComplete' state from sectionAccordion because it was not needed


Approved-by: Simon.Emanuelsson
This commit is contained in:
Tobias Johansson
2025-03-10 12:13:15 +00:00
parent 131cbfcda3
commit 7c233ab846
23 changed files with 139 additions and 63 deletions

View File

@@ -26,15 +26,15 @@ export function extractGuestFromUser(user: NonNullable<SafeUser>) {
}
export function checkIsSameBooking(
prev: SelectRateSearchParams,
next: SelectRateSearchParams
prev: SelectRateSearchParams & { errorCode?: string },
next: SelectRateSearchParams & { errorCode?: string }
) {
const { rooms: prevRooms, ...prevBooking } = prev
const { rooms: prevRooms, errorCode: prevErrorCode, ...prevBooking } = prev
const prevRoomsWithoutRateCodes = prevRooms.map(
({ rateCode, counterRateCode, roomTypeCode, ...room }) => room
)
const { rooms: nextRooms, ...nextBooking } = next
const { rooms: nextRooms, errorCode: nextErrorCode, ...nextBooking } = next
const nextRoomsWithoutRateCodes = nextRooms.map(
({ rateCode, counterRateCode, roomTypeCode, ...room }) => room