Merged in fix/SW-2438-change-to-breakfast-buffet-remove-dash (pull request #1918)

fix(SW-2438): change to breakfast buffet always and replace dash with empty string

* fix(SW-2438): change to breakfast buffet always and replace dash with empty string

* fix(SW-2438): remove none from ageOfChildren


Approved-by: Tobias Johansson
Approved-by: Matilda Landström
This commit is contained in:
Bianca Widstam
2025-04-30 09:46:03 +00:00
parent efb7219b6d
commit 8931fe5312
6 changed files with 17 additions and 19 deletions

View File

@@ -30,7 +30,7 @@ function getRate(cancellationRule: RateDefinition["cancellationRule"] | null) {
case "NotCancellable":
return RateEnum.save
default:
return "-"
return ""
}
}
@@ -97,7 +97,7 @@ export function getTracking(
})
const hotelsTrackingData: TrackingSDKHotelInfo = {
ageOfChildren: rooms.map((r) => r.childrenAges?.join(",") ?? "-").join("|"),
ageOfChildren: rooms.map((r) => r.childrenAges?.join(",") ?? "").join("|"),
analyticsRateCode: rooms
.map((r) => getRate(r.rateDefinition.cancellationRule))
.join("|"),
@@ -127,7 +127,7 @@ export function getTracking(
.map((cbp) =>
Array(cbp.quantity).fill(invertedBedTypeMap[cbp.bedType])
)
.join(",") ?? "-"
.join(",") ?? ""
)
.join("|"),
country: hotel?.address.country,
@@ -156,7 +156,7 @@ export function getTracking(
rewardNightAvailability: booking.roomPoints > 0 ? "true" : "false",
points: booking.roomPoints > 0 ? booking.roomPoints : undefined,
roomPrice: rooms.reduce((total, room) => total + room.roomPrice, 0),
roomTypeCode: rooms.map((r) => r.roomTypeCode ?? "-").join(","),
roomTypeCode: rooms.map((r) => r.roomTypeCode ?? "").join(","),
searchType: "hotel",
specialRoomType: rooms
.map((room) => getSpecialRoomType(room.packages))