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

@@ -1,4 +1,4 @@
import { BookingStatusEnum, CancellationRuleEnum } from "@/constants/booking"
import { BookingStatusEnum } from "@/constants/booking"
import { dt } from "@/lib/dt"
import { formatChildBedPreferences } from "../utils"
@@ -81,16 +81,11 @@ export function mapRoomDetails({
booking.childBedPreferences
)
const isPrePaid =
!!booking.guaranteeInfo?.paymentMethodDescription ||
booking.rateDefinition.cancellationRule !==
CancellationRuleEnum.CancellableBefore6PM
const priceType = getPriceType({
rateDefinition: booking.rateDefinition,
vouchers: booking.vouchers,
cheques: booking.cheques,
})
const priceType = getPriceType(
booking.cheques,
booking.roomPoints,
booking.vouchers
)
return {
hotelId: booking.hotelId,
@@ -159,7 +154,6 @@ export function mapRoomDetails({
},
},
breakfast,
isPrePaid,
priceType,
}
}