Merged in feat/SW-1368-1369-Guarantee-late-arrival (pull request #1512)
Feat/SW-1368 1369 Guarantee late arrival * feat(SW-1368-SW-1369): guarantee late arrival for confirmation page and my stay * feat(SW-1368-SW-1369): guarantee late arrival updated design * feat(SW-1368-SW-1369): add translations * feat(SW-1368-SW-1369): add translations * feat(SW-1368-SW-1369): fix merge with master * feat(SW-1368-SW-1369): add translations * feat(SW-1368-SW-1369): add redirect with refId * feat(SW-1368-SW-1369): if booking completed redirect to confirmation page * feat(SW-1368-SW-1369): fix comments pr * feat(SW-1368-SW-1369): fix comments pr * feat(SW-1368-SW-1369): fix rebase master * feat(SW-1368-SW-1369): fix duplicate flex rate check * feat(SW-1368-SW-1369): if any room is flex, card must be used * feat(SW-1368-SW-1369): move callback route * feat(SW-1368-SW-1369): top align checkbox * feat(SW-1368-SW-1369): top align checkbox Approved-by: Tobias Johansson Approved-by: Niclas Edenvin
This commit is contained in:
@@ -66,6 +66,7 @@ export default async function DetailsPage({
|
||||
roomStayStartDate: booking.fromDate,
|
||||
roomStayEndDate: booking.toDate,
|
||||
roomTypeCode: room.roomTypeCode,
|
||||
counterRateCode: room.counterRateCode,
|
||||
bookingCode: booking.bookingCode,
|
||||
}
|
||||
|
||||
@@ -89,13 +90,13 @@ export default async function DetailsPage({
|
||||
// redirect back to select-rate if availability call fails
|
||||
redirect(`${selectRate(lang)}?${selectRoomParams.toString()}`)
|
||||
}
|
||||
|
||||
rooms.push({
|
||||
bedTypes: roomAvailability.bedTypes,
|
||||
breakfastIncluded: roomAvailability.breakfastIncluded,
|
||||
cancellationRule: roomAvailability.cancellationRule,
|
||||
cancellationText: roomAvailability.cancellationText,
|
||||
isFlexRate: roomAvailability.isFlexRate,
|
||||
mustBeGuaranteed: roomAvailability.mustBeGuaranteed,
|
||||
memberMustBeGuaranteed: roomAvailability.memberMustBeGuaranteed,
|
||||
packages,
|
||||
rateTitle: roomAvailability.rateTitle,
|
||||
rateDetails: roomAvailability.rateDetails ?? [],
|
||||
@@ -109,8 +110,12 @@ export default async function DetailsPage({
|
||||
roomAvailability.selectedRoom.status === AvailabilityEnum.Available,
|
||||
})
|
||||
}
|
||||
|
||||
const isCardOnlyPayment = rooms.some((room) => room?.mustBeGuaranteed)
|
||||
const memberMustBeGuaranteed = rooms.some(
|
||||
(room) => room?.memberMustBeGuaranteed
|
||||
)
|
||||
const isFlexRate = rooms.some((room) => room.isFlexRate)
|
||||
|
||||
const hotelData = await getHotel({
|
||||
hotelId: booking.hotelId,
|
||||
isCardOnlyPayment,
|
||||
@@ -197,6 +202,9 @@ export default async function DetailsPage({
|
||||
hotel.merchantInformationData.alternatePaymentOptions
|
||||
}
|
||||
supportedCards={hotel.merchantInformationData.cards}
|
||||
mustBeGuaranteed={isCardOnlyPayment}
|
||||
memberMustBeGuaranteed={memberMustBeGuaranteed}
|
||||
isFlexRate={isFlexRate}
|
||||
/>
|
||||
</Suspense>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user