Merged in feat/sw-2873-move-selecthotel-to-booking-flow (pull request #2727)

feat(SW-2873): Move select-hotel to booking flow

* crude setup of select-hotel in partner-sas

* wip

* Fix linting

* restructure tracking files

* Remove dependency on trpc in tracking hooks

* Move pageview tracking to common

* Fix some lint and import issues

* Add AlternativeHotelsPage

* Add SelectHotelMapPage

* Add AlternativeHotelsMapPage

* remove next dependency in tracking store

* Remove dependency on react in tracking hooks

* move isSameBooking to booking-flow

* Inject searchParamsComparator into tracking store

* Move useTrackHardNavigation to common

* Move useTrackSoftNavigation to common

* Add TrackingSDK to partner-sas

* call serverclient in layout

* Remove unused css

* Update types

* Move HotelPin type

* Fix todos

* Merge branch 'master' into feat/sw-2873-move-selecthotel-to-booking-flow

* Merge branch 'master' into feat/sw-2873-move-selecthotel-to-booking-flow

* Fix component


Approved-by: Joakim Jäderberg
This commit is contained in:
Anton Gunnarsson
2025-09-01 08:37:00 +00:00
parent 93a90bef9d
commit 87402a2092
157 changed files with 2026 additions and 1376 deletions

View File

@@ -1,7 +1,7 @@
import type { LoginType } from "@scandic-hotels/common/constants/loginType"
import type { DefaultJWT } from "next-auth/jwt"
import type { RefreshTokenError } from "./lib/types/authError"
import type { LoginType } from "./lib/types/loginType"
// Module augmentation
// https://authjs.dev/getting-started/typescript#popular-interfaces-to-augment

View File

@@ -1,5 +0,0 @@
export enum RateEnum {
change = "change",
flex = "flex",
save = "save",
}

View File

@@ -1,11 +1,11 @@
import { z } from "zod"
import { RateEnum } from "@scandic-hotels/common/constants/rate"
import { RateTypeEnum } from "@scandic-hotels/common/constants/rateType"
import { logger } from "@scandic-hotels/common/logger"
import { toLang } from "@scandic-hotels/common/utils/languages"
import { nullableStringValidator } from "@scandic-hotels/common/utils/zod/stringValidator"
import { RateEnum } from "../../enums/rate"
import { RoomPackageCodeEnum } from "../../enums/roomFilter"
import { AvailabilityEnum } from "../../enums/selectHotel"
import {

View File

@@ -1,4 +1,5 @@
import { Lang } from "@scandic-hotels/common/constants/language"
import { RateEnum } from "@scandic-hotels/common/constants/rate"
import { RateTypeEnum } from "@scandic-hotels/common/constants/rateType"
import { getCacheClient } from "@scandic-hotels/common/dataCache"
import { dt } from "@scandic-hotels/common/dt"
@@ -10,7 +11,6 @@ import { router } from "../.."
import * as api from "../../api"
import { SEARCH_TYPE_REDEMPTION } from "../../constants/booking"
import { BreakfastPackageEnum } from "../../enums/breakfast"
import { RateEnum } from "../../enums/rate"
import { AvailabilityEnum } from "../../enums/selectHotel"
import { badRequestError, unauthorizedError } from "../../errors"
import {

View File

@@ -1,6 +1,7 @@
import { z } from "zod"
import { RateEnum } from "../../../../enums/rate"
import { RateEnum } from "@scandic-hotels/common/constants/rate"
import {
productTypeCorporateChequeSchema,
productTypePointsSchema,

View File

@@ -1,8 +1,7 @@
import type { Lang } from "@scandic-hotels/common/constants/language"
import type { LoginType } from "@scandic-hotels/common/constants/loginType"
import type { MembershipLevel } from "@scandic-hotels/common/constants/membershipLevels"
import type { LoginType } from "../types/loginType"
export type TrackingPageData = {
pageId: string
createDate?: string

View File

@@ -30,7 +30,8 @@ import {
updateStaysBookingUrl,
} from "./utils"
import type { LoginType } from "../../types/loginType"
import type { LoginType } from "@scandic-hotels/common/constants/loginType"
import type { TrackingUserData } from "../types"
export const userQueryRouter = router({

View File

@@ -1,7 +0,0 @@
export enum LoginTypeEnum {
email = "email",
"membership number" = "membership number",
"email link" = "email link",
"dtmc" = "dtmc",
}
export type LoginType = keyof typeof LoginTypeEnum

View File

@@ -1,4 +1,5 @@
import type { RateEnum } from "../enums/rate"
import type { RateEnum } from "@scandic-hotels/common/constants/rate"
import type { BedTypeSelection } from "./bedTypeSelection"
import type { Package } from "./packages"
import type { Product } from "./roomAvailability"