fix(BOOK-559): Using same ContactInformation component on hotel pages and booking flow inside the hotel details sidepeek

Approved-by: Bianca Widstam
This commit is contained in:
Erik Tiekstra
2025-11-13 14:32:17 +00:00
parent f52d210240
commit b0f2276b0b
33 changed files with 75 additions and 282 deletions

View File

@@ -10,13 +10,15 @@ import { safeProtectedServiceProcedure } from "../../procedures"
import { getCityPageUrls } from "../../routers/contentstack/destinationCityPage/utils"
import { getCountryPageUrls } from "../../routers/contentstack/destinationCountryPage/utils"
import { getHotelPageUrls } from "../../routers/contentstack/hotelPage/utils"
import { ApiCountry, type Country } from "../../types/country"
import { ApiCountry } from "../../types/country"
import { getCitiesByCountry } from "../hotels/services/getCitiesByCountry"
import { getCountries } from "../hotels/services/getCountries"
import { getLocationsByCountries } from "../hotels/services/getLocationsByCountries"
import { filterAndCategorizeAutoComplete } from "./util/filterAndCategorizeAutoComplete"
import { mapLocationToAutoCompleteLocation } from "./util/mapLocationToAutoCompleteLocation"
import type { Country } from "@scandic-hotels/common/constants/country"
import type { AutoCompleteLocation } from "./schema"
const destinationsAutoCompleteInputSchema = z.object({

View File

@@ -1,6 +1,6 @@
import { z } from "zod"
import { Country } from "../../../types/country"
import { Country } from "@scandic-hotels/common/constants/country"
export const getCityPagesInput = z.object({
country: z.nativeEnum(Country),

View File

@@ -1,9 +1,9 @@
import { z } from "zod"
import { Country } from "@scandic-hotels/common/constants/country"
import { transformedImageVaultAssetSchema } from "@scandic-hotels/common/utils/imageVault"
import { removeMultipleSlashes } from "@scandic-hotels/common/utils/url"
import { Country } from "../../../types/country"
import { DestinationCountryPageEnum } from "../../../types/destinationCountryPage"
import { discriminatedUnionArray } from "../../../utils/discriminatedUnion"
import {

View File

@@ -3,13 +3,14 @@ import { createCounter } from "@scandic-hotels/common/telemetry"
import { GetDestinationCityListData } from "../../../graphql/Query/DestinationCityPage/DestinationCityListData.graphql"
import { GetCountryPageUrls } from "../../../graphql/Query/DestinationCountryPage/DestinationCountryPageUrl.graphql"
import { request } from "../../../graphql/request"
import { ApiCountry, type Country } from "../../../types/country"
import { ApiCountry } from "../../../types/country"
import { DestinationCountryPageEnum } from "../../../types/destinationCountryPage"
import { generateTag, generateTagsFromSystem } from "../../../utils/generateTag"
import { getCitiesByCountry } from "../../hotels/services/getCitiesByCountry"
import { destinationCityListDataSchema } from "../destinationCityPage/output"
import { countryPageUrlsSchema } from "./output"
import type { Country } from "@scandic-hotels/common/constants/country"
import type { Lang } from "@scandic-hotels/common/constants/language"
import type { GetDestinationCityListDataResponse } from "../../../types/destinationCityPage"

View File

@@ -12,7 +12,7 @@ import {
contentstackExtendedProcedureUID,
serviceProcedure,
} from "../../../procedures"
import { ApiCountry, type Country } from "../../../types/country"
import { ApiCountry } from "../../../types/country"
import {
generateRefsResponseTag,
generateTag,
@@ -28,6 +28,8 @@ import {
} from "./output"
import { getSortedDestinationsByLanguage } from "./utils"
import type { Country } from "@scandic-hotels/common/constants/country"
import type {
GetDestinationOverviewPageData,
GetDestinationOverviewPageRefsSchema,

View File

@@ -1,6 +1,7 @@
import { Country } from "@scandic-hotels/common/constants/country"
import { Lang } from "@scandic-hotels/common/constants/language"
import { ApiCountry, Country } from "../../../types/country"
import { ApiCountry } from "../../../types/country"
import type { DestinationsData } from "../../../types/destinationsData"

View File

@@ -1,5 +1,6 @@
import { z } from "zod"
import { Country } from "@scandic-hotels/common/constants/country"
import {
type FindMyBookingRoute,
findMyBookingRoutes,
@@ -7,7 +8,6 @@ import {
import { myStay } from "@scandic-hotels/common/constants/routes/myStay"
import { transformedImageVaultAssetSchema } from "@scandic-hotels/common/utils/imageVault"
import { Country } from "../../../types/country"
import { RTETypeEnum } from "../../../types/RTEenums"
import { destinationFilterSchema } from "../schemas/destinationFilters"
import { systemSchema } from "../schemas/system"

View File

@@ -1,7 +1,8 @@
import { z } from "zod"
import { Country } from "@scandic-hotels/common/constants/country"
import { BlocksEnums } from "../../../../types/blocksEnum"
import { Country } from "../../../../types/country"
export const locationFilterSchema = z
.object({

View File

@@ -1,11 +1,11 @@
import { z } from "zod"
import { Country } from "@scandic-hotels/common/constants/country"
import { Lang } from "@scandic-hotels/common/constants/language"
import { BreakfastPackageEnum } from "../../enums/breakfast"
import { ChildBedMapEnum } from "../../enums/childBedMapEnum"
import { RoomPackageCodeEnum } from "../../enums/roomFilter"
import { Country } from "../../types/country"
const childrenInRoomSchema = z
.array(

View File

@@ -12,10 +12,9 @@ import { locationCitySchema } from "../schemas/location/city"
import { locationHotelSchema } from "../schemas/location/hotel"
import { getCity } from "./getCity"
import type { Country } from "@scandic-hotels/common/constants/country"
import type { Lang } from "@scandic-hotels/common/constants/language"
import type { Country } from "../../../types/country"
const hotelUtilsLogger = createLogger("getLocationsByCountries")
type CitiesNamesByCountry = Record<

View File

@@ -1,14 +1,6 @@
import { Country } from "@scandic-hotels/common/constants/country"
import { Lang } from "@scandic-hotels/common/constants/language"
export enum Country {
Denmark = "Denmark",
Finland = "Finland",
Germany = "Germany",
Norway = "Norway",
Poland = "Poland",
Sweden = "Sweden",
}
export const ApiCountry: Record<Lang, Record<Country, string>> = {
[Lang.da]: {
[Country.Denmark]: "Danmark",

View File

@@ -1,3 +1,4 @@
import type { Country } from "@scandic-hotels/common/constants/country"
import type { z } from "zod"
import type {
@@ -5,7 +6,6 @@ import type {
countriesSchema,
locationsSchema,
} from "../routers/hotels/output"
import type { Country } from "./country"
export interface LocationSchema extends z.output<typeof locationsSchema> {}