Merged in feat/SW-1517-booking-codes-tracking (pull request #1745)

Feat/SW-1517 booking codes tracking

* feat: SW-1517 Updated tracking to inlcude booking code info

* feat: SW-1517 Tracking booking codes

* feat: SW-1517 booking code multiroom tracking

* feat: SW-1517 booking code tracking select-hotel map view

* feat: SW-1517 Updated to optional param

* feat: SW-1517 Optimized with map

* feat: SW-1517 Typings update

* feat: SW-1517 Replaced reduce with map and join

* feat: SW-1517 Updated typings


Approved-by: Christian Andolf
This commit is contained in:
Hrishikesh Vaipurkar
2025-04-14 07:17:40 +00:00
parent cc7aa6e317
commit e372b91356
14 changed files with 103 additions and 34 deletions

View File

@@ -28,8 +28,14 @@ export default async function SelectRatePage({
if (!searchDetails?.hotel) {
return notFound()
}
const { adultsInRoom, childrenInRoom, hotel, noOfRooms, selectHotelParams } =
searchDetails
const {
adultsInRoom,
childrenInRoom,
hotel,
noOfRooms,
selectHotelParams,
bookingCode,
} = searchDetails
const hotelData = await getHotel({
hotelId: hotel.id,
@@ -63,7 +69,8 @@ export default async function SelectRatePage({
noOfRooms,
hotelData.hotel.address.country,
hotelData.hotel.address.city,
selectHotelParams.city
selectHotelParams.city,
bookingCode
)
const booking = convertSearchParamsToObj<SelectRateSearchParams>(searchParams)

View File

@@ -20,7 +20,8 @@ export function getTracking(
noOfRooms: number,
country: string | undefined,
hotelCity: string | undefined,
paramCity: string | undefined
paramCity: string | undefined,
bookingCode?: string
) {
const pageTrackingData: TrackingSDKPageData = {
channel: TrackingChannelEnum.hotelreservation,
@@ -52,6 +53,7 @@ export function getTracking(
region: hotelCity,
searchTerm: paramCity ?? hotelName,
searchType: "hotel",
bookingCode: bookingCode ?? "n/a",
}
return {