fix: make sure ancillaries also listen to invalidate requests
This commit is contained in:
committed by
Simon.Emanuelsson
parent
623495a176
commit
0b960200b9
@@ -64,17 +64,17 @@ export function mapRoomDetails({
|
||||
)
|
||||
// We don't get `requestedPrice` in packages
|
||||
const breakfastChildren: Omit<BreakfastPackage, "requestedPrice"> | null =
|
||||
(breakfastPackageChildren && !booking.rateDefinition.breakfastIncluded)
|
||||
breakfastPackageChildren && !booking.rateDefinition.breakfastIncluded
|
||||
? {
|
||||
code: breakfastPackageChildren.code,
|
||||
description: breakfastPackageChildren.description,
|
||||
localPrice: {
|
||||
currency: breakfastPackageChildren.currency,
|
||||
price: breakfastPackageChildren.unitPrice,
|
||||
totalPrice: breakfastPackageChildren.totalPrice,
|
||||
},
|
||||
packageType: PackageTypeEnum.BreakfastChildren,
|
||||
}
|
||||
code: breakfastPackageChildren.code,
|
||||
description: breakfastPackageChildren.description,
|
||||
localPrice: {
|
||||
currency: breakfastPackageChildren.currency,
|
||||
price: breakfastPackageChildren.unitPrice,
|
||||
totalPrice: breakfastPackageChildren.totalPrice,
|
||||
},
|
||||
packageType: PackageTypeEnum.BreakfastChildren,
|
||||
}
|
||||
: null
|
||||
|
||||
const isCancelled = booking.reservationStatus === BookingStatusEnum.Cancelled
|
||||
@@ -135,43 +135,23 @@ export function mapRoomDetails({
|
||||
}))
|
||||
|
||||
return {
|
||||
adults: booking.adults,
|
||||
...booking,
|
||||
bedType: {
|
||||
description: room?.bedType.mainBed.description ?? "",
|
||||
roomTypeCode: room?.bedType.code ?? "",
|
||||
},
|
||||
bookingCode: booking.bookingCode,
|
||||
breakfast,
|
||||
breakfastChildren,
|
||||
canChangeDate: booking.canChangeDate,
|
||||
cancellationNumber: booking.cancellationNumber,
|
||||
checkInDate: booking.checkInDate,
|
||||
checkOutDate: booking.checkOutDate,
|
||||
cheques: booking.cheques,
|
||||
childrenAges: booking.childrenAges,
|
||||
childrenAsString,
|
||||
childrenInRoom,
|
||||
confirmationNumber: booking.confirmationNumber,
|
||||
createDateTime: booking.createDateTime,
|
||||
currencyCode: booking.currencyCode,
|
||||
guaranteeInfo: booking.guaranteeInfo,
|
||||
guest: booking.guest,
|
||||
hotelId: booking.hotelId,
|
||||
isCancelable: booking.isCancelable,
|
||||
isCancelled,
|
||||
linkedReservations: booking.linkedReservations,
|
||||
mainRoom: booking.mainRoom,
|
||||
multiRoom: booking.multiRoom,
|
||||
originalPackages: booking.packages,
|
||||
packages,
|
||||
priceType,
|
||||
rate,
|
||||
rateDefinition: booking.rateDefinition,
|
||||
refId: booking.refId,
|
||||
reservationStatus: booking.reservationStatus,
|
||||
room,
|
||||
roomName: room?.name ?? "",
|
||||
roomNumber,
|
||||
roomPoints: booking.roomPoints,
|
||||
roomPrice: {
|
||||
perNight: {
|
||||
local: {
|
||||
@@ -188,13 +168,6 @@ export function mapRoomDetails({
|
||||
requested: undefined,
|
||||
},
|
||||
},
|
||||
roomTypeCode: booking.roomTypeCode,
|
||||
terms: booking.rateDefinition.cancellationText,
|
||||
totalPoints: booking.totalPoints,
|
||||
totalPrice: booking.totalPrice,
|
||||
totalPriceExVat: booking.totalPriceExVat,
|
||||
vatAmount: booking.vatAmount,
|
||||
vatPercentage: booking.vatPercentage,
|
||||
vouchers: booking.vouchers,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user