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

@@ -15,6 +15,7 @@ import SelectHotelMap from "."
import type { SelectHotelMapContainerProps } from "@/types/components/hotelReservation/selectHotel/map"
import type { SelectHotelSearchParams } from "@/types/components/hotelReservation/selectHotel/selectHotelSearchParams"
import { RateTypeEnum } from "@/types/enums/rateType"
export async function SelectHotelMapContainer({
searchParams,
@@ -73,6 +74,14 @@ export async function SelectHotelMapContainer({
const arrivalDate = new Date(selectHotelParams.fromDate)
const departureDate = new Date(selectHotelParams.toDate)
const isBookingCodeRateAvailable = bookingCode
? hotels?.some(
(hotel) =>
hotel.availability.productType?.public?.rateType !==
RateTypeEnum.Regular
)
: false
const { hotelsTrackingData, pageTrackingData } = getTracking(
lang,
!!isAlternativeFor,
@@ -86,7 +95,9 @@ export async function SelectHotelMapContainer({
noOfRooms,
hotels?.[0]?.hotel.address.country,
hotels?.[0]?.hotel.address.city,
selectHotelParams.city
selectHotelParams.city,
bookingCode,
isBookingCodeRateAvailable
)
return (
@@ -99,6 +110,7 @@ export async function SelectHotelMapContainer({
filterList={filterList}
cityCoordinates={cityCoordinates}
bookingCode={bookingCode ?? ""}
isBookingCodeRateAvailable={isBookingCodeRateAvailable}
/>
<TrackingSDK pageData={pageTrackingData} hotelInfo={hotelsTrackingData} />
</>