Merged in fix/SW-1617-aa-tracking-ratecodetype- (pull request #2669)
fix(SW-1617): Added rateCodeType in tracking for confirmation page * fix(SW-1617): Added rateCodeType in tracking for confirmation page * fix(SW-1617) Removed unnecessary comment Approved-by: Bianca Widstam Approved-by: Erik Tiekstra
This commit is contained in:
@@ -146,7 +146,7 @@ export function getTracking(
|
||||
.join(",")
|
||||
.toLowerCase(),
|
||||
rateCodeName: rooms.map(constructRateCodeName).join(","),
|
||||
//rateCodeType: , //TODO: Add when available in API. "regular, promotion, corporate etx",
|
||||
rateCodeType: rooms.map((r) => r.rateCodeType?.toLowerCase()).join(","),
|
||||
region: hotel?.address.city,
|
||||
revenueCurrencyCode: [...new Set(rooms.map((r) => r.currencyCode))].join(
|
||||
","
|
||||
|
||||
@@ -77,6 +77,7 @@ export function mapRoomState(
|
||||
name: room.name,
|
||||
packages: booking.packages,
|
||||
rateDefinition: booking.rateDefinition,
|
||||
rateCodeType: booking.bookingType,
|
||||
refId: booking.refId,
|
||||
roomFeatures: booking.packages.filter((p) => p.type === "RoomFeature"),
|
||||
roomPoints: booking.roomPoints,
|
||||
|
||||
@@ -28,6 +28,7 @@ export interface Room {
|
||||
packages: BookingConfirmation["booking"]["packages"]
|
||||
formattedRoomCost: string
|
||||
rateDefinition: BookingConfirmation["booking"]["rateDefinition"]
|
||||
rateCodeType: BookingConfirmation["booking"]["bookingType"]
|
||||
refId: string
|
||||
roomFeatures?: PackageSchema[] | null
|
||||
roomPoints: number
|
||||
|
||||
@@ -208,6 +208,7 @@ export const bookingConfirmationSchema = z
|
||||
attributes: z.object({
|
||||
adults: z.number().int(),
|
||||
ancillary: ancillarySchema,
|
||||
bookingType: z.string().optional(),
|
||||
cancelationNumber: z.string().nullable().default(""),
|
||||
checkInDate: z.string().refine((val) => dt(val).isValid()),
|
||||
checkOutDate: z.string().refine((val) => dt(val).isValid()),
|
||||
|
||||
Reference in New Issue
Block a user