fix: display modify dates for already guaranteed changeable rates

This commit is contained in:
Simon Emanuelsson
2025-04-03 15:51:38 +02:00
committed by Michael Zetterberg
parent b8a976db22
commit 2abd4c5c12
17 changed files with 94 additions and 205 deletions

View File

@@ -30,21 +30,13 @@ export default function BookingSummary({ hotel }: BookingSummaryProps) {
const bookedRoom = useMyStayRoomDetailsStore((state) => state.bookedRoom)
const {
isCancelled,
createDateTime,
guaranteeInfo,
checkInDate,
isPrePaid,
priceType,
} = bookedRoom
const { isCancelled, createDateTime, guaranteeInfo, priceType } = bookedRoom
const directionsUrl = `https://www.google.com/maps/dir/?api=1&destination=${hotel.location.latitude},${hotel.location.longitude}`
const bookingDate = dt(createDateTime).locale(lang).format("D MMMM YYYY")
const isPaid =
isPrePaid || dt(checkInDate).startOf("day").isBefore(dt().startOf("day"))
const isPaid = !!guaranteeInfo
const paymentMethod = guaranteeInfo?.paymentMethodDescription
?.toLocaleLowerCase()