Fixed bugs

This commit is contained in:
Linus Flood
2024-12-03 08:19:47 +01:00
parent 4487c25d47
commit 26d44a2c29
11 changed files with 14 additions and 3 deletions

View File

@@ -26,6 +26,7 @@ export default function HotelReservationPage({ params }: PageArgs<LangParams>) {
pageName: "hotelreservation",
siteSections: "hotelreservation",
pageType: "hotelreservationstartpage",
siteVersion: "new-web",
}
return (

View File

@@ -74,6 +74,7 @@ export default async function SelectHotelMapPage({
pageName: "hotelreservation|select-hotel|mapview",
siteSections: "hotelreservation|select-hotel|mapview",
pageType: "bookinghotelsmapviewpage",
siteVersion: "new-web",
}
const hotelsTrackingData: TrackingSDKHotelInfo = {

View File

@@ -36,6 +36,7 @@ import { setLang } from "@/i18n/serverContext"
import styles from "./page.module.css"
import { ChildBedMapEnum } from "@/types/components/bookingWidget/enums"
import type { HotelData } from "@/types/components/hotelReservation/selectHotel/hotelCardListingProps"
import type { SelectHotelSearchParams } from "@/types/components/hotelReservation/selectHotel/selectHotelSearchParams"
import {
@@ -129,6 +130,7 @@ export default async function SelectHotelPage({
pageName: "hotelreservation|select-hotel",
siteSections: "hotelreservation|select-hotel",
pageType: "bookinghotelspage",
siteVersion: "new-web",
}
const hotelsTrackingData: TrackingSDKHotelInfo = {
@@ -139,7 +141,7 @@ export default async function SelectHotelPage({
noOfAdults: adults,
noOfChildren: child?.length,
ageOfChildren: child?.map((c) => c.age).join(","),
childBedPreference: child?.map((c) => c.bed).join("|"),
childBedPreference: child?.map((c) => ChildBedMapEnum[c.bed]).join("|"),
noOfRooms: 1, // // TODO: Handle multiple rooms
duration: differenceInCalendarDays(departureDate, arrivalDate),
leadTime: differenceInCalendarDays(arrivalDate, new Date()),

View File

@@ -76,6 +76,7 @@ export default async function SelectRatePage({
pageName: "hotelreservation|select-rate",
siteSections: "hotelreservation|select-rate",
pageType: "bookingroomsandratespage",
siteVersion: "new-web",
}
const hotelsTrackingData: TrackingSDKHotelInfo = {

View File

@@ -86,6 +86,7 @@ export default function EnterDetailsTracking(props: Props) {
pageName: `hotelreservation|${currentStep}`,
siteSections: `hotelreservation|${currentStep}`,
pageType: currentStep,
siteVersion: "new-web",
}
const trackingData = {

View File

@@ -162,7 +162,8 @@ export default async function StepPage({
channel: TrackingChannelEnum["hotelreservation"],
pageName: `hotelreservation|${searchParams.step}`,
siteSections: `hotelreservation|${searchParams.step}`,
pageType: searchParams.step, // TODO: Change to correct
pageType: searchParams.step,
siteVersion: "new-web",
}
const initialHotelsTrackingData: TrackingSDKHotelInfo = {

View File

@@ -191,6 +191,7 @@ export const accountPageQueryRouter = router({
pageType: `member${parsedtitle}page`,
pageName: validatedAccountPage.data.trackingProps.url,
siteSections: validatedAccountPage.data.trackingProps.url,
siteVersion: "new-web",
}
return {

View File

@@ -70,6 +70,7 @@ export const collectionPageQueryRouter = router({
pageType: "collectionpage",
pageName: collectionPage.data.trackingProps.url,
siteSections: collectionPage.data.trackingProps.url,
siteVersion: "new-web",
}
return {

View File

@@ -93,6 +93,7 @@ export const contentPageQueryRouter = router({
pageType: "staticcontentpage",
pageName: contentPage.data.trackingProps.url,
siteSections: contentPage.data.trackingProps.url,
siteVersion: "new-web",
}
return {

View File

@@ -183,6 +183,7 @@ export const loyaltyPageQueryRouter = router({
pageType: "loyaltycontentpage",
pageName: validatedLoyaltyPage.data.trackingProps.url,
siteSections: validatedLoyaltyPage.data.trackingProps.url,
siteVersion: "new-web",
}
getLoyaltyPageSuccessCounter.add(1, metricsVariables)
console.info(

View File

@@ -18,7 +18,7 @@ export type TrackingSDKPageData = {
domainLanguage: Lang
pageType: string
channel: TrackingChannel
siteVersion?: "new-web"
siteVersion: "new-web"
pageName: string
domain?: string
siteSections: string