fix: make sure calculations in booking flow are correct
This commit is contained in:
committed by
Michael Zetterberg
parent
3e0f503314
commit
a222ecfc5c
@@ -11,6 +11,7 @@ import {
|
||||
type TrackingSDKPaymentInfo,
|
||||
} from "@/types/components/tracking"
|
||||
import { BreakfastPackageEnum } from "@/types/enums/breakfast"
|
||||
import { RateEnum } from "@/types/enums/rate"
|
||||
import type { Room } from "@/types/stores/booking-confirmation"
|
||||
import type { BookingConfirmation } from "@/types/trpc/routers/booking/confirmation"
|
||||
import type { RateDefinition } from "@/types/trpc/routers/hotel/roomAvailability"
|
||||
@@ -19,11 +20,11 @@ import type { Lang } from "@/constants/languages"
|
||||
function getRate(cancellationRule: RateDefinition["cancellationRule"] | null) {
|
||||
switch (cancellationRule) {
|
||||
case "CancellableBefore6PM":
|
||||
return "flex"
|
||||
return RateEnum.flex
|
||||
case "Changeable":
|
||||
return "change"
|
||||
return RateEnum.change
|
||||
case "NotCancellable":
|
||||
return "save"
|
||||
return RateEnum.save
|
||||
default:
|
||||
return "-"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user