Merged in fix/STAY-124-change-dates (pull request #3199)

Fix/STAY-124 change dates

* fix: handle change dates for different rate types

* fix: update wrong spelling in cancellation rules

* fix: add hover state on links

* fix: handle multiroom scenario


Approved-by: Erik Tiekstra
This commit is contained in:
Christel Westerberg
2025-11-24 09:51:16 +00:00
parent 168813ec60
commit f34e88db7c
16 changed files with 235 additions and 131 deletions

View File

@@ -1,5 +1,6 @@
import { z } from "zod"
import { CancellationRuleEnum } from "@scandic-hotels/common/constants/booking"
import { RateEnum } from "@scandic-hotels/common/constants/rate"
import { RateTypeEnum } from "@scandic-hotels/common/constants/rateType"
import { logger } from "@scandic-hotels/common/logger"
@@ -109,11 +110,11 @@ export const hotelsAvailabilitySchema = z.object({
function getRate(rate: RateDefinition) {
switch (rate.cancellationRule) {
case "CancellableBefore6PM":
case CancellationRuleEnum.CancellableBefore6PM:
return RateEnum.flex
case "Changeable":
case CancellationRuleEnum.Changeable:
return RateEnum.change
case "NotCancellable":
case CancellationRuleEnum.NotCancellable:
return RateEnum.save
default:
logger.warn(