Merged in feat(SW-2084)-disable-options-modify-my-stay (pull request #1662)
feat(SW-2084) logic to disable Manage stay options * feat(SW-2084) logic to disable Manage stay options * feat(SW-2084) cleanup logic for checks * feat(SW-2084) check if date has passed * feat(SW-2084) change to datetimeIsInThePast Approved-by: Niclas Edenvin
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { BookingStatusEnum } from "@/constants/booking"
|
||||
import { BookingStatusEnum, CancellationRuleEnum } from "@/constants/booking"
|
||||
import { dt } from "@/lib/dt"
|
||||
|
||||
import { formatChildBedPreferences } from "../utils"
|
||||
@@ -71,6 +71,11 @@ export function mapRoomDetails({
|
||||
booking.childBedPreferences
|
||||
)
|
||||
|
||||
const isPrePaid =
|
||||
!!booking.guaranteeInfo?.paymentMethodDescription ||
|
||||
booking.rateDefinition.cancellationRule !==
|
||||
CancellationRuleEnum.CancellableBefore6PM
|
||||
|
||||
return {
|
||||
hotelId: booking.hotelId,
|
||||
roomTypeCode: booking.roomTypeCode,
|
||||
@@ -85,7 +90,6 @@ export function mapRoomDetails({
|
||||
guaranteeInfo: booking.guaranteeInfo,
|
||||
linkedReservations: booking.linkedReservations,
|
||||
bookingCode: booking.bookingCode,
|
||||
isModifiable: booking.isModifiable,
|
||||
isCancelable: booking.isCancelable,
|
||||
multiRoom: booking.multiRoom,
|
||||
canChangeDate: booking.canChangeDate,
|
||||
@@ -136,5 +140,6 @@ export function mapRoomDetails({
|
||||
},
|
||||
},
|
||||
breakfast,
|
||||
isPrePaid,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user