From dd0a699e4a87e9a50f4f11d75979c081e27122fd Mon Sep 17 00:00:00 2001 From: Hrishikesh Vaipurkar Date: Thu, 28 Nov 2024 18:04:15 +0100 Subject: [PATCH 01/52] fix: SW-1040 Updated fields clickable area --- components/DatePicker/date-picker.module.css | 18 ++++----- .../FormContent/Search/index.tsx | 38 ++++++++++--------- .../FormContent/Search/search.module.css | 12 ++++++ .../FormContent/formContent.module.css | 11 +++++- .../Forms/BookingWidget/FormContent/index.tsx | 12 ++++-- .../guests-rooms-picker.module.css | 9 +++++ 6 files changed, 67 insertions(+), 33 deletions(-) diff --git a/components/DatePicker/date-picker.module.css b/components/DatePicker/date-picker.module.css index 985c9d63c..cfd78c747 100644 --- a/components/DatePicker/date-picker.module.css +++ b/components/DatePicker/date-picker.module.css @@ -1,12 +1,3 @@ -.container { - overflow: hidden; - position: relative; - - &[data-isopen="true"] { - overflow: visible; - } -} - .btn { background: none; border: none; @@ -15,6 +6,12 @@ padding: 0; width: 100%; text-align: left; + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + padding: 20px var(--Spacing-x-one-and-half) 0; } .body { @@ -33,6 +30,7 @@ @media screen and (max-width: 1366px) { .container { z-index: 10001; + height: 24px; } .hideWrapper { @@ -63,6 +61,6 @@ border-width + wanted space below booking widget */ - top: calc(100% + var(--Spacing-x2) + 1px + var(--Spacing-x4)); + top: calc(100% + var(--Spacing-x1) + 1px + var(--Spacing-x4)); } } diff --git a/components/Forms/BookingWidget/FormContent/Search/index.tsx b/components/Forms/BookingWidget/FormContent/Search/index.tsx index 0d1ee36d4..860ecffde 100644 --- a/components/Forms/BookingWidget/FormContent/Search/index.tsx +++ b/components/Forms/BookingWidget/FormContent/Search/index.tsx @@ -169,25 +169,27 @@ export default function Search({ locations }: SearchProps) {
- + + placeholder: intl.formatMessage({ + id: "Destinations & hotels", + }), + ...register(name, { + onBlur: function () { + closeMenu() + }, + onChange: handleOnChange, + }), + type: "search", + })} + /> +
- {intl.formatMessage( - { id: "booking.nights" }, - { totalNights: nights > 0 ? nights : 0 } - )} + {nights > 0 + ? intl.formatMessage( + { id: "booking.nights" }, + { totalNights: nights } + ) + : intl.formatMessage({ + id: "Check in", + })}
diff --git a/components/GuestsRoomsPicker/guests-rooms-picker.module.css b/components/GuestsRoomsPicker/guests-rooms-picker.module.css index d4a6dbec0..dd43b2c32 100644 --- a/components/GuestsRoomsPicker/guests-rooms-picker.module.css +++ b/components/GuestsRoomsPicker/guests-rooms-picker.module.css @@ -47,6 +47,12 @@ padding: 0; width: 100%; text-align: left; + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + padding: 20px var(--Spacing-x-one-and-half) 0; } .footer { @@ -109,6 +115,9 @@ } @media screen and (min-width: 1367px) { + .container { + height: 24px; + } .pickerContainerMobile { display: none; } From 7d68dbaab2766db368a41d7edf169f685d515459 Mon Sep 17 00:00:00 2001 From: Hrishikesh Vaipurkar Date: Thu, 28 Nov 2024 18:06:44 +0100 Subject: [PATCH 02/52] fix: SW-1040 Fixed ref issue by removing extra props --- .../ChildSelector/ChildInfoSelector.tsx | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/components/GuestsRoomsPicker/ChildSelector/ChildInfoSelector.tsx b/components/GuestsRoomsPicker/ChildSelector/ChildInfoSelector.tsx index a74b52200..95bb9fc0c 100644 --- a/components/GuestsRoomsPicker/ChildSelector/ChildInfoSelector.tsx +++ b/components/GuestsRoomsPicker/ChildSelector/ChildInfoSelector.tsx @@ -33,7 +33,7 @@ export default function ChildInfoSelector({ const ageLabel = intl.formatMessage({ id: "Age" }) const bedLabel = intl.formatMessage({ id: "Bed" }) const errorMessage = intl.formatMessage({ id: "Child age is required" }) - const { setValue, formState, register } = useFormContext() + const { setValue, formState } = useFormContext() function updateSelectedBed(bed: number) { setValue(`rooms.${roomIndex}.child.${index}.bed`, bed) @@ -95,9 +95,7 @@ export default function ChildInfoSelector({ }} placeholder={ageLabel} maxHeight={180} - {...register(ageFieldName, { - required: true, - })} + name={ageFieldName} isNestedInModal={true} /> @@ -112,9 +110,7 @@ export default function ChildInfoSelector({ updateSelectedBed(key as number) }} placeholder={bedLabel} - {...register(bedFieldName, { - required: true, - })} + name={bedFieldName} isNestedInModal={true} /> ) : null} From 4de3f4717cfc40d2623dbe7623296fca4f2e80f8 Mon Sep 17 00:00:00 2001 From: Pontus Dreij Date: Tue, 26 Nov 2024 10:27:47 +0100 Subject: [PATCH 03/52] fix(SW-978): Fallback if no room is selected in URL --- .../hotelreservation/(standard)/select-hotel/page.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-hotel/page.tsx b/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-hotel/page.tsx index 3954be688..1d3ea38f6 100644 --- a/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-hotel/page.tsx +++ b/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-hotel/page.tsx @@ -61,6 +61,14 @@ export default async function SelectHotelPage({ const selectHotelParams = new URLSearchParams(searchParams) const selectHotelParamsObject = getHotelReservationQueryParams(selectHotelParams) + + if ( + !selectHotelParamsObject.room || + selectHotelParamsObject.room.length === 0 + ) { + return notFound() + } + const adults = selectHotelParamsObject.room[0].adults // TODO: Handle multiple rooms const children = selectHotelParamsObject.room[0].child ? generateChildrenString(selectHotelParamsObject.room[0].child) From 3d78bdd671a369f2b0bba3d03a0adf431fd2cd86 Mon Sep 17 00:00:00 2001 From: Pontus Dreij Date: Tue, 26 Nov 2024 13:55:44 +0100 Subject: [PATCH 04/52] fix(SW-978) Checks for null data on hotels --- .../select-hotel/@modal/(.)map/page.tsx | 13 ++++++---- .../(standard)/select-hotel/page.tsx | 9 +++++-- .../(standard)/select-hotel/utils.ts | 20 ++++++++++++---- .../HotelReservation/HotelCard/index.tsx | 24 ++++++++++--------- .../HotelCardDialogListing/index.tsx | 2 +- .../HotelCardDialogListing/utils.ts | 2 ++ lib/trpc/memoizedRequests/index.ts | 2 +- server/routers/hotels/input.ts | 2 +- .../selectHotel/hotelCardListingProps.ts | 4 ++++ .../hotelReservation/selectHotel/map.ts | 2 +- 10 files changed, 54 insertions(+), 26 deletions(-) diff --git a/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-hotel/@modal/(.)map/page.tsx b/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-hotel/@modal/(.)map/page.tsx index 2579fd597..40ce894bc 100644 --- a/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-hotel/@modal/(.)map/page.tsx +++ b/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-hotel/@modal/(.)map/page.tsx @@ -14,6 +14,7 @@ import { setLang } from "@/i18n/serverContext" import { fetchAvailableHotels, getFiltersFromHotels } from "../../utils" +import { HotelData } from "@/types/components/hotelReservation/selectHotel/hotelCardListingProps" import type { SelectHotelSearchParams } from "@/types/components/hotelReservation/selectHotel/selectHotelSearchParams" import type { LangParams, PageArgs } from "@/types/params" @@ -52,11 +53,15 @@ export default async function SelectHotelMapPage({ children, }) - const hotelPins = getHotelPins(hotels) - const filterList = getFiltersFromHotels(hotels) + const validHotels = hotels.filter( + (hotel): hotel is HotelData => hotel !== null + ) + + const hotelPins = getHotelPins(validHotels) + const filterList = getFiltersFromHotels(validHotels) const cityCoordinates = await getCityCoordinates({ city: city.name, - hotel: { address: hotels[0].hotelData.address.streetAddress }, + hotel: { address: hotels?.[0]?.hotelData?.address.streetAddress }, }) return ( @@ -65,7 +70,7 @@ export default async function SelectHotelMapPage({ apiKey={googleMapsApiKey} hotelPins={hotelPins} mapId={googleMapId} - hotels={hotels} + hotels={validHotels} filterList={filterList} cityCoordinates={cityCoordinates} /> diff --git a/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-hotel/page.tsx b/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-hotel/page.tsx index 1d3ea38f6..ec281141b 100644 --- a/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-hotel/page.tsx +++ b/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-hotel/page.tsx @@ -33,6 +33,7 @@ import { setLang } from "@/i18n/serverContext" import styles from "./page.module.css" +import { HotelData } from "@/types/components/hotelReservation/selectHotel/hotelCardListingProps" import type { SelectHotelSearchParams } from "@/types/components/hotelReservation/selectHotel/selectHotelSearchParams" import { AlertTypeEnum } from "@/types/enums/alert" import { LangParams, PageArgs } from "@/types/params" @@ -82,7 +83,11 @@ export default async function SelectHotelPage({ children, }) - const filterList = getFiltersFromHotels(hotels) + const validHotels = hotels.filter( + (hotel): hotel is HotelData => hotel !== null + ) + + const filterList = getFiltersFromHotels(validHotels) const breadcrumbs = [ { title: intl.formatMessage({ id: "Home" }), @@ -177,7 +182,7 @@ export default async function SelectHotelPage({ })} /> )} - + diff --git a/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-hotel/utils.ts b/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-hotel/utils.ts index bd41510ce..fe9f0ab84 100644 --- a/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-hotel/utils.ts +++ b/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-hotel/utils.ts @@ -1,10 +1,14 @@ import { getHotelData } from "@/lib/trpc/memoizedRequests" import { serverClient } from "@/lib/trpc/server" +import { badRequestError } from "@/server/errors/trpc" import { getLang } from "@/i18n/serverContext" import type { AvailabilityInput } from "@/types/components/hotelReservation/selectHotel/availabilityInput" -import type { HotelData } from "@/types/components/hotelReservation/selectHotel/hotelCardListingProps" +import type { + HotelData, + NullableHotelData, +} from "@/types/components/hotelReservation/selectHotel/hotelCardListingProps" import type { CategorizedFilters, Filter, @@ -30,10 +34,10 @@ const hotelFacilitiesFilterNames = [ export async function fetchAvailableHotels( input: AvailabilityInput -): Promise { +): Promise { const availableHotels = await serverClient().hotel.availability.hotels(input) - if (!availableHotels) throw new Error() + if (!availableHotels) return [] const language = getLang() @@ -43,7 +47,7 @@ export async function fetchAvailableHotels( language, }) - if (!hotelData) throw new Error() + if (!hotelData) return { hotelData: null, price: hotel.productType } return { hotelData: hotelData.data.attributes, @@ -55,7 +59,13 @@ export async function fetchAvailableHotels( } export function getFiltersFromHotels(hotels: HotelData[]): CategorizedFilters { - const filters = hotels.flatMap((hotel) => hotel.hotelData.detailedFacilities) + if (hotels.length === 0) + return { facilityFilters: [], surroundingsFilters: [] } + + const filters = hotels.flatMap((hotel) => { + if (!hotel.hotelData) return [] + return hotel.hotelData.detailedFacilities + }) const uniqueFilterIds = [...new Set(filters.map((filter) => filter.id))] const filterList: Filter[] = uniqueFilterIds diff --git a/components/HotelReservation/HotelCard/index.tsx b/components/HotelReservation/HotelCard/index.tsx index f6fbbcf12..5c2f788ee 100644 --- a/components/HotelReservation/HotelCard/index.tsx +++ b/components/HotelReservation/HotelCard/index.tsx @@ -41,18 +41,11 @@ function HotelCard({ const { hotelData } = hotel const { price } = hotel - const amenities = hotelData.detailedFacilities.slice(0, 5) - - const classNames = hotelCardVariants({ - type, - state, - }) - const handleMouseEnter = useCallback(() => { - if (onHotelCardHover) { + if (onHotelCardHover && hotelData) { onHotelCardHover(hotelData.name) } - }, [onHotelCardHover, hotelData.name]) + }, [onHotelCardHover, hotelData]) const handleMouseLeave = useCallback(() => { if (onHotelCardHover) { @@ -60,6 +53,15 @@ function HotelCard({ } }, [onHotelCardHover]) + if (!hotel || !hotelData) return null + + const amenities = hotelData.detailedFacilities.slice(0, 5) + + const classNames = hotelCardVariants({ + type, + state, + }) + return (
{hotelData.name} diff --git a/components/HotelReservation/HotelCardDialogListing/index.tsx b/components/HotelReservation/HotelCardDialogListing/index.tsx index 123cc4ced..7e8750ec2 100644 --- a/components/HotelReservation/HotelCardDialogListing/index.tsx +++ b/components/HotelReservation/HotelCardDialogListing/index.tsx @@ -17,7 +17,7 @@ export default function HotelCardDialogListing({ activeCard, onActiveCardChange, }: HotelCardDialogListingProps) { - const hotelsPinData = getHotelPins(hotels) + const hotelsPinData = hotels ? getHotelPins(hotels) : [] const activeCardRef = useRef(null) const observerRef = useRef(null) const dialogRef = useRef(null) diff --git a/components/HotelReservation/HotelCardDialogListing/utils.ts b/components/HotelReservation/HotelCardDialogListing/utils.ts index 2299b3f35..1a0e05ad8 100644 --- a/components/HotelReservation/HotelCardDialogListing/utils.ts +++ b/components/HotelReservation/HotelCardDialogListing/utils.ts @@ -2,6 +2,8 @@ import type { HotelData } from "@/types/components/hotelReservation/selectHotel/ import type { HotelPin } from "@/types/components/hotelReservation/selectHotel/map" export function getHotelPins(hotels: HotelData[]): HotelPin[] { + if (hotels.length === 0) return [] + return hotels.map((hotel) => ({ coordinates: { lat: hotel.hotelData.location.latitude, diff --git a/lib/trpc/memoizedRequests/index.ts b/lib/trpc/memoizedRequests/index.ts index 7db2e66da..2bf35c264 100644 --- a/lib/trpc/memoizedRequests/index.ts +++ b/lib/trpc/memoizedRequests/index.ts @@ -144,7 +144,7 @@ export const getBookingConfirmation = cache( export const getCityCoordinates = cache( async function getMemoizedCityCoordinates(input: { city: string - hotel: { address: string } + hotel: { address: string | undefined } }) { return serverClient().hotel.map.city(input) } diff --git a/server/routers/hotels/input.ts b/server/routers/hotels/input.ts index a4e47caf3..4a66009b3 100644 --- a/server/routers/hotels/input.ts +++ b/server/routers/hotels/input.ts @@ -77,6 +77,6 @@ export const getRoomPackagesInputSchema = z.object({ export const getCityCoordinatesInputSchema = z.object({ city: z.string(), hotel: z.object({ - address: z.string(), + address: z.string().optional(), }), }) diff --git a/types/components/hotelReservation/selectHotel/hotelCardListingProps.ts b/types/components/hotelReservation/selectHotel/hotelCardListingProps.ts index 68a6174ed..eb84b6977 100644 --- a/types/components/hotelReservation/selectHotel/hotelCardListingProps.ts +++ b/types/components/hotelReservation/selectHotel/hotelCardListingProps.ts @@ -18,3 +18,7 @@ export type HotelData = { hotelData: Hotel price: ProductType } + +export interface NullableHotelData extends Omit { + hotelData: HotelData["hotelData"] | null +} diff --git a/types/components/hotelReservation/selectHotel/map.ts b/types/components/hotelReservation/selectHotel/map.ts index 4ec21f86f..19490464d 100644 --- a/types/components/hotelReservation/selectHotel/map.ts +++ b/types/components/hotelReservation/selectHotel/map.ts @@ -56,7 +56,7 @@ export interface HotelCardDialogProps { } export interface HotelCardDialogListingProps { - hotels: HotelData[] + hotels: HotelData[] | null activeCard: string | null | undefined onActiveCardChange: (hotelName: string | null) => void } From 558efba23d4a0f1f1e7d53967c854f674e99b73f Mon Sep 17 00:00:00 2001 From: Pontus Dreij Date: Fri, 29 Nov 2024 09:38:49 +0100 Subject: [PATCH 05/52] Reset the error and refresh the page when the search params change, to support the booking widget that is using router.push to navigate to the booking flow page --- app/[lang]/(live)/error.tsx | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/app/[lang]/(live)/error.tsx b/app/[lang]/(live)/error.tsx index 1b1970475..a39495eb7 100644 --- a/app/[lang]/(live)/error.tsx +++ b/app/[lang]/(live)/error.tsx @@ -1,7 +1,12 @@ "use client" // Error components must be Client Components -import { useParams, usePathname } from "next/navigation" -import { useEffect } from "react" +import { + useParams, + usePathname, + useRouter, + useSearchParams, +} from "next/navigation" +import { startTransition, useEffect, useRef } from "react" import { useIntl } from "react-intl" import { login } from "@/constants/routes/handleAuth" @@ -15,11 +20,17 @@ import { LangParams } from "@/types/params" export default function Error({ error, + reset, }: { error: Error & { digest?: string } + reset: () => void }) { const intl = useIntl() const params = useParams() + const router = useRouter() + const searchParams = useSearchParams() + const currentSearchParamsRef = useRef() + const isFirstLoadRef = useRef(true) useEffect(() => { // Log the error to an error reporting service @@ -31,6 +42,23 @@ export default function Error({ } }, [error, params.lang]) + useEffect(() => { + // This is to reset the error and refresh the page when the search params change, to support the booking widget that is using router.push to navigate to the booking flow page + const currentSearchParams = searchParams.toString() + + if ( + currentSearchParamsRef.current !== currentSearchParams && + !isFirstLoadRef.current + ) { + startTransition(() => { + reset() + router.refresh() + }) + } + isFirstLoadRef.current = false + currentSearchParamsRef.current = currentSearchParams + }, [searchParams, reset, router]) + const pathname = usePathname() const lang = findLang(pathname) From 289d43b326379a142bb2443ef97613f605536d4a Mon Sep 17 00:00:00 2001 From: Pontus Dreij Date: Fri, 29 Nov 2024 09:56:25 +0100 Subject: [PATCH 06/52] fix(SW-978): Small fixes --- .../select-hotel/@modal/(.)map/page.tsx | 2 +- .../(standard)/select-hotel/page.tsx | 4 +++- .../(standard)/select-hotel/utils.ts | 1 - .../HotelCardDialogListing/index.tsx | 2 +- components/Maps/StaticMap/index.tsx | 23 ++++++++++++++++--- 5 files changed, 25 insertions(+), 7 deletions(-) diff --git a/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-hotel/@modal/(.)map/page.tsx b/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-hotel/@modal/(.)map/page.tsx index 40ce894bc..600afbb38 100644 --- a/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-hotel/@modal/(.)map/page.tsx +++ b/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-hotel/@modal/(.)map/page.tsx @@ -14,7 +14,7 @@ import { setLang } from "@/i18n/serverContext" import { fetchAvailableHotels, getFiltersFromHotels } from "../../utils" -import { HotelData } from "@/types/components/hotelReservation/selectHotel/hotelCardListingProps" +import type { HotelData } from "@/types/components/hotelReservation/selectHotel/hotelCardListingProps" import type { SelectHotelSearchParams } from "@/types/components/hotelReservation/selectHotel/selectHotelSearchParams" import type { LangParams, PageArgs } from "@/types/params" diff --git a/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-hotel/page.tsx b/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-hotel/page.tsx index ec281141b..d0b079f5d 100644 --- a/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-hotel/page.tsx +++ b/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-hotel/page.tsx @@ -33,7 +33,7 @@ import { setLang } from "@/i18n/serverContext" import styles from "./page.module.css" -import { HotelData } from "@/types/components/hotelReservation/selectHotel/hotelCardListingProps" +import type { HotelData } from "@/types/components/hotelReservation/selectHotel/hotelCardListingProps" import type { SelectHotelSearchParams } from "@/types/components/hotelReservation/selectHotel/selectHotelSearchParams" import { AlertTypeEnum } from "@/types/enums/alert" import { LangParams, PageArgs } from "@/types/params" @@ -112,6 +112,8 @@ export default async function SelectHotelPage({ const isAllUnavailable = hotels.every((hotel) => hotel.price === undefined) + console.log("searchParams.city", searchParams.city) + return ( <>
diff --git a/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-hotel/utils.ts b/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-hotel/utils.ts index fe9f0ab84..7960d3314 100644 --- a/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-hotel/utils.ts +++ b/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-hotel/utils.ts @@ -1,6 +1,5 @@ import { getHotelData } from "@/lib/trpc/memoizedRequests" import { serverClient } from "@/lib/trpc/server" -import { badRequestError } from "@/server/errors/trpc" import { getLang } from "@/i18n/serverContext" diff --git a/components/HotelReservation/HotelCardDialogListing/index.tsx b/components/HotelReservation/HotelCardDialogListing/index.tsx index 7e8750ec2..4f9e83b36 100644 --- a/components/HotelReservation/HotelCardDialogListing/index.tsx +++ b/components/HotelReservation/HotelCardDialogListing/index.tsx @@ -77,7 +77,7 @@ export default function HotelCardDialogListing({ return (
- {hotelsPinData?.length && + {!!hotelsPinData?.length && hotelsPinData.map((data) => { const isActive = data.name === activeCard return ( diff --git a/components/Maps/StaticMap/index.tsx b/components/Maps/StaticMap/index.tsx index 7c80aa01f..6db5eada3 100644 --- a/components/Maps/StaticMap/index.tsx +++ b/components/Maps/StaticMap/index.tsx @@ -5,6 +5,25 @@ import { getUrlWithSignature } from "@/utils/map" import { StaticMapProps } from "@/types/components/maps/staticMap" +function getCenter({ + coordinates, + city, + country, +}: { + coordinates?: { lat: number; lng: number } + city?: string + country?: string +}): string | undefined { + switch (true) { + case !!coordinates: + return `${coordinates.lat},${coordinates.lng}` + case !!country: + return `${city}, ${country}` + default: + return city + } +} + export default function StaticMap({ city, country, @@ -19,9 +38,7 @@ export default function StaticMap({ const key = env.GOOGLE_STATIC_MAP_KEY const secret = env.GOOGLE_STATIC_MAP_SIGNATURE_SECRET const baseUrl = "https://maps.googleapis.com/maps/api/staticmap" - const center = coordinates - ? `${coordinates.lat},${coordinates.lng}` - : `${city}, ${country}` + const center = getCenter({ coordinates, city, country }) if (!center) { return null From b6e974ad4e521b1788350edb20767ce1fba362e8 Mon Sep 17 00:00:00 2001 From: Christian Andolf Date: Wed, 27 Nov 2024 09:13:24 +0100 Subject: [PATCH 07/52] fix: corrected some letter-spacing values since percentage is not allowed --- .../TempDesignSystem/BackToTopButton/backToTopButton.module.css | 2 +- components/TempDesignSystem/Button/button.module.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/TempDesignSystem/BackToTopButton/backToTopButton.module.css b/components/TempDesignSystem/BackToTopButton/backToTopButton.module.css index 4ce70972b..9b56dc314 100644 --- a/components/TempDesignSystem/BackToTopButton/backToTopButton.module.css +++ b/components/TempDesignSystem/BackToTopButton/backToTopButton.module.css @@ -20,7 +20,7 @@ font-weight: 500; font-size: var(--typography-Caption-Bold-fontSize); line-height: var(--typography-Caption-Bold-lineHeight); - letter-spacing: 0.6%; + letter-spacing: 0.084px; text-decoration: none; } diff --git a/components/TempDesignSystem/Button/button.module.css b/components/TempDesignSystem/Button/button.module.css index 8dda9d9e1..f57a0ff8b 100644 --- a/components/TempDesignSystem/Button/button.module.css +++ b/components/TempDesignSystem/Button/button.module.css @@ -13,7 +13,7 @@ font-size: var(--typography-Body-Bold-fontSize); font-weight: 500; line-height: var(--typography-Body-Bold-lineHeight); - letter-spacing: 0.6%; + letter-spacing: 0.084px; text-decoration: none; } From 4da09184698ff423c338b8f472b14bab4ce2f2bf Mon Sep 17 00:00:00 2001 From: Chuma McPhoy Date: Fri, 29 Nov 2024 09:20:50 +0100 Subject: [PATCH 08/52] fix(SW-1095): set country code based on url lang when phone input empty --- .../TempDesignSystem/Form/Phone/index.tsx | 32 +++++++++++++++---- .../Phone => types/components/form}/phone.ts | 5 ++- 2 files changed, 30 insertions(+), 7 deletions(-) rename {components/TempDesignSystem/Form/Phone => types/components/form}/phone.ts (61%) diff --git a/components/TempDesignSystem/Form/Phone/index.tsx b/components/TempDesignSystem/Form/Phone/index.tsx index 9c413fc0a..8c5c91fa3 100644 --- a/components/TempDesignSystem/Form/Phone/index.tsx +++ b/components/TempDesignSystem/Form/Phone/index.tsx @@ -12,17 +12,20 @@ import { } from "react-international-phone" import { useIntl } from "react-intl" +import { Lang } from "@/constants/languages" + import { ChevronDownIcon } from "@/components/Icons" import ErrorMessage from "@/components/TempDesignSystem/Form/ErrorMessage" import AriaInputWithLabel from "@/components/TempDesignSystem/Form/Input/AriaInputWithLabel" import Label from "@/components/TempDesignSystem/Form/Label" import Body from "@/components/TempDesignSystem/Text/Body" +import useLang from "@/hooks/useLang" import styles from "./phone.module.css" import type { ChangeEvent } from "react" -import type { PhoneProps } from "./phone" +import { LowerCaseCountryCode, PhoneProps } from "@/types/components/form/phone" export default function Phone({ ariaLabel = "Phone number input", @@ -37,6 +40,7 @@ export default function Phone({ }, }: PhoneProps) { const intl = useIntl() + const lang = useLang() const { control, setValue, trigger } = useFormContext() const phone = useWatch({ name }) @@ -47,13 +51,17 @@ export default function Phone({ rules: registerOptions, }) + const defaultPhoneNumber = formState.defaultValues?.phoneNumber + + // If defaultPhoneNumber exists and is valid, parse it to get the country code, + // otherwise set the default country from the lang. + const defaultCountry = isValidPhoneNumber(defaultPhoneNumber) + ? parsePhoneNumber(defaultPhoneNumber).country?.toLowerCase() + : getDefaultCountryFromLang(lang) + const { country, handlePhoneValueChange, inputValue, setCountry } = usePhoneInput({ - defaultCountry: isValidPhoneNumber(formState.defaultValues?.phoneNumber) - ? parsePhoneNumber( - formState.defaultValues?.phoneNumber - ).country?.toLowerCase() - : "se", + defaultCountry, disableDialCodeAndPrefix: true, forceDialCode: true, value: phone, @@ -142,3 +150,15 @@ export default function Phone({
) } + +function getDefaultCountryFromLang(lang: Lang): LowerCaseCountryCode { + const countryMap: Record = { + sv: "se", + da: "dk", + fi: "fi", + no: "no", + de: "de", + en: "gb", + } + return countryMap[lang] || "se" +} diff --git a/components/TempDesignSystem/Form/Phone/phone.ts b/types/components/form/phone.ts similarity index 61% rename from components/TempDesignSystem/Form/Phone/phone.ts rename to types/components/form/phone.ts index f7dbd0e15..537c17cc1 100644 --- a/components/TempDesignSystem/Form/Phone/phone.ts +++ b/types/components/form/phone.ts @@ -1,6 +1,9 @@ +import type { CountryCode } from "libphonenumber-js/min" import type { RegisterOptions } from "react-hook-form" -export type PhoneProps = { +export type LowerCaseCountryCode = Lowercase + +export interface PhoneProps { ariaLabel?: string className?: string disabled?: boolean From da824ee2b431ca6befdccb1796988e8bf1ccd601 Mon Sep 17 00:00:00 2001 From: Chuma McPhoy Date: Fri, 29 Nov 2024 10:39:10 +0100 Subject: [PATCH 09/52] fix(SW-1095): add type to imports --- components/TempDesignSystem/Form/Phone/index.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/TempDesignSystem/Form/Phone/index.tsx b/components/TempDesignSystem/Form/Phone/index.tsx index 8c5c91fa3..8d2171770 100644 --- a/components/TempDesignSystem/Form/Phone/index.tsx +++ b/components/TempDesignSystem/Form/Phone/index.tsx @@ -25,7 +25,10 @@ import styles from "./phone.module.css" import type { ChangeEvent } from "react" -import { LowerCaseCountryCode, PhoneProps } from "@/types/components/form/phone" +import type { + LowerCaseCountryCode, + PhoneProps, +} from "@/types/components/form/phone" export default function Phone({ ariaLabel = "Phone number input", From b80d75a63ae5e7955c69203d977b4c96db0b4c5e Mon Sep 17 00:00:00 2001 From: Chuma McPhoy Date: Fri, 29 Nov 2024 12:18:24 +0100 Subject: [PATCH 10/52] fix(SW-1095): default to swedish country code if page in english --- components/TempDesignSystem/Form/Phone/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/TempDesignSystem/Form/Phone/index.tsx b/components/TempDesignSystem/Form/Phone/index.tsx index 8d2171770..cdd26af62 100644 --- a/components/TempDesignSystem/Form/Phone/index.tsx +++ b/components/TempDesignSystem/Form/Phone/index.tsx @@ -161,7 +161,7 @@ function getDefaultCountryFromLang(lang: Lang): LowerCaseCountryCode { fi: "fi", no: "no", de: "de", - en: "gb", + en: "se", // Default to Sweden for English } return countryMap[lang] || "se" } From ee622b07cb6f16be3701b71776cd5b2abd178be2 Mon Sep 17 00:00:00 2001 From: Fredrik Thorsson Date: Tue, 19 Nov 2024 13:39:14 +0100 Subject: [PATCH 11/52] feat(SW-914): add amenities sidepeek --- .../SidePeeks/Amenities/Amenity/index.tsx | 5 +++ .../HotelPage/SidePeeks/Amenities/index.tsx | 43 +++++++++++++++++++ components/ContentType/HotelPage/data.ts | 4 ++ .../hotelPage/sidepeek/amenities.ts | 5 +++ .../components/hotelPage/sidepeek/amenity.ts | 3 ++ 5 files changed, 60 insertions(+) create mode 100644 components/ContentType/HotelPage/SidePeeks/Amenities/Amenity/index.tsx create mode 100644 components/ContentType/HotelPage/SidePeeks/Amenities/index.tsx create mode 100644 types/components/hotelPage/sidepeek/amenities.ts create mode 100644 types/components/hotelPage/sidepeek/amenity.ts diff --git a/components/ContentType/HotelPage/SidePeeks/Amenities/Amenity/index.tsx b/components/ContentType/HotelPage/SidePeeks/Amenities/Amenity/index.tsx new file mode 100644 index 000000000..01b83520d --- /dev/null +++ b/components/ContentType/HotelPage/SidePeeks/Amenities/Amenity/index.tsx @@ -0,0 +1,5 @@ +import type { AmenityProps } from "@/types/components/hotelPage/sidepeek/amenity" + +export default function Amenity({ title }: AmenityProps) { + return
{title}
+} diff --git a/components/ContentType/HotelPage/SidePeeks/Amenities/index.tsx b/components/ContentType/HotelPage/SidePeeks/Amenities/index.tsx new file mode 100644 index 000000000..3c34d7c79 --- /dev/null +++ b/components/ContentType/HotelPage/SidePeeks/Amenities/index.tsx @@ -0,0 +1,43 @@ +import { amenities } from "@/constants/routes/hotelPageParams" + +import Accordion from "@/components/TempDesignSystem/Accordion" +import AccordionItem from "@/components/TempDesignSystem/Accordion/AccordionItem" +import SidePeek from "@/components/TempDesignSystem/SidePeek" +import { getIntl } from "@/i18n" +import { getLang } from "@/i18n/serverContext" + +import { mapFacilityToIconName } from "../../data" +import Amenity from "./Amenity" + +import type { AmenitiesSidepeekProps } from "@/types/components/hotelPage/sidepeek/amenities" +import { IconName } from "@/types/components/icon" + +export default async function AmenitiesSidepeek({ + amenitiesList, +}: AmenitiesSidepeekProps) { + const lang = getLang() + const intl = await getIntl() + return ( + + <> + + {amenitiesList.map((amenity) => { + const iconName = mapFacilityToIconName(amenity.id) + return ( + + + + ) + })} + + + + ) +} diff --git a/components/ContentType/HotelPage/data.ts b/components/ContentType/HotelPage/data.ts index dd2a74f90..dd50ea6b5 100644 --- a/components/ContentType/HotelPage/data.ts +++ b/components/ContentType/HotelPage/data.ts @@ -287,3 +287,7 @@ export function mapFacilityToIcon(id: FacilityEnum): FC | null { const iconName = facilityToIconMap[id] return getIconByIconName(iconName) || null } + +export function mapFacilityToIconName(id: FacilityEnum): IconName { + return facilityToIconMap[id] +} diff --git a/types/components/hotelPage/sidepeek/amenities.ts b/types/components/hotelPage/sidepeek/amenities.ts new file mode 100644 index 000000000..c19cf4e83 --- /dev/null +++ b/types/components/hotelPage/sidepeek/amenities.ts @@ -0,0 +1,5 @@ +import type { Hotel } from "@/types/hotel" + +export type AmenitiesSidepeekProps = { + amenitiesList: Hotel["detailedFacilities"] +} diff --git a/types/components/hotelPage/sidepeek/amenity.ts b/types/components/hotelPage/sidepeek/amenity.ts new file mode 100644 index 000000000..2f4801d75 --- /dev/null +++ b/types/components/hotelPage/sidepeek/amenity.ts @@ -0,0 +1,3 @@ +export type AmenityProps = { + title: string +} From 30cd68509cf3fb22fc815c05d6af2ddd7dd7879f Mon Sep 17 00:00:00 2001 From: Fredrik Thorsson Date: Tue, 19 Nov 2024 14:04:47 +0100 Subject: [PATCH 12/52] feat(SW-914): add button --- .../Amenities/Amenity/amenity.module.css | 5 +++++ .../SidePeeks/Amenities/Amenity/index.tsx | 18 ++++++++++++++++-- .../HotelPage/SidePeeks/Amenities/index.tsx | 6 +++--- types/components/hotelPage/sidepeek/amenity.ts | 3 ++- 4 files changed, 26 insertions(+), 6 deletions(-) create mode 100644 components/ContentType/HotelPage/SidePeeks/Amenities/Amenity/amenity.module.css diff --git a/components/ContentType/HotelPage/SidePeeks/Amenities/Amenity/amenity.module.css b/components/ContentType/HotelPage/SidePeeks/Amenities/Amenity/amenity.module.css new file mode 100644 index 000000000..00ab8aebe --- /dev/null +++ b/components/ContentType/HotelPage/SidePeeks/Amenities/Amenity/amenity.module.css @@ -0,0 +1,5 @@ +.wrapper { + display: flex; + flex-direction: column; + gap: var(--Spacing-x3); +} diff --git a/components/ContentType/HotelPage/SidePeeks/Amenities/Amenity/index.tsx b/components/ContentType/HotelPage/SidePeeks/Amenities/Amenity/index.tsx index 01b83520d..1cd8ec584 100644 --- a/components/ContentType/HotelPage/SidePeeks/Amenities/Amenity/index.tsx +++ b/components/ContentType/HotelPage/SidePeeks/Amenities/Amenity/index.tsx @@ -1,5 +1,19 @@ +import Button from "@/components/TempDesignSystem/Button" +import Link from "@/components/TempDesignSystem/Link" + +import styles from "./amenity.module.css" + import type { AmenityProps } from "@/types/components/hotelPage/sidepeek/amenity" -export default function Amenity({ title }: AmenityProps) { - return
{title}
+export default function Amenity({ name, buttonUrl }: AmenityProps) { + return ( +
+
{name}
+ {buttonUrl && ( + + )} +
+ ) } diff --git a/components/ContentType/HotelPage/SidePeeks/Amenities/index.tsx b/components/ContentType/HotelPage/SidePeeks/Amenities/index.tsx index 3c34d7c79..0ea04b623 100644 --- a/components/ContentType/HotelPage/SidePeeks/Amenities/index.tsx +++ b/components/ContentType/HotelPage/SidePeeks/Amenities/index.tsx @@ -25,14 +25,14 @@ export default async function AmenitiesSidepeek({ <> {amenitiesList.map((amenity) => { - const iconName = mapFacilityToIconName(amenity.id) + const name = mapFacilityToIconName(amenity.id) return ( - + ) })} diff --git a/types/components/hotelPage/sidepeek/amenity.ts b/types/components/hotelPage/sidepeek/amenity.ts index 2f4801d75..9f4756701 100644 --- a/types/components/hotelPage/sidepeek/amenity.ts +++ b/types/components/hotelPage/sidepeek/amenity.ts @@ -1,3 +1,4 @@ export type AmenityProps = { - title: string + name: string + buttonUrl?: string } From 2b29a03d3c439f949d9a1472c2468a76e92afb4a Mon Sep 17 00:00:00 2001 From: Fredrik Thorsson Date: Tue, 19 Nov 2024 14:57:08 +0100 Subject: [PATCH 13/52] feat(SW-914): remove fragment --- .../HotelPage/SidePeeks/Amenities/index.tsx | 30 +++++++++---------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/components/ContentType/HotelPage/SidePeeks/Amenities/index.tsx b/components/ContentType/HotelPage/SidePeeks/Amenities/index.tsx index 0ea04b623..90fd6772c 100644 --- a/components/ContentType/HotelPage/SidePeeks/Amenities/index.tsx +++ b/components/ContentType/HotelPage/SidePeeks/Amenities/index.tsx @@ -22,22 +22,20 @@ export default async function AmenitiesSidepeek({ contentKey={amenities[lang]} title={intl.formatMessage({ id: "Amenities" })} > - <> - - {amenitiesList.map((amenity) => { - const name = mapFacilityToIconName(amenity.id) - return ( - - - - ) - })} - - + + {amenitiesList.map((amenity) => { + const name = mapFacilityToIconName(amenity.id) + return ( + + + + ) + })} + ) } From ae74f88e04a4fa5c7c28593210bfac423e6147d5 Mon Sep 17 00:00:00 2001 From: Fredrik Thorsson Date: Tue, 19 Nov 2024 15:00:56 +0100 Subject: [PATCH 14/52] feat(SW-914): add button color --- .../HotelPage/SidePeeks/Amenities/Amenity/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/ContentType/HotelPage/SidePeeks/Amenities/Amenity/index.tsx b/components/ContentType/HotelPage/SidePeeks/Amenities/Amenity/index.tsx index 1cd8ec584..27b9dbc59 100644 --- a/components/ContentType/HotelPage/SidePeeks/Amenities/Amenity/index.tsx +++ b/components/ContentType/HotelPage/SidePeeks/Amenities/Amenity/index.tsx @@ -11,7 +11,9 @@ export default function Amenity({ name, buttonUrl }: AmenityProps) {
{name}
{buttonUrl && ( )}
From 69e285d44995209097ec460314de7166224ec41f Mon Sep 17 00:00:00 2001 From: Fredrik Thorsson Date: Wed, 20 Nov 2024 13:58:48 +0100 Subject: [PATCH 15/52] feat(SW-914): remove placholder values --- .../ContentType/HotelPage/SidePeeks/Amenities/Amenity/index.tsx | 1 - components/ContentType/HotelPage/SidePeeks/Amenities/index.tsx | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/components/ContentType/HotelPage/SidePeeks/Amenities/Amenity/index.tsx b/components/ContentType/HotelPage/SidePeeks/Amenities/Amenity/index.tsx index 27b9dbc59..9e70e8060 100644 --- a/components/ContentType/HotelPage/SidePeeks/Amenities/Amenity/index.tsx +++ b/components/ContentType/HotelPage/SidePeeks/Amenities/Amenity/index.tsx @@ -8,7 +8,6 @@ import type { AmenityProps } from "@/types/components/hotelPage/sidepeek/amenity export default function Amenity({ name, buttonUrl }: AmenityProps) { return (
-
{name}
{buttonUrl && ( - )} -
+ <> + {filteredAmenities.map((amenity) => { + const Icon = mapFacilityToIcon(amenity.id) + return ( +
+
+ {Icon ? ( + + ) : ( + + )} + {amenity.name} +
+
+ ) + })} + ) } diff --git a/components/ContentType/HotelPage/SidePeeks/Amenities/amenities.module.css b/components/ContentType/HotelPage/SidePeeks/Amenities/amenities.module.css deleted file mode 100644 index b6d3ba651..000000000 --- a/components/ContentType/HotelPage/SidePeeks/Amenities/amenities.module.css +++ /dev/null @@ -1,10 +0,0 @@ -.wrapper { - padding: var(--Spacing-x1); - border-bottom: 1px solid var(--Base-Border-Subtle); -} - -.amenity { - display: flex; - gap: var(--Spacing-x1); - padding: var(--Spacing-x-one-and-half) var(--Spacing-x2); -} diff --git a/components/ContentType/HotelPage/SidePeeks/Amenities/index.tsx b/components/ContentType/HotelPage/SidePeeks/Amenities/index.tsx index 2dbbaf80c..d913a643e 100644 --- a/components/ContentType/HotelPage/SidePeeks/Amenities/index.tsx +++ b/components/ContentType/HotelPage/SidePeeks/Amenities/index.tsx @@ -1,14 +1,10 @@ import { amenities } from "@/constants/routes/hotelPageParams" -import { HeartIcon } from "@/components/Icons" import Accordion from "@/components/TempDesignSystem/Accordion" -import AccordionItem from "@/components/TempDesignSystem/Accordion/AccordionItem" import SidePeek from "@/components/TempDesignSystem/SidePeek" -import Body from "@/components/TempDesignSystem/Text/Body" import { getIntl } from "@/i18n" import { getLang } from "@/i18n/serverContext" -import { mapFacilityToIcon } from "../../data" import { AccessibilityAmenity, BreakfastAmenity, @@ -16,11 +12,9 @@ import { MeetingsAmenity, ParkingAmenity, } from "./AccordionAmenities" - -import styles from "./amenities.module.css" +import Amenity from "./Amenity" import type { AmenitiesSidePeekProps } from "@/types/components/hotelPage/sidepeek/amenities" -import { IconName } from "@/types/components/icon" export default async function AmenitiesSidePeek({ amenitiesList, @@ -28,7 +22,7 @@ export default async function AmenitiesSidePeek({ const lang = getLang() const intl = await getIntl() - const filterdList = amenitiesList + const filteredAmenities = amenitiesList .filter((filter) => !filter.name.startsWith("Parking")) .filter((filter) => !filter.name.startsWith("Meeting")) .filter((filter) => filter.name !== "Late check-out until 14:00 guaranteed") @@ -39,51 +33,12 @@ export default async function AmenitiesSidePeek({ title={intl.formatMessage({ id: "Amenities" })} > - - - - - - - - - - - - - - - - {filterdList.map((amenity) => { - const Icon = mapFacilityToIcon(amenity.id) - return ( -
-
- {Icon ? ( - - ) : ( - - )} - {amenity.name} -
-
- ) - })} + + + + + +
) diff --git a/types/components/hotelPage/sidepeek/amenity.ts b/types/components/hotelPage/sidepeek/amenity.ts index 9f4756701..35e3f2910 100644 --- a/types/components/hotelPage/sidepeek/amenity.ts +++ b/types/components/hotelPage/sidepeek/amenity.ts @@ -1,4 +1,5 @@ +import type { Hotel } from "@/types/hotel" + export type AmenityProps = { - name: string - buttonUrl?: string + filteredAmenities: Hotel["detailedFacilities"] } From 65aa5f37ae710c2fee647236a83a1b81d6679090 Mon Sep 17 00:00:00 2001 From: Fredrik Thorsson Date: Tue, 26 Nov 2024 16:13:10 +0100 Subject: [PATCH 20/52] feat(SW-914): add parking --- .../AccordionAmenities/Meetings/index.tsx | 16 --- .../Meetings/meetings.module.css | 0 .../AccordionAmenities/Parking/index.tsx | 111 +++++++++++++++++- .../Parking/parking.module.css | 18 +++ .../Amenities/AccordionAmenities/index.ts | 1 - .../SidePeeks/Amenities/Amenity/index.tsx | 2 +- .../HotelPage/SidePeeks/Amenities/index.tsx | 16 +-- i18n/dictionaries/da.json | 3 + i18n/dictionaries/de.json | 3 + i18n/dictionaries/en.json | 3 + i18n/dictionaries/fi.json | 3 + i18n/dictionaries/no.json | 3 + i18n/dictionaries/sv.json | 3 + .../hotelPage/sidepeek/amenities.ts | 3 +- .../components/hotelPage/sidepeek/amenity.ts | 2 +- .../components/hotelPage/sidepeek/parking.ts | 5 + 16 files changed, 163 insertions(+), 29 deletions(-) delete mode 100644 components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Meetings/index.tsx delete mode 100644 components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Meetings/meetings.module.css create mode 100644 types/components/hotelPage/sidepeek/parking.ts diff --git a/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Meetings/index.tsx b/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Meetings/index.tsx deleted file mode 100644 index 481391625..000000000 --- a/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Meetings/index.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import AccordionItem from "@/components/TempDesignSystem/Accordion/AccordionItem" -import { getIntl } from "@/i18n" - -import { IconName } from "@/types/components/icon" - -export default async function MeetingsAmenity() { - const intl = await getIntl() - return ( - - Meeting and Conferences - - ) -} diff --git a/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Meetings/meetings.module.css b/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Meetings/meetings.module.css deleted file mode 100644 index e69de29bb..000000000 diff --git a/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/index.tsx b/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/index.tsx index 422c6c422..a691c0557 100644 --- a/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/index.tsx +++ b/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/index.tsx @@ -1,16 +1,123 @@ import AccordionItem from "@/components/TempDesignSystem/Accordion/AccordionItem" +import Body from "@/components/TempDesignSystem/Text/Body" import { getIntl } from "@/i18n" +import styles from "./parking.module.css" + +import { ParkingProps } from "@/types/components/hotelPage/sidepeek/parking" import { IconName } from "@/types/components/icon" -export default async function ParkingAmenity() { +export default async function ParkingAmenity({ parking }: ParkingProps) { const intl = await getIntl() + const hour = intl.formatMessage({ id: "per hour during" }) + const day = intl.formatMessage({ id: "per day during" }) + const night = intl.formatMessage({ id: "per night during" }) + const allDay = intl.formatMessage({ id: "per whole day" }) + + function translatePeriods(period: string) { + switch (period) { + case "Hour": + return hour + case "Day": + return day + case "Night": + return night + case "AllDay": + return allDay + } + } + + const test = parking.map((data) => data.pricing.localCurrency.range) + console.log("dfafda", test) + return ( - Parking +
+ {parking.map((data) => ( + <> +
+ {`${data.type} (${data.name})`} + +
    + {data.numberOfChargingSpaces && ( +
  • {`Number of charging points for electric cars: ${data.numberOfChargingSpaces}`}
  • + )} + {data.canMakeReservation && ( +
  • {`${intl.formatMessage({ id: "Parking can be reserved in advance" })}: ${data.canMakeReservation ? intl.formatMessage({ id: "Yes" }) : intl.formatMessage({ id: "No" })}`}
  • + )} + {data.numberOfParkingSpots && ( +
  • {`${intl.formatMessage({ id: "Number of parking spots" })}: ${data.numberOfParkingSpots}`}
  • + )} + {data.distanceToHotel && ( +
  • {`${intl.formatMessage({ id: "Distance to hotel" })}: ${data.distanceToHotel}`}
  • + )} + {data.address && ( +
  • {`${intl.formatMessage({ id: "Address" })}: ${data.address}`}
  • + )} +
+ +
+
+ + {intl.formatMessage({ id: "Prices" })} + +
+
+ {data.pricing.localCurrency.ordinary && ( + <> + + {intl.formatMessage({ id: "Weekday" })} + + {data.pricing.localCurrency.ordinary.map((ordinary) => { + return ( + ordinary.amount && + ordinary.period && + ordinary.startTime && + ordinary.endTime && ( + + {`${ordinary.amount} ${translatePeriods(ordinary.period)} ${ordinary.startTime}-${ordinary.endTime}`} + + ) + ) + })} + + )} +
+
+ {data.pricing.localCurrency.weekend && ( + <> + + {intl.formatMessage({ id: "Weekday" })} + + {data.pricing.localCurrency.weekend.map((weekend) => { + return ( + weekend.amount && + weekend.period && + weekend.startTime && + weekend.endTime && ( + + {`${weekend.amount} ${translatePeriods(weekend.period)} ${weekend.startTime}-${weekend.endTime}`} + + ) + ) + })} + + )} +
+
+
+ + ))} +
) } diff --git a/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/parking.module.css b/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/parking.module.css index e69de29bb..0a19979cd 100644 --- a/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/parking.module.css +++ b/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/parking.module.css @@ -0,0 +1,18 @@ +.wrapper { + display: flex; + flex-direction: column; + gap: var(--Spacing-x3); + overflow: hidden; +} + +.information { + display: flex; + flex-direction: column; + gap: var(--Spacing-x-one-and-half); +} + +.prices { + display: flex; + flex-direction: column; + gap: var(--Spacing-x1); +} diff --git a/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/index.ts b/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/index.ts index 65e50750e..c667cea87 100644 --- a/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/index.ts +++ b/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/index.ts @@ -1,5 +1,4 @@ export { default as AccessibilityAmenity } from "./Accessibility" export { default as BreakfastAmenity } from "./Breakfast" export { default as CheckInCheckOutAmenity } from "./CheckInCheckOut" -export { default as MeetingsAmenity } from "./Meetings" export { default as ParkingAmenity } from "./Parking" diff --git a/components/ContentType/HotelPage/SidePeeks/Amenities/Amenity/index.tsx b/components/ContentType/HotelPage/SidePeeks/Amenities/Amenity/index.tsx index e224156fe..f4a30872b 100644 --- a/components/ContentType/HotelPage/SidePeeks/Amenities/Amenity/index.tsx +++ b/components/ContentType/HotelPage/SidePeeks/Amenities/Amenity/index.tsx @@ -10,7 +10,7 @@ import type { AmenityProps } from "@/types/components/hotelPage/sidepeek/amenity export default function Amenity({ filteredAmenities }: AmenityProps) { return ( <> - {filteredAmenities.map((amenity) => { + {filteredAmenities?.map((amenity) => { const Icon = mapFacilityToIcon(amenity.id) return (
diff --git a/components/ContentType/HotelPage/SidePeeks/Amenities/index.tsx b/components/ContentType/HotelPage/SidePeeks/Amenities/index.tsx index d913a643e..5eff2b3d9 100644 --- a/components/ContentType/HotelPage/SidePeeks/Amenities/index.tsx +++ b/components/ContentType/HotelPage/SidePeeks/Amenities/index.tsx @@ -9,7 +9,6 @@ import { AccessibilityAmenity, BreakfastAmenity, CheckInCheckOutAmenity, - MeetingsAmenity, ParkingAmenity, } from "./AccordionAmenities" import Amenity from "./Amenity" @@ -18,14 +17,18 @@ import type { AmenitiesSidePeekProps } from "@/types/components/hotelPage/sidepe export default async function AmenitiesSidePeek({ amenitiesList, + parking, }: AmenitiesSidePeekProps) { const lang = getLang() const intl = await getIntl() - const filteredAmenities = amenitiesList - .filter((filter) => !filter.name.startsWith("Parking")) - .filter((filter) => !filter.name.startsWith("Meeting")) - .filter((filter) => filter.name !== "Late check-out until 14:00 guaranteed") + const filteredAmenities = amenitiesList?.filter((filter) => { + return ( + !filter.name.startsWith("Parking") && + filter.name !== "Meeting / conference facilities" && + filter.name !== "Late check-out until 14:00 guaranteed" + ) + }) return ( - + {parking?.length ? : null} - diff --git a/i18n/dictionaries/da.json b/i18n/dictionaries/da.json index 9bfc58fad..c408431c7 100644 --- a/i18n/dictionaries/da.json +++ b/i18n/dictionaries/da.json @@ -283,6 +283,7 @@ "Previous victories": "Tidligere sejre", "Price": "Pris", "Price details": "Prisoplysninger", + "Prices": "Priser", "Proceed to login": "Fortsæt til login", "Proceed to payment method": "Fortsæt til betalingsmetode", "Provide a payment card in the next step": "Giv os dine betalingsoplysninger i næste skridt", @@ -394,7 +395,9 @@ "We have a special gift waiting for you!": "Vi har en speciel gave, der venter på dig!", "We have sent a detailed confirmation of your booking to your email:": "Vi har sendt en detaljeret bekræftelse af din booking til din email:", "We look forward to your visit!": "Vi ser frem til dit besøg!", + "Weekday": "Ugedag", "Weekdays": "Hverdage", + "Weekend": "Weekend", "Weekends": "Weekender", "Welcome": "Velkommen", "Welcome to": "Velkommen til", diff --git a/i18n/dictionaries/de.json b/i18n/dictionaries/de.json index 69c8c8956..31ba16be9 100644 --- a/i18n/dictionaries/de.json +++ b/i18n/dictionaries/de.json @@ -282,6 +282,7 @@ "Previous victories": "Bisherige Siege", "Price": "Preis", "Price details": "Preisdetails", + "Prices": "Preise", "Proceed to login": "Weiter zum Login", "Proceed to payment method": "Weiter zur Zahlungsmethode", "Provide a payment card in the next step": "Geben Sie Ihre Zahlungskarteninformationen im nächsten Schritt an", @@ -393,7 +394,9 @@ "We have a special gift waiting for you!": "Wir haben ein besonderes Geschenk für Sie!", "We have sent a detailed confirmation of your booking to your email:": "Wir haben eine detaillierte Bestätigung Ihrer Buchung an Ihre E-Mail gesendet:", "We look forward to your visit!": "Wir freuen uns auf Ihren Besuch!", + "Weekday": "Wochentag", "Weekdays": "Wochentage", + "Weekend": "Wochenende", "Weekends": "Wochenenden", "Welcome": "Willkommen", "Welcome to": "Willkommen zu", diff --git a/i18n/dictionaries/en.json b/i18n/dictionaries/en.json index 2bc086e28..fc094e112 100644 --- a/i18n/dictionaries/en.json +++ b/i18n/dictionaries/en.json @@ -306,6 +306,7 @@ "Price details": "Price details", "Price excl VAT": "Price excl VAT", "Price incl VAT": "Price incl VAT", + "Prices": "Prices", "Print confirmation": "Print confirmation", "Proceed to login": "Proceed to login", "Proceed to payment method": "Proceed to payment method", @@ -425,7 +426,9 @@ "We have a special gift waiting for you!": "We have a special gift waiting for you!", "We have sent a detailed confirmation of your booking to your email:": "We have sent a detailed confirmation of your booking to your email: ", "We look forward to your visit!": "We look forward to your visit!", + "Weekday": "Weekday", "Weekdays": "Weekdays", + "Weekend": "Weekend", "Weekends": "Weekends", "Welcome": "Welcome", "Welcome to": "Welcome to", diff --git a/i18n/dictionaries/fi.json b/i18n/dictionaries/fi.json index 0f536a5ff..56311ed01 100644 --- a/i18n/dictionaries/fi.json +++ b/i18n/dictionaries/fi.json @@ -283,6 +283,7 @@ "Previous victories": "Edelliset voitot", "Price": "Hinta", "Price details": "Hintatiedot", + "Prices": "Hinnat", "Proceed to login": "Jatka kirjautumiseen", "Proceed to payment method": "Siirry maksutavalle", "Provide a payment card in the next step": "Anna maksukortin tiedot seuraavassa vaiheessa", @@ -394,7 +395,9 @@ "We have a special gift waiting for you!": "Meillä on erityinen lahja odottamassa sinua!", "We have sent a detailed confirmation of your booking to your email:": "Olemme lähettäneet yksityiskohtaisen varausvahvistuksen sähköpostiisi:", "We look forward to your visit!": "Odotamme innolla vierailuasi!", + "Weekday": "Arkipäivä", "Weekdays": "Arkisin", + "Weekend": "Viikonloppu", "Weekends": "Viikonloppuisin", "Welcome": "Tervetuloa", "Welcome to": "Tervetuloa", diff --git a/i18n/dictionaries/no.json b/i18n/dictionaries/no.json index 443b83bab..3d75bfad4 100644 --- a/i18n/dictionaries/no.json +++ b/i18n/dictionaries/no.json @@ -281,6 +281,7 @@ "Previous victories": "Tidligere seire", "Price": "Pris", "Price details": "Prisdetaljer", + "Prices": "Priser", "Proceed to login": "Fortsett til innlogging", "Proceed to payment method": "Fortsett til betalingsmetode", "Provide a payment card in the next step": "Gi oss dine betalingskortdetaljer i neste steg", @@ -391,7 +392,9 @@ "We have a special gift waiting for you!": "Vi har en spesiell gave som venter på deg!", "We have sent a detailed confirmation of your booking to your email:": "Vi har sendt en detaljert bekreftelse av din bestilling til din e-post:", "We look forward to your visit!": "Vi ser frem til ditt besøk!", + "Weekday": "Ukedag", "Weekdays": "Hverdager", + "Weekend": "Helg", "Weekends": "Helger", "Welcome": "Velkommen", "Welcome to": "Velkommen til", diff --git a/i18n/dictionaries/sv.json b/i18n/dictionaries/sv.json index 94c6bd602..6543bcd95 100644 --- a/i18n/dictionaries/sv.json +++ b/i18n/dictionaries/sv.json @@ -281,6 +281,7 @@ "Previous victories": "Tidigare segrar", "Price": "Pris", "Price details": "Prisdetaljer", + "Prices": "Priser", "Proceed to login": "Fortsätt till inloggning", "Proceed to payment method": "Gå vidare till betalningsmetod", "Provide a payment card in the next step": "Ge oss dina betalkortdetaljer i nästa steg", @@ -391,7 +392,9 @@ "We have a special gift waiting for you!": "Vi har en speciell present som väntar på dig!", "We have sent a detailed confirmation of your booking to your email:": "Vi har skickat en detaljerad bekräftelse av din bokning till din e-post:", "We look forward to your visit!": "Vi ser fram emot ditt besök!", + "Weekday": "Vardag", "Weekdays": "Vardagar", + "Weekend": "Helg", "Weekends": "Helger", "Welcome": "Välkommen", "Welcome to": "Välkommen till", diff --git a/types/components/hotelPage/sidepeek/amenities.ts b/types/components/hotelPage/sidepeek/amenities.ts index 3a7f5b2c9..786876d0b 100644 --- a/types/components/hotelPage/sidepeek/amenities.ts +++ b/types/components/hotelPage/sidepeek/amenities.ts @@ -1,5 +1,6 @@ import type { Hotel } from "@/types/hotel" export type AmenitiesSidePeekProps = { - amenitiesList: Hotel["detailedFacilities"] + amenitiesList?: Hotel["detailedFacilities"] + parking?: Hotel["parking"] } diff --git a/types/components/hotelPage/sidepeek/amenity.ts b/types/components/hotelPage/sidepeek/amenity.ts index 35e3f2910..fb1d9588b 100644 --- a/types/components/hotelPage/sidepeek/amenity.ts +++ b/types/components/hotelPage/sidepeek/amenity.ts @@ -1,5 +1,5 @@ import type { Hotel } from "@/types/hotel" export type AmenityProps = { - filteredAmenities: Hotel["detailedFacilities"] + filteredAmenities?: Hotel["detailedFacilities"] } diff --git a/types/components/hotelPage/sidepeek/parking.ts b/types/components/hotelPage/sidepeek/parking.ts new file mode 100644 index 000000000..4afdf42ad --- /dev/null +++ b/types/components/hotelPage/sidepeek/parking.ts @@ -0,0 +1,5 @@ +import type { Hotel } from "@/types/hotel" + +export type ParkingProps = { + parking: Hotel["parking"] +} From 29e56d35eb11d26cafd37c70a89ab07bfb0fcbf4 Mon Sep 17 00:00:00 2001 From: Fredrik Thorsson Date: Tue, 26 Nov 2024 17:31:47 +0100 Subject: [PATCH 21/52] feat(SW-914): add checkin information --- .../AccordionAmenities/CheckIn/index.tsx | 23 +++++++++++++++++++ .../checkInCheckOut.module.css | 0 .../CheckInCheckOut/index.tsx | 16 ------------- .../AccordionAmenities/Parking/index.tsx | 7 ++---- .../Amenities/AccordionAmenities/index.ts | 2 +- .../HotelPage/SidePeeks/Amenities/index.tsx | 9 ++++---- .../WellnessAndExercise/Facility/index.tsx | 2 +- components/ContentType/HotelPage/index.tsx | 1 + i18n/dictionaries/da.json | 3 +++ i18n/dictionaries/de.json | 3 +++ i18n/dictionaries/en.json | 3 +++ i18n/dictionaries/fi.json | 3 +++ i18n/dictionaries/no.json | 3 +++ i18n/dictionaries/sv.json | 3 +++ .../hotelPage/sidepeek/amenities.ts | 5 ++-- .../components/hotelPage/sidepeek/checkIn.ts | 5 ++++ .../components/hotelPage/sidepeek/parking.ts | 2 +- 17 files changed, 60 insertions(+), 30 deletions(-) create mode 100644 components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/CheckIn/index.tsx delete mode 100644 components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/CheckInCheckOut/checkInCheckOut.module.css delete mode 100644 components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/CheckInCheckOut/index.tsx create mode 100644 types/components/hotelPage/sidepeek/checkIn.ts diff --git a/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/CheckIn/index.tsx b/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/CheckIn/index.tsx new file mode 100644 index 000000000..21cc2b964 --- /dev/null +++ b/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/CheckIn/index.tsx @@ -0,0 +1,23 @@ +import AccordionItem from "@/components/TempDesignSystem/Accordion/AccordionItem" +import Body from "@/components/TempDesignSystem/Text/Body" +import { getIntl } from "@/i18n" + +import type { CheckInAmenityProps } from "@/types/components/hotelPage/sidepeek/checkIn" +import { IconName } from "@/types/components/icon" + +export default async function CheckInAmenity({ + checkInInformation, +}: CheckInAmenityProps) { + const intl = await getIntl() + const { checkInTime, checkOutTime } = checkInInformation + return ( + + {intl.formatMessage({ id: "Times" })} + {`${intl.formatMessage({ id: "Check in from" })}: ${checkInTime}`} + {`${intl.formatMessage({ id: "Check out at latest" })}: ${checkOutTime}`} + + ) +} diff --git a/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/CheckInCheckOut/checkInCheckOut.module.css b/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/CheckInCheckOut/checkInCheckOut.module.css deleted file mode 100644 index e69de29bb..000000000 diff --git a/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/CheckInCheckOut/index.tsx b/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/CheckInCheckOut/index.tsx deleted file mode 100644 index f17494669..000000000 --- a/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/CheckInCheckOut/index.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import AccordionItem from "@/components/TempDesignSystem/Accordion/AccordionItem" -import { getIntl } from "@/i18n" - -import { IconName } from "@/types/components/icon" - -export default async function CheckInCheckOutAmenity() { - const intl = await getIntl() - return ( - - Check in / check out information - - ) -} diff --git a/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/index.tsx b/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/index.tsx index a691c0557..a6373379b 100644 --- a/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/index.tsx +++ b/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/index.tsx @@ -4,10 +4,10 @@ import { getIntl } from "@/i18n" import styles from "./parking.module.css" -import { ParkingProps } from "@/types/components/hotelPage/sidepeek/parking" +import { ParkingAmenityProps } from "@/types/components/hotelPage/sidepeek/parking" import { IconName } from "@/types/components/icon" -export default async function ParkingAmenity({ parking }: ParkingProps) { +export default async function ParkingAmenity({ parking }: ParkingAmenityProps) { const intl = await getIntl() const hour = intl.formatMessage({ id: "per hour during" }) const day = intl.formatMessage({ id: "per day during" }) @@ -27,9 +27,6 @@ export default async function ParkingAmenity({ parking }: ParkingProps) { } } - const test = parking.map((data) => data.pricing.localCurrency.range) - console.log("dfafda", test) - return ( { + const filteredAmenities = amenitiesList.filter((filter) => { return ( !filter.name.startsWith("Parking") && filter.name !== "Meeting / conference facilities" && @@ -36,9 +37,9 @@ export default async function AmenitiesSidePeek({ title={intl.formatMessage({ id: "Amenities" })} > - {parking?.length ? : null} + {parking.length ? : null} - + diff --git a/components/ContentType/HotelPage/SidePeeks/WellnessAndExercise/Facility/index.tsx b/components/ContentType/HotelPage/SidePeeks/WellnessAndExercise/Facility/index.tsx index 3313a109b..3357765ad 100644 --- a/components/ContentType/HotelPage/SidePeeks/WellnessAndExercise/Facility/index.tsx +++ b/components/ContentType/HotelPage/SidePeeks/WellnessAndExercise/Facility/index.tsx @@ -31,7 +31,7 @@ export default async function Facility({ data }: FacilityProps) {
- {intl.formatMessage({ id: " Opening Hours" })} + {intl.formatMessage({ id: "Opening Hours" })}
diff --git a/components/ContentType/HotelPage/index.tsx b/components/ContentType/HotelPage/index.tsx index 15b3db9d5..f52c0f73e 100644 --- a/components/ContentType/HotelPage/index.tsx +++ b/components/ContentType/HotelPage/index.tsx @@ -79,6 +79,7 @@ export default async function HotelPage({ hotelId }: HotelPageProps) { hotelFacts, location, ratings, + parking, } = hotelData.data.attributes const roomCategories = hotelData.included?.filter((item) => item.type === "roomcategories") || [] diff --git a/i18n/dictionaries/da.json b/i18n/dictionaries/da.json index c408431c7..616dea73e 100644 --- a/i18n/dictionaries/da.json +++ b/i18n/dictionaries/da.json @@ -59,7 +59,9 @@ "Cancel": "Afbestille", "Change room": "Skift værelse", "Check in": "Check ind", + "Check in from": "Indtjekning fra", "Check out": "Check ud", + "Check out at latest": "Udtjekning senest", "Check out the credit cards saved to your profile. Pay with a saved card when signed in for a smoother web experience.": "Tjek de kreditkort, der er gemt på din profil. Betal med et gemt kort, når du er logget ind for en mere jævn weboplevelse.", "Children": "børn", "Choose room": "Vælg rum", @@ -369,6 +371,7 @@ "There are no transactions to display": "Der er ingen transaktioner at vise", "Things nearby HOTEL_NAME": "Ting i nærheden af {hotelName}", "This room is not available": "Dette værelse er ikke tilgængeligt", + "Times": "Tider", "To get the member price {amount} {currency}, log in or join when completing the booking.": "For at få medlemsprisen {amount} {currency}, log ind eller tilmeld dig, når du udfylder bookingen.", "To secure your reservation, we kindly ask you to provide your payment card details. Rest assured, no charges will be made at this time.": "For at sikre din reservation, beder vi om at du giver os dine betalingsoplysninger. Du kan så være sikker på, at ingen gebyrer vil blive opkrævet på dette tidspunkt.", "Total": "Total", diff --git a/i18n/dictionaries/de.json b/i18n/dictionaries/de.json index 31ba16be9..16ab385bf 100644 --- a/i18n/dictionaries/de.json +++ b/i18n/dictionaries/de.json @@ -59,7 +59,9 @@ "Cancel": "Stornieren", "Change room": "Zimmer ändern", "Check in": "Einchecken", + "Check in from": "Check-in ab", "Check out": "Auschecken", + "Check out at latest": "Check-out spätestens", "Check out the credit cards saved to your profile. Pay with a saved card when signed in for a smoother web experience.": "Sehen Sie sich die in Ihrem Profil gespeicherten Kreditkarten an. Bezahlen Sie mit einer gespeicherten Karte, wenn Sie angemeldet sind, für ein reibungsloseres Web-Erlebnis.", "Children": "Kinder", "Choose room": "Zimmer wählen", @@ -368,6 +370,7 @@ "There are no transactions to display": "Es sind keine Transaktionen zum Anzeigen vorhanden", "Things nearby HOTEL_NAME": "Dinge in der Nähe von {hotelName}", "This room is not available": "Dieses Zimmer ist nicht verfügbar", + "Times": "Zeiten", "To get the member price {amount} {currency}, log in or join when completing the booking.": "Um den Mitgliederpreis von {amount} {currency} zu erhalten, loggen Sie sich ein oder treten Sie Scandic Friends bei, wenn Sie die Buchung abschließen.", "To secure your reservation, we kindly ask you to provide your payment card details. Rest assured, no charges will be made at this time.": "Um Ihre Reservierung zu sichern, bitten wir Sie, Ihre Zahlungskarteninformationen zu geben. Sie können sicher sein, dass keine Gebühren zu diesem Zeitpunkt erhoben werden.", "Total": "Gesamt", diff --git a/i18n/dictionaries/en.json b/i18n/dictionaries/en.json index fc094e112..7ce44fd6c 100644 --- a/i18n/dictionaries/en.json +++ b/i18n/dictionaries/en.json @@ -64,7 +64,9 @@ "Cancellation policy": "Cancellation policy", "Change room": "Change room", "Check in": "Check in", + "Check in from": "Check in from", "Check out": "Check out", + "Check out at latest": "Check out at latest", "Check out the credit cards saved to your profile. Pay with a saved card when signed in for a smoother web experience.": "Check out the credit cards saved to your profile. Pay with a saved card when signed in for a smoother web experience.", "Check-in": "Check-in", "Check-out": "Check-out", @@ -397,6 +399,7 @@ "There are no transactions to display": "There are no transactions to display", "Things nearby HOTEL_NAME": "Things nearby {hotelName}", "This room is not available": "This room is not available", + "Times": "Times", "To get the member price {amount} {currency}, log in or join when completing the booking.": "To get the member price {amount} {currency}, log in or join when completing the booking.", "To secure your reservation, we kindly ask you to provide your payment card details. Rest assured, no charges will be made at this time.": "To secure your reservation, we kindly ask you to provide your payment card details. Rest assured, no charges will be made at this time.", "Total": "Total", diff --git a/i18n/dictionaries/fi.json b/i18n/dictionaries/fi.json index 56311ed01..e9ea77e06 100644 --- a/i18n/dictionaries/fi.json +++ b/i18n/dictionaries/fi.json @@ -59,7 +59,9 @@ "Cancel": "Peruuttaa", "Change room": "Vaihda huonetta", "Check in": "Sisäänkirjautuminen", + "Check in from": "Sisäänkirjautuminen alkaen", "Check out": "Uloskirjautuminen", + "Check out at latest": "Uloskirjautuminen viimeistään", "Check out the credit cards saved to your profile. Pay with a saved card when signed in for a smoother web experience.": "Tarkista profiiliisi tallennetut luottokortit. Maksa tallennetulla kortilla kirjautuneena, jotta verkkokokemus on sujuvampi.", "Children": "Lasta", "Choose room": "Valitse huone", @@ -369,6 +371,7 @@ "There are no transactions to display": "Näytettäviä tapahtumia ei ole", "Things nearby HOTEL_NAME": "Lähellä olevia asioita {hotelName}", "This room is not available": "Tämä huone ei ole käytettävissä", + "Times": "Ajat", "To get the member price {amount} {currency}, log in or join when completing the booking.": "Jäsenhintaan saavat sisäänkirjautuneet tai liittyneet jäsenet.", "To secure your reservation, we kindly ask you to provide your payment card details. Rest assured, no charges will be made at this time.": "Varmistaaksesi varauksen, pyydämme sinua antamaan meille maksukortin tiedot. Varmista, että ei veloiteta maksusi tällä hetkellä.", "Total": "Kokonais", diff --git a/i18n/dictionaries/no.json b/i18n/dictionaries/no.json index 3d75bfad4..cb34d0af2 100644 --- a/i18n/dictionaries/no.json +++ b/i18n/dictionaries/no.json @@ -59,7 +59,9 @@ "Cancel": "Avbryt", "Change room": "Endre rom", "Check in": "Sjekk inn", + "Check in from": "Innsjekking fra", "Check out": "Sjekk ut", + "Check out at latest": "Utsjekking senest", "Check out the credit cards saved to your profile. Pay with a saved card when signed in for a smoother web experience.": "Sjekk ut kredittkortene som er lagret på profilen din. Betal med et lagret kort når du er pålogget for en jevnere nettopplevelse.", "Children": "Barn", "Choose room": "Velg rom", @@ -366,6 +368,7 @@ "There are no transactions to display": "Det er ingen transaksjoner å vise", "Things nearby HOTEL_NAME": "Ting i nærheten av {hotelName}", "This room is not available": "Dette rommet er ikke tilgjengelig", + "Times": "Tider", "To get the member price {amount} {currency}, log in or join when completing the booking.": "For å få medlemsprisen {amount} {currency}, logg inn eller bli med når du fullfører bestillingen.", "To secure your reservation, we kindly ask you to provide your payment card details. Rest assured, no charges will be made at this time.": "For å sikre din reservasjon, ber vi om at du gir oss dine betalingskortdetaljer. Vær sikker på at ingen gebyrer vil bli belastet på dette tidspunktet.", "Total": "Total", diff --git a/i18n/dictionaries/sv.json b/i18n/dictionaries/sv.json index 6543bcd95..72ac13c99 100644 --- a/i18n/dictionaries/sv.json +++ b/i18n/dictionaries/sv.json @@ -59,7 +59,9 @@ "Cancel": "Avbryt", "Change room": "Ändra rum", "Check in": "Checka in", + "Check in from": "Incheckning från", "Check out": "Checka ut", + "Check out at latest": "Utcheckning senast", "Check out the credit cards saved to your profile. Pay with a saved card when signed in for a smoother web experience.": "Kolla in kreditkorten som sparats i din profil. Betala med ett sparat kort när du är inloggad för en smidigare webbupplevelse.", "Children": "Barn", "Choose room": "Välj rum", @@ -366,6 +368,7 @@ "There are no transactions to display": "Det finns inga transaktioner att visa", "Things nearby HOTEL_NAME": "Saker i närheten av {hotelName}", "This room is not available": "Detta rum är inte tillgängligt", + "Times": "Tider", "To get the member price {amount} {currency}, log in or join when completing the booking.": "För att få medlemsprisen {amount} {currency}, logga in eller bli medlem när du slutför bokningen.", "To secure your reservation, we kindly ask you to provide your payment card details. Rest assured, no charges will be made at this time.": "För att säkra din bokning ber vi om att du ger oss dina betalkortdetaljer. Välj säker på att ingen avgifter kommer att debiteras just nu.", "Total": "Totalt", diff --git a/types/components/hotelPage/sidepeek/amenities.ts b/types/components/hotelPage/sidepeek/amenities.ts index 786876d0b..b2671226f 100644 --- a/types/components/hotelPage/sidepeek/amenities.ts +++ b/types/components/hotelPage/sidepeek/amenities.ts @@ -1,6 +1,7 @@ import type { Hotel } from "@/types/hotel" export type AmenitiesSidePeekProps = { - amenitiesList?: Hotel["detailedFacilities"] - parking?: Hotel["parking"] + amenitiesList: Hotel["detailedFacilities"] + parking: Hotel["parking"] + checkInInformation: Hotel["hotelFacts"]["checkin"] } diff --git a/types/components/hotelPage/sidepeek/checkIn.ts b/types/components/hotelPage/sidepeek/checkIn.ts new file mode 100644 index 000000000..e3a8d929b --- /dev/null +++ b/types/components/hotelPage/sidepeek/checkIn.ts @@ -0,0 +1,5 @@ +import type { Hotel } from "@/types/hotel" + +export type CheckInAmenityProps = { + checkInInformation: Hotel["hotelFacts"]["checkin"] +} diff --git a/types/components/hotelPage/sidepeek/parking.ts b/types/components/hotelPage/sidepeek/parking.ts index 4afdf42ad..d191b4129 100644 --- a/types/components/hotelPage/sidepeek/parking.ts +++ b/types/components/hotelPage/sidepeek/parking.ts @@ -1,5 +1,5 @@ import type { Hotel } from "@/types/hotel" -export type ParkingProps = { +export type ParkingAmenityProps = { parking: Hotel["parking"] } From 9b208d01ea659e52aeda4c87a7dded70ef31744f Mon Sep 17 00:00:00 2001 From: Fredrik Thorsson Date: Wed, 27 Nov 2024 09:23:52 +0100 Subject: [PATCH 22/52] feat(SW-914): add parking prices component --- .../Parking/ParkingPrices/index.tsx | 31 ++++++ .../AccordionAmenities/Parking/index.tsx | 97 ++++--------------- .../components/hotelPage/sidepeek/parking.ts | 12 +++ 3 files changed, 64 insertions(+), 76 deletions(-) create mode 100644 components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/ParkingPrices/index.tsx diff --git a/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/ParkingPrices/index.tsx b/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/ParkingPrices/index.tsx new file mode 100644 index 000000000..465d33558 --- /dev/null +++ b/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/ParkingPrices/index.tsx @@ -0,0 +1,31 @@ +import { getIntl } from "@/i18n" + +import { ParkingPricesProps } from "@/types/components/hotelPage/sidepeek/parking" + +export default async function ParkingPrices({ data }: ParkingPricesProps) { + const intl = await getIntl() + const hour = intl.formatMessage({ id: "per hour during" }) + const day = intl.formatMessage({ id: "per day during" }) + const night = intl.formatMessage({ id: "per night during" }) + const allDay = intl.formatMessage({ id: "per whole day" }) + + function translatePeriods(period: string) { + switch (period) { + case "Hour": + return hour + case "Day": + return day + case "Night": + return night + case "AllDay": + return allDay + } + } + return ( + <> + {data?.map((price) => { + return price.amount &&
hello
+ })} + + ) +} diff --git a/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/index.tsx b/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/index.tsx index a6373379b..044ee28f5 100644 --- a/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/index.tsx +++ b/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/index.tsx @@ -2,6 +2,8 @@ import AccordionItem from "@/components/TempDesignSystem/Accordion/AccordionItem import Body from "@/components/TempDesignSystem/Text/Body" import { getIntl } from "@/i18n" +import ParkingPrices from "./ParkingPrices" + import styles from "./parking.module.css" import { ParkingAmenityProps } from "@/types/components/hotelPage/sidepeek/parking" @@ -9,23 +11,6 @@ import { IconName } from "@/types/components/icon" export default async function ParkingAmenity({ parking }: ParkingAmenityProps) { const intl = await getIntl() - const hour = intl.formatMessage({ id: "per hour during" }) - const day = intl.formatMessage({ id: "per day during" }) - const night = intl.formatMessage({ id: "per night during" }) - const allDay = intl.formatMessage({ id: "per whole day" }) - - function translatePeriods(period: string) { - switch (period) { - case "Hour": - return hour - case "Day": - return day - case "Night": - return night - case "AllDay": - return allDay - } - } return ( {`${data.type} (${data.name})`}
    - {data.numberOfChargingSpaces && ( -
  • {`Number of charging points for electric cars: ${data.numberOfChargingSpaces}`}
  • - )} - {data.canMakeReservation && ( -
  • {`${intl.formatMessage({ id: "Parking can be reserved in advance" })}: ${data.canMakeReservation ? intl.formatMessage({ id: "Yes" }) : intl.formatMessage({ id: "No" })}`}
  • - )} - {data.numberOfParkingSpots && ( -
  • {`${intl.formatMessage({ id: "Number of parking spots" })}: ${data.numberOfParkingSpots}`}
  • - )} - {data.distanceToHotel && ( -
  • {`${intl.formatMessage({ id: "Distance to hotel" })}: ${data.distanceToHotel}`}
  • - )} - {data.address && ( -
  • {`${intl.formatMessage({ id: "Address" })}: ${data.address}`}
  • - )} +
  • {`Number of charging points for electric cars: ${data.numberOfChargingSpaces}`}
  • +
  • {`${intl.formatMessage({ id: "Parking can be reserved in advance" })}: ${data.canMakeReservation ? intl.formatMessage({ id: "Yes" }) : intl.formatMessage({ id: "No" })}`}
  • +
  • {`${intl.formatMessage({ id: "Number of parking spots" })}: ${data.numberOfParkingSpots}`}
  • +
  • {`${intl.formatMessage({ id: "Distance to hotel" })}: ${data.distanceToHotel}`}
  • +
  • {`${intl.formatMessage({ id: "Address" })}: ${data.address}`}
@@ -63,52 +38,22 @@ export default async function ParkingAmenity({ parking }: ParkingAmenityProps) {
- {data.pricing.localCurrency.ordinary && ( - <> - - {intl.formatMessage({ id: "Weekday" })} - - {data.pricing.localCurrency.ordinary.map((ordinary) => { - return ( - ordinary.amount && - ordinary.period && - ordinary.startTime && - ordinary.endTime && ( - - {`${ordinary.amount} ${translatePeriods(ordinary.period)} ${ordinary.startTime}-${ordinary.endTime}`} - - ) - ) - })} - - )} + + {intl.formatMessage({ id: "Ordinary" })} + +
- {data.pricing.localCurrency.weekend && ( - <> - - {intl.formatMessage({ id: "Weekday" })} - - {data.pricing.localCurrency.weekend.map((weekend) => { - return ( - weekend.amount && - weekend.period && - weekend.startTime && - weekend.endTime && ( - - {`${weekend.amount} ${translatePeriods(weekend.period)} ${weekend.startTime}-${weekend.endTime}`} - - ) - ) - })} - - )} + + {intl.formatMessage({ id: "Weekday" })} + +
diff --git a/types/components/hotelPage/sidepeek/parking.ts b/types/components/hotelPage/sidepeek/parking.ts index d191b4129..bb795d271 100644 --- a/types/components/hotelPage/sidepeek/parking.ts +++ b/types/components/hotelPage/sidepeek/parking.ts @@ -3,3 +3,15 @@ import type { Hotel } from "@/types/hotel" export type ParkingAmenityProps = { parking: Hotel["parking"] } + +type parkingData = { + period?: string + amount?: number + startTime?: string + endTime?: string +} + +export type ParkingPricesProps = { + data?: parkingData[] + currency?: Hotel["parking"][number]["pricing"]["localCurrency"]["currency"] +} From 37fda8f1ab32a57417352e9d1c6562d047275e64 Mon Sep 17 00:00:00 2001 From: Fredrik Thorsson Date: Wed, 27 Nov 2024 09:30:42 +0100 Subject: [PATCH 23/52] feat(SW-914): merge changes --- components/ContentType/HotelPage/SidePeeks/index.ts | 3 +++ components/ContentType/HotelPage/index.tsx | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/components/ContentType/HotelPage/SidePeeks/index.ts b/components/ContentType/HotelPage/SidePeeks/index.ts index 915d17c5e..246315043 100644 --- a/components/ContentType/HotelPage/SidePeeks/index.ts +++ b/components/ContentType/HotelPage/SidePeeks/index.ts @@ -1,7 +1,10 @@ export { default as AboutTheHotelSidePeek } from "./AboutTheHotel" <<<<<<< HEAD +<<<<<<< HEAD export { default as RoomSidePeek } from "./Room" ======= export { default as AmenitiesSidePeek } from "./Amenities" >>>>>>> de3b70ce (feat(SW-914): add correct import) +======= +>>>>>>> d2b749c0 (feat(SW-914): merge changes) export { default as WellnessAndExerciseSidePeek } from "./WellnessAndExercise" diff --git a/components/ContentType/HotelPage/index.tsx b/components/ContentType/HotelPage/index.tsx index f52c0f73e..556be2c5b 100644 --- a/components/ContentType/HotelPage/index.tsx +++ b/components/ContentType/HotelPage/index.tsx @@ -28,6 +28,7 @@ import Facilities from "./Facilities" import IntroSection from "./IntroSection" import PreviewImages from "./PreviewImages" import { Rooms } from "./Rooms" +<<<<<<< HEAD import { AboutTheHotelSidePeek, <<<<<<< HEAD @@ -37,6 +38,9 @@ import { >>>>>>> de3b70ce (feat(SW-914): add correct import) WellnessAndExerciseSidePeek, } from "./SidePeeks" +======= +import { AboutTheHotelSidePeek, WellnessAndExerciseSidePeek } from "./SidePeeks" +>>>>>>> d2b749c0 (feat(SW-914): merge changes) import TabNavigation from "./TabNavigation" import styles from "./hotelPage.module.css" @@ -79,7 +83,6 @@ export default async function HotelPage({ hotelId }: HotelPageProps) { hotelFacts, location, ratings, - parking, } = hotelData.data.attributes const roomCategories = hotelData.included?.filter((item) => item.type === "roomcategories") || [] @@ -192,8 +195,11 @@ export default async function HotelPage({ hotelId }: HotelPageProps) { ======= {/* eslint-disable import/no-named-as-default-member */} +<<<<<<< HEAD >>>>>>> de3b70ce (feat(SW-914): add correct import) +======= +>>>>>>> d2b749c0 (feat(SW-914): merge changes) Date: Wed, 27 Nov 2024 09:45:08 +0100 Subject: [PATCH 24/52] feat(SW-914): fix merge hickup --- .../ContentType/HotelPage/SidePeeks/index.ts | 7 ------- components/ContentType/HotelPage/index.tsx | 17 +---------------- 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/components/ContentType/HotelPage/SidePeeks/index.ts b/components/ContentType/HotelPage/SidePeeks/index.ts index 246315043..5da71bbcd 100644 --- a/components/ContentType/HotelPage/SidePeeks/index.ts +++ b/components/ContentType/HotelPage/SidePeeks/index.ts @@ -1,10 +1,3 @@ export { default as AboutTheHotelSidePeek } from "./AboutTheHotel" -<<<<<<< HEAD -<<<<<<< HEAD export { default as RoomSidePeek } from "./Room" -======= -export { default as AmenitiesSidePeek } from "./Amenities" ->>>>>>> de3b70ce (feat(SW-914): add correct import) -======= ->>>>>>> d2b749c0 (feat(SW-914): merge changes) export { default as WellnessAndExerciseSidePeek } from "./WellnessAndExercise" diff --git a/components/ContentType/HotelPage/index.tsx b/components/ContentType/HotelPage/index.tsx index 556be2c5b..87fe388a5 100644 --- a/components/ContentType/HotelPage/index.tsx +++ b/components/ContentType/HotelPage/index.tsx @@ -28,19 +28,11 @@ import Facilities from "./Facilities" import IntroSection from "./IntroSection" import PreviewImages from "./PreviewImages" import { Rooms } from "./Rooms" -<<<<<<< HEAD import { AboutTheHotelSidePeek, -<<<<<<< HEAD RoomSidePeek, -======= - AmenitiesSidePeek, ->>>>>>> de3b70ce (feat(SW-914): add correct import) WellnessAndExerciseSidePeek, } from "./SidePeeks" -======= -import { AboutTheHotelSidePeek, WellnessAndExerciseSidePeek } from "./SidePeeks" ->>>>>>> d2b749c0 (feat(SW-914): merge changes) import TabNavigation from "./TabNavigation" import styles from "./hotelPage.module.css" @@ -185,7 +177,7 @@ export default async function HotelPage({ hotelId }: HotelPageProps) { ) : null} -<<<<<<< HEAD + {/* eslint-disable import/no-named-as-default-member */} -======= - {/* eslint-disable import/no-named-as-default-member */} -<<<<<<< HEAD - ->>>>>>> de3b70ce (feat(SW-914): add correct import) -======= ->>>>>>> d2b749c0 (feat(SW-914): merge changes) Date: Wed, 27 Nov 2024 09:52:42 +0100 Subject: [PATCH 25/52] feat(SW-914): back on track --- .../ContentType/HotelPage/SidePeeks/index.ts | 1 + components/ContentType/HotelPage/index.tsx | 15 +++++++-------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/components/ContentType/HotelPage/SidePeeks/index.ts b/components/ContentType/HotelPage/SidePeeks/index.ts index 5da71bbcd..7eff75db2 100644 --- a/components/ContentType/HotelPage/SidePeeks/index.ts +++ b/components/ContentType/HotelPage/SidePeeks/index.ts @@ -1,3 +1,4 @@ export { default as AboutTheHotelSidePeek } from "./AboutTheHotel" +export { default as AmenitiesSidePeek } from "./Amenities" export { default as RoomSidePeek } from "./Room" export { default as WellnessAndExerciseSidePeek } from "./WellnessAndExercise" diff --git a/components/ContentType/HotelPage/index.tsx b/components/ContentType/HotelPage/index.tsx index 87fe388a5..7f627128d 100644 --- a/components/ContentType/HotelPage/index.tsx +++ b/components/ContentType/HotelPage/index.tsx @@ -2,7 +2,6 @@ import { notFound } from "next/navigation" import { activities, - amenities, meetingsAndConferences, restaurantAndBar, } from "@/constants/routes/hotelPageParams" @@ -30,6 +29,7 @@ import PreviewImages from "./PreviewImages" import { Rooms } from "./Rooms" import { AboutTheHotelSidePeek, + AmenitiesSidePeek, RoomSidePeek, WellnessAndExerciseSidePeek, } from "./SidePeeks" @@ -75,6 +75,7 @@ export default async function HotelPage({ hotelId }: HotelPageProps) { hotelFacts, location, ratings, + parking, } = hotelData.data.attributes const roomCategories = hotelData.included?.filter((item) => item.type === "roomcategories") || [] @@ -178,13 +179,11 @@ export default async function HotelPage({ hotelId }: HotelPageProps) { ) : null} {/* eslint-disable import/no-named-as-default-member */} - - {/* TODO: Render amenities as per the design. */} - Read more about the amenities here - + Date: Wed, 27 Nov 2024 15:35:58 +0100 Subject: [PATCH 26/52] feat(SW-914): add accessibility component --- .../ContactInformation/index.tsx | 3 +- .../Accessibility/accessibility.module.css | 0 .../accessibilityAmenity.module.css | 5 ++ .../Accessibility/index.tsx | 27 +++++++- .../Breakfast/breakfast.module.css | 0 .../AccordionAmenities/Breakfast/index.tsx | 2 +- .../Parking/ParkingPrices/index.tsx | 29 +-------- .../AccordionAmenities/Parking/index.tsx | 64 ++++++++++--------- ...g.module.css => parkingAmenity.module.css} | 3 +- .../filteredAmenities.module.css} | 0 .../{Amenity => FilteredAmenities}/index.tsx | 8 ++- .../HotelPage/SidePeeks/Amenities/index.tsx | 21 ++++-- components/ContentType/HotelPage/data.ts | 6 +- components/ContentType/HotelPage/index.tsx | 1 + i18n/dictionaries/da.json | 1 + i18n/dictionaries/de.json | 1 + i18n/dictionaries/en.json | 1 + i18n/dictionaries/fi.json | 1 + i18n/dictionaries/no.json | 1 + i18n/dictionaries/sv.json | 1 + .../hotelPage/sidepeek/aboutTheHotel.ts | 5 ++ .../hotelPage/sidepeek/accessibility.ts | 5 ++ .../hotelPage/sidepeek/amenities.ts | 5 ++ .../components/hotelPage/sidepeek/amenity.ts | 5 -- .../hotelPage/sidepeek/contactInformation.ts | 6 -- types/enums/facilities.ts | 2 + 26 files changed, 117 insertions(+), 86 deletions(-) delete mode 100644 components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Accessibility/accessibility.module.css create mode 100644 components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Accessibility/accessibilityAmenity.module.css delete mode 100644 components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Breakfast/breakfast.module.css rename components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/{parking.module.css => parkingAmenity.module.css} (87%) rename components/ContentType/HotelPage/SidePeeks/Amenities/{Amenity/amenity.module.css => FilteredAmenities/filteredAmenities.module.css} (100%) rename components/ContentType/HotelPage/SidePeeks/Amenities/{Amenity => FilteredAmenities}/index.tsx (75%) create mode 100644 types/components/hotelPage/sidepeek/accessibility.ts delete mode 100644 types/components/hotelPage/sidepeek/amenity.ts delete mode 100644 types/components/hotelPage/sidepeek/contactInformation.ts diff --git a/components/ContentType/HotelPage/SidePeeks/AboutTheHotel/ContactInformation/index.tsx b/components/ContentType/HotelPage/SidePeeks/AboutTheHotel/ContactInformation/index.tsx index f4bf137a4..d7e4d8a19 100644 --- a/components/ContentType/HotelPage/SidePeeks/AboutTheHotel/ContactInformation/index.tsx +++ b/components/ContentType/HotelPage/SidePeeks/AboutTheHotel/ContactInformation/index.tsx @@ -10,7 +10,7 @@ import { getLang } from "@/i18n/serverContext" import styles from "./contactInformation.module.css" -import type { ContactInformationProps } from "@/types/components/hotelPage/sidepeek/contactInformation" +import type { ContactInformationProps } from "@/types/components/hotelPage/sidepeek/aboutTheHotel" export default async function ContactInformation({ hotelAddress, @@ -21,7 +21,6 @@ export default async function ContactInformation({ }: ContactInformationProps) { const intl = await getIntl() const lang = getLang() - const { latitude, longitude } = coordinates const directionsUrl = `https://www.google.com/maps/dir/?api=1&destination=${latitude},${longitude}` diff --git a/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Accessibility/accessibility.module.css b/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Accessibility/accessibility.module.css deleted file mode 100644 index e69de29bb..000000000 diff --git a/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Accessibility/accessibilityAmenity.module.css b/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Accessibility/accessibilityAmenity.module.css new file mode 100644 index 000000000..00ab8aebe --- /dev/null +++ b/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Accessibility/accessibilityAmenity.module.css @@ -0,0 +1,5 @@ +.wrapper { + display: flex; + flex-direction: column; + gap: var(--Spacing-x3); +} diff --git a/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Accessibility/index.tsx b/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Accessibility/index.tsx index a89fd0673..5313bb50a 100644 --- a/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Accessibility/index.tsx +++ b/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Accessibility/index.tsx @@ -1,16 +1,39 @@ +import { ArrowRightIcon } from "@/components/Icons" import AccordionItem from "@/components/TempDesignSystem/Accordion/AccordionItem" +import Link from "@/components/TempDesignSystem/Link" +import Body from "@/components/TempDesignSystem/Text/Body" import { getIntl } from "@/i18n" +import styles from "./accessibilityAmenity.module.css" + +import type { AccessibilityAmenityProps } from "@/types/components/hotelPage/sidepeek/accessibility" import { IconName } from "@/types/components/icon" -export default async function AccessibilityAmenity() { +export default async function AccessibilityAmenity({ + accessibility, +}: AccessibilityAmenityProps) { const intl = await getIntl() return ( - Accessibility +
+ {accessibility?.description && ( + {accessibility.description} + )} + {accessibility?.link && ( + + {intl.formatMessage({ id: "About accessibility" })} + + + )} +
) } diff --git a/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Breakfast/breakfast.module.css b/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Breakfast/breakfast.module.css deleted file mode 100644 index e69de29bb..000000000 diff --git a/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Breakfast/index.tsx b/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Breakfast/index.tsx index aeb11aef5..c731bb86a 100644 --- a/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Breakfast/index.tsx +++ b/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Breakfast/index.tsx @@ -10,7 +10,7 @@ export default async function BreakfastAmenity() { title={intl.formatMessage({ id: "Breakfast" })} icon={IconName.CoffeeAlt} > - Breakfast + {/* TODO: breakfast to be implemented */}
) } diff --git a/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/ParkingPrices/index.tsx b/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/ParkingPrices/index.tsx index 465d33558..1486faf6b 100644 --- a/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/ParkingPrices/index.tsx +++ b/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/ParkingPrices/index.tsx @@ -1,31 +1,6 @@ -import { getIntl } from "@/i18n" - import { ParkingPricesProps } from "@/types/components/hotelPage/sidepeek/parking" export default async function ParkingPrices({ data }: ParkingPricesProps) { - const intl = await getIntl() - const hour = intl.formatMessage({ id: "per hour during" }) - const day = intl.formatMessage({ id: "per day during" }) - const night = intl.formatMessage({ id: "per night during" }) - const allDay = intl.formatMessage({ id: "per whole day" }) - - function translatePeriods(period: string) { - switch (period) { - case "Hour": - return hour - case "Day": - return day - case "Night": - return night - case "AllDay": - return allDay - } - } - return ( - <> - {data?.map((price) => { - return price.amount &&
hello
- })} - - ) + // TODO: Parking prices to be implemented. + return
} diff --git a/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/index.tsx b/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/index.tsx index 044ee28f5..25c9939e2 100644 --- a/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/index.tsx +++ b/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/index.tsx @@ -4,7 +4,7 @@ import { getIntl } from "@/i18n" import ParkingPrices from "./ParkingPrices" -import styles from "./parking.module.css" +import styles from "./parkingAmenity.module.css" import { ParkingAmenityProps } from "@/types/components/hotelPage/sidepeek/parking" import { IconName } from "@/types/components/icon" @@ -19,45 +19,51 @@ export default async function ParkingAmenity({ parking }: ParkingAmenityProps) { >
{parking.map((data) => ( - <> -
- {`${data.type} (${data.name})`} +
+
+ {`${data.type} ${data.name}`}
    -
  • {`Number of charging points for electric cars: ${data.numberOfChargingSpaces}`}
  • + {data.numberOfChargingSpaces ? ( +
  • {`Number of charging points for electric cars: ${data.numberOfChargingSpaces}`}
  • + ) : null}
  • {`${intl.formatMessage({ id: "Parking can be reserved in advance" })}: ${data.canMakeReservation ? intl.formatMessage({ id: "Yes" }) : intl.formatMessage({ id: "No" })}`}
  • -
  • {`${intl.formatMessage({ id: "Number of parking spots" })}: ${data.numberOfParkingSpots}`}
  • -
  • {`${intl.formatMessage({ id: "Distance to hotel" })}: ${data.distanceToHotel}`}
  • -
  • {`${intl.formatMessage({ id: "Address" })}: ${data.address}`}
  • + {data.numberOfParkingSpots ? ( +
  • {`${intl.formatMessage({ id: "Number of parking spots" })}: ${data.numberOfParkingSpots}`}
  • + ) : null} + {data.distanceToHotel ? ( +
  • {`${intl.formatMessage({ id: "Distance to hotel" })}: ${data.distanceToHotel}m`}
  • + ) : null} + {data.address ? ( +
  • {`${intl.formatMessage({ id: "Address" })}: ${data.address}`}
  • + ) : null}
-
+
{intl.formatMessage({ id: "Prices" })} -
-
- - {intl.formatMessage({ id: "Ordinary" })} - - -
-
- - {intl.formatMessage({ id: "Weekday" })} - - -
+
+ + {intl.formatMessage({ id: "Ordinary" })} + + +
+ + {intl.formatMessage({ id: "Weekday" })} + +
+
- +
))}
diff --git a/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/parking.module.css b/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/parkingAmenity.module.css similarity index 87% rename from components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/parking.module.css rename to components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/parkingAmenity.module.css index 0a19979cd..eda13e63c 100644 --- a/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/parking.module.css +++ b/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/parkingAmenity.module.css @@ -11,8 +11,9 @@ gap: var(--Spacing-x-one-and-half); } +.list, .prices { display: flex; flex-direction: column; - gap: var(--Spacing-x1); + gap: var(--Spacing-x-half); } diff --git a/components/ContentType/HotelPage/SidePeeks/Amenities/Amenity/amenity.module.css b/components/ContentType/HotelPage/SidePeeks/Amenities/FilteredAmenities/filteredAmenities.module.css similarity index 100% rename from components/ContentType/HotelPage/SidePeeks/Amenities/Amenity/amenity.module.css rename to components/ContentType/HotelPage/SidePeeks/Amenities/FilteredAmenities/filteredAmenities.module.css diff --git a/components/ContentType/HotelPage/SidePeeks/Amenities/Amenity/index.tsx b/components/ContentType/HotelPage/SidePeeks/Amenities/FilteredAmenities/index.tsx similarity index 75% rename from components/ContentType/HotelPage/SidePeeks/Amenities/Amenity/index.tsx rename to components/ContentType/HotelPage/SidePeeks/Amenities/FilteredAmenities/index.tsx index f4a30872b..f121893e5 100644 --- a/components/ContentType/HotelPage/SidePeeks/Amenities/Amenity/index.tsx +++ b/components/ContentType/HotelPage/SidePeeks/Amenities/FilteredAmenities/index.tsx @@ -3,11 +3,13 @@ import Body from "@/components/TempDesignSystem/Text/Body" import { mapFacilityToIcon } from "../../../data" -import styles from "./amenity.module.css" +import styles from "./filteredAmenities.module.css" -import type { AmenityProps } from "@/types/components/hotelPage/sidepeek/amenity" +import type { FilteredAmenitiesProps } from "@/types/components/hotelPage/sidepeek/amenities" -export default function Amenity({ filteredAmenities }: AmenityProps) { +export default function FilteredAmenities({ + filteredAmenities, +}: FilteredAmenitiesProps) { return ( <> {filteredAmenities?.map((amenity) => { diff --git a/components/ContentType/HotelPage/SidePeeks/Amenities/index.tsx b/components/ContentType/HotelPage/SidePeeks/Amenities/index.tsx index 95f81ba97..5c9da2472 100644 --- a/components/ContentType/HotelPage/SidePeeks/Amenities/index.tsx +++ b/components/ContentType/HotelPage/SidePeeks/Amenities/index.tsx @@ -11,23 +11,30 @@ import { CheckInAmenity, ParkingAmenity, } from "./AccordionAmenities" -import Amenity from "./Amenity" +import FilteredAmenities from "./FilteredAmenities" import type { AmenitiesSidePeekProps } from "@/types/components/hotelPage/sidepeek/amenities" +import { FacilityEnum } from "@/types/enums/facilities" export default async function AmenitiesSidePeek({ amenitiesList, parking, checkInInformation, + accessibility, }: AmenitiesSidePeekProps) { const lang = getLang() const intl = await getIntl() const filteredAmenities = amenitiesList.filter((filter) => { return ( - !filter.name.startsWith("Parking") && - filter.name !== "Meeting / conference facilities" && - filter.name !== "Late check-out until 14:00 guaranteed" + filter.id !== FacilityEnum.ParkingAdditionalCost && + filter.id !== FacilityEnum.ParkingElectricCharging && + filter.id !== FacilityEnum.ParkingFreeParking && + filter.id !== FacilityEnum.ParkingGarage && + filter.id !== FacilityEnum.ParkingOutdoor && + filter.id !== FacilityEnum.MeetingArea && + filter.id !== FacilityEnum.ServesBreakfastAlwaysIncluded && + filter.id !== FacilityEnum.LateCheckOutUntil1400Guaranteed ) }) @@ -40,8 +47,10 @@ export default async function AmenitiesSidePeek({ {parking.length ? : null} - - + {accessibility && ( + + )} + ) diff --git a/components/ContentType/HotelPage/data.ts b/components/ContentType/HotelPage/data.ts index dd50ea6b5..7f828d429 100644 --- a/components/ContentType/HotelPage/data.ts +++ b/components/ContentType/HotelPage/data.ts @@ -281,13 +281,11 @@ const facilityToIconMap: Record = { [FacilityEnum.WideEntrance]: IconName.StarFilled, [FacilityEnum.WideRestaurantEntrance]: IconName.StarFilled, [FacilityEnum.WiFiWirelessInternetAccessAllScandic]: IconName.StarFilled, + [FacilityEnum.MeetingArea]: IconName.Business, + [FacilityEnum.LateCheckOutUntil1400Guaranteed]: IconName.Business, } export function mapFacilityToIcon(id: FacilityEnum): FC | null { const iconName = facilityToIconMap[id] return getIconByIconName(iconName) || null } - -export function mapFacilityToIconName(id: FacilityEnum): IconName { - return facilityToIconMap[id] -} diff --git a/components/ContentType/HotelPage/index.tsx b/components/ContentType/HotelPage/index.tsx index 7f627128d..561ae3ab9 100644 --- a/components/ContentType/HotelPage/index.tsx +++ b/components/ContentType/HotelPage/index.tsx @@ -183,6 +183,7 @@ export default async function HotelPage({ hotelId }: HotelPageProps) { amenitiesList={detailedFacilities} parking={parking} checkInInformation={hotelFacts.checkin} + accessibility={hotelFacts.hotelInformation.accessibility} /> diff --git a/types/components/hotelPage/sidepeek/accessibility.ts b/types/components/hotelPage/sidepeek/accessibility.ts new file mode 100644 index 000000000..335971419 --- /dev/null +++ b/types/components/hotelPage/sidepeek/accessibility.ts @@ -0,0 +1,5 @@ +import type { Hotel } from "@/types/hotel" + +export type AccessibilityAmenityProps = { + accessibility: Hotel["hotelFacts"]["hotelInformation"]["accessibility"] +} diff --git a/types/components/hotelPage/sidepeek/amenities.ts b/types/components/hotelPage/sidepeek/amenities.ts index b2671226f..8ded22722 100644 --- a/types/components/hotelPage/sidepeek/amenities.ts +++ b/types/components/hotelPage/sidepeek/amenities.ts @@ -4,4 +4,9 @@ export type AmenitiesSidePeekProps = { amenitiesList: Hotel["detailedFacilities"] parking: Hotel["parking"] checkInInformation: Hotel["hotelFacts"]["checkin"] + accessibility: Hotel["hotelFacts"]["hotelInformation"]["accessibility"] +} + +export type FilteredAmenitiesProps = { + filteredAmenities: Hotel["detailedFacilities"] } diff --git a/types/components/hotelPage/sidepeek/amenity.ts b/types/components/hotelPage/sidepeek/amenity.ts deleted file mode 100644 index fb1d9588b..000000000 --- a/types/components/hotelPage/sidepeek/amenity.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { Hotel } from "@/types/hotel" - -export type AmenityProps = { - filteredAmenities?: Hotel["detailedFacilities"] -} diff --git a/types/components/hotelPage/sidepeek/contactInformation.ts b/types/components/hotelPage/sidepeek/contactInformation.ts deleted file mode 100644 index f1eb73196..000000000 --- a/types/components/hotelPage/sidepeek/contactInformation.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { AboutTheHotelSidePeekProps } from "./aboutTheHotel" - -export type ContactInformationProps = Omit< - AboutTheHotelSidePeekProps, - "descriptions" -> diff --git a/types/enums/facilities.ts b/types/enums/facilities.ts index 169aad6c0..f70da822b 100644 --- a/types/enums/facilities.ts +++ b/types/enums/facilities.ts @@ -259,4 +259,6 @@ export enum FacilityEnum { WideEntrance = 2085, WideRestaurantEntrance = 2087, WiFiWirelessInternetAccessAllScandic = 5774, + MeetingArea = 1692, + LateCheckOutUntil1400Guaranteed = 324101, } From 083811ff16fb51043695ff1b7b1e72cc54cc882f Mon Sep 17 00:00:00 2001 From: Fredrik Thorsson Date: Wed, 27 Nov 2024 15:55:54 +0100 Subject: [PATCH 27/52] feat(SW-914): change filter function --- .../Parking/ParkingPrices/index.tsx | 2 +- .../HotelPage/SidePeeks/Amenities/index.tsx | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/ParkingPrices/index.tsx b/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/ParkingPrices/index.tsx index 1486faf6b..d4ff915df 100644 --- a/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/ParkingPrices/index.tsx +++ b/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/ParkingPrices/index.tsx @@ -1,4 +1,4 @@ -import { ParkingPricesProps } from "@/types/components/hotelPage/sidepeek/parking" +import type { ParkingPricesProps } from "@/types/components/hotelPage/sidepeek/parking" export default async function ParkingPrices({ data }: ParkingPricesProps) { // TODO: Parking prices to be implemented. diff --git a/components/ContentType/HotelPage/SidePeeks/Amenities/index.tsx b/components/ContentType/HotelPage/SidePeeks/Amenities/index.tsx index 5c9da2472..7f35ca6e2 100644 --- a/components/ContentType/HotelPage/SidePeeks/Amenities/index.tsx +++ b/components/ContentType/HotelPage/SidePeeks/Amenities/index.tsx @@ -25,16 +25,16 @@ export default async function AmenitiesSidePeek({ const lang = getLang() const intl = await getIntl() - const filteredAmenities = amenitiesList.filter((filter) => { + const filteredAmenities = amenitiesList.filter((amenity) => { return ( - filter.id !== FacilityEnum.ParkingAdditionalCost && - filter.id !== FacilityEnum.ParkingElectricCharging && - filter.id !== FacilityEnum.ParkingFreeParking && - filter.id !== FacilityEnum.ParkingGarage && - filter.id !== FacilityEnum.ParkingOutdoor && - filter.id !== FacilityEnum.MeetingArea && - filter.id !== FacilityEnum.ServesBreakfastAlwaysIncluded && - filter.id !== FacilityEnum.LateCheckOutUntil1400Guaranteed + amenity.id !== FacilityEnum.ParkingAdditionalCost && + amenity.id !== FacilityEnum.ParkingElectricCharging && + amenity.id !== FacilityEnum.ParkingFreeParking && + amenity.id !== FacilityEnum.ParkingGarage && + amenity.id !== FacilityEnum.ParkingOutdoor && + amenity.id !== FacilityEnum.MeetingArea && + amenity.id !== FacilityEnum.ServesBreakfastAlwaysIncluded && + amenity.id !== FacilityEnum.LateCheckOutUntil1400Guaranteed ) }) From ae011463762782edcbf473433692cc5a61ea4c5f Mon Sep 17 00:00:00 2001 From: Fredrik Thorsson Date: Wed, 27 Nov 2024 16:47:23 +0100 Subject: [PATCH 28/52] feat(SW-914): import type --- .../Amenities/AccordionAmenities/Parking/index.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/index.tsx b/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/index.tsx index 25c9939e2..37c443770 100644 --- a/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/index.tsx +++ b/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/index.tsx @@ -6,7 +6,7 @@ import ParkingPrices from "./ParkingPrices" import styles from "./parkingAmenity.module.css" -import { ParkingAmenityProps } from "@/types/components/hotelPage/sidepeek/parking" +import type { ParkingAmenityProps } from "@/types/components/hotelPage/sidepeek/parking" import { IconName } from "@/types/components/icon" export default async function ParkingAmenity({ parking }: ParkingAmenityProps) { @@ -53,10 +53,10 @@ export default async function ParkingAmenity({ parking }: ParkingAmenityProps) { currency={data.pricing.localCurrency.currency} />
- - {intl.formatMessage({ id: "Weekday" })} -
+ + {intl.formatMessage({ id: "Weekday" })} + Date: Wed, 27 Nov 2024 17:03:07 +0100 Subject: [PATCH 29/52] feat(SW-914): type change --- types/components/hotelPage/sidepeek/parking.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/types/components/hotelPage/sidepeek/parking.ts b/types/components/hotelPage/sidepeek/parking.ts index bb795d271..873f8576e 100644 --- a/types/components/hotelPage/sidepeek/parking.ts +++ b/types/components/hotelPage/sidepeek/parking.ts @@ -4,14 +4,7 @@ export type ParkingAmenityProps = { parking: Hotel["parking"] } -type parkingData = { - period?: string - amount?: number - startTime?: string - endTime?: string -} - export type ParkingPricesProps = { - data?: parkingData[] + data?: Hotel["parking"][number]["pricing"]["localCurrency"]["ordinary"] currency?: Hotel["parking"][number]["pricing"]["localCurrency"]["currency"] } From 7b68bc7ac74490e1675ffebc7dd5fcb2540f8d6a Mon Sep 17 00:00:00 2001 From: Fredrik Thorsson Date: Wed, 27 Nov 2024 17:05:22 +0100 Subject: [PATCH 30/52] feat(SW-914): remove optional --- types/components/hotelPage/sidepeek/parking.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/components/hotelPage/sidepeek/parking.ts b/types/components/hotelPage/sidepeek/parking.ts index 873f8576e..d56a08cf6 100644 --- a/types/components/hotelPage/sidepeek/parking.ts +++ b/types/components/hotelPage/sidepeek/parking.ts @@ -5,6 +5,6 @@ export type ParkingAmenityProps = { } export type ParkingPricesProps = { - data?: Hotel["parking"][number]["pricing"]["localCurrency"]["ordinary"] + data: Hotel["parking"][number]["pricing"]["localCurrency"]["ordinary"] currency?: Hotel["parking"][number]["pricing"]["localCurrency"]["currency"] } From d2e214ed6c3c9e99ae89e59b3596c2eb44d0c2a6 Mon Sep 17 00:00:00 2001 From: Fredrik Thorsson Date: Thu, 28 Nov 2024 14:32:45 +0100 Subject: [PATCH 31/52] feat(SW-914): update parking design --- .../Parking/ParkingPrices/index.tsx | 60 ++++++++++++++++++- .../ParkingPrices/parkingPrices.module.css | 13 ++++ .../AccordionAmenities/Parking/index.tsx | 24 ++++---- .../Parking/parkingAmenity.module.css | 35 +++++++---- i18n/dictionaries/da.json | 5 ++ i18n/dictionaries/de.json | 5 ++ i18n/dictionaries/en.json | 5 ++ i18n/dictionaries/fi.json | 5 ++ i18n/dictionaries/no.json | 5 ++ i18n/dictionaries/sv.json | 5 ++ 10 files changed, 138 insertions(+), 24 deletions(-) create mode 100644 components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/ParkingPrices/parkingPrices.module.css diff --git a/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/ParkingPrices/index.tsx b/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/ParkingPrices/index.tsx index d4ff915df..0edf4acba 100644 --- a/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/ParkingPrices/index.tsx +++ b/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/ParkingPrices/index.tsx @@ -1,6 +1,60 @@ +import Body from "@/components/TempDesignSystem/Text/Body" +import { getIntl } from "@/i18n" + +import styles from "./parkingPrices.module.css" + import type { ParkingPricesProps } from "@/types/components/hotelPage/sidepeek/parking" -export default async function ParkingPrices({ data }: ParkingPricesProps) { - // TODO: Parking prices to be implemented. - return
+export default async function ParkingPrices({ + data, + currency, +}: ParkingPricesProps) { + const intl = await getIntl() + const day = intl.formatMessage({ id: "Price per day" }) + const night = intl.formatMessage({ id: "Price per night" }) + const allDay = intl.formatMessage({ id: "Price per 24 hours" }) + + function getPeriod(period: string | undefined) { + switch (period) { + case "Day": + return day + case "Night": + return night + case "AllDay": + return allDay + } + } + + const filterdPeriods = data?.filter((filter) => filter.period !== "Hour") + + console.log("Parking log:", data) + + return ( +
+ {filterdPeriods?.map((parking) => { + return ( +
+
+ + {getPeriod(parking.period)} + + + {`${parking.amount} ${currency}`} + +
+ {parking.startTime && parking.endTime && ( +
+ + {intl.formatMessage({ id: "From" })} + + + {parking.startTime}-{parking.endTime} + +
+ )} +
+ ) + })} +
+ ) } diff --git a/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/ParkingPrices/parkingPrices.module.css b/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/ParkingPrices/parkingPrices.module.css new file mode 100644 index 000000000..436e883ec --- /dev/null +++ b/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/ParkingPrices/parkingPrices.module.css @@ -0,0 +1,13 @@ +.wrapper { + display: grid; + row-gap: var(--Spacing-x1); +} + +.period { + display: flex; + gap: var(--Spacing-x5); +} + +.information { + flex: 1; +} diff --git a/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/index.tsx b/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/index.tsx index 37c443770..a72d61255 100644 --- a/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/index.tsx +++ b/components/ContentType/HotelPage/SidePeeks/Amenities/AccordionAmenities/Parking/index.tsx @@ -1,5 +1,7 @@ import AccordionItem from "@/components/TempDesignSystem/Accordion/AccordionItem" +import Divider from "@/components/TempDesignSystem/Divider" import Body from "@/components/TempDesignSystem/Text/Body" +import Caption from "@/components/TempDesignSystem/Text/Caption" import { getIntl } from "@/i18n" import ParkingPrices from "./ParkingPrices" @@ -21,9 +23,9 @@ export default async function ParkingAmenity({ parking }: ParkingAmenityProps) { {parking.map((data) => (
- {`${data.type} ${data.name}`} + {data.type} -
) : null} @@ -204,13 +198,10 @@ export default function SummaryUI({ {intl.formatMessage({ id: "Breakfast buffet" })} - {intl.formatMessage( - { id: "{amount} {currency}" }, - { - amount: breakfast.localPrice.totalPrice, - currency: breakfast.localPrice.currency, - } - )} + {intl.formatNumber(parseInt(breakfast.localPrice.totalPrice), { + currency: breakfast.localPrice.currency, + style: "currency", + })}
) : null} @@ -231,30 +222,18 @@ export default function SummaryUI({
- {intl.formatMessage( - { id: "{amount} {currency}" }, - { - amount: intl.formatNumber(totalPrice.local.price, { - currency: totalPrice.local.currency, - style: "currency", - }), - currency: totalPrice.local.currency, - } - )} + {intl.formatNumber(totalPrice.local.price, { + currency: totalPrice.local.currency, + style: "currency", + })} {totalPrice.euro && ( {intl.formatMessage({ id: "Approx." })}{" "} - {intl.formatMessage( - { id: "{amount} {currency}" }, - { - amount: intl.formatNumber(totalPrice.euro.price, { - currency: CurrencyEnum.EUR, - style: "currency", - }), - currency: totalPrice.euro.currency, - } - )} + {intl.formatNumber(totalPrice.euro.price, { + currency: CurrencyEnum.EUR, + style: "currency", + })} )}
diff --git a/i18n/dictionaries/da.json b/i18n/dictionaries/da.json index cf33647f7..02062f2b3 100644 --- a/i18n/dictionaries/da.json +++ b/i18n/dictionaries/da.json @@ -18,6 +18,7 @@ "Add new card": "Tilføj nyt kort", "Address": "Adresse", "Adults": "voksne", + "Age": "Alder", "Airport": "Lufthavn", "All our breakfast buffets offer gluten free, vegan, and allergy-friendly options.": "Alle vores morgenmadsbuffeter tilbyder glutenfrie, veganske og allergivenlige muligheder.", "Allergy Room": "Allergirum", @@ -42,6 +43,7 @@ "Back to top": "Tilbage til top", "Bar": "Bar", "Based on availability": "Baseret på tilgængelighed", + "Bed": "Seng type", "Bed type": "Seng type", "Birth date": "Fødselsdato", "Book": "Book", @@ -305,6 +307,7 @@ "Read more & book a table": "Read more & book a table", "Read more about the hotel": "Læs mere om hotellet", "Read more about wellness & exercise": "Read more about wellness & exercise", + "Reference #{bookingNr}": "Reference #{bookingNr}", "Relax": "Slap af", "Remove card from member profile": "Fjern kortet fra medlemsprofilen", "Request bedtype": "Anmod om sengetype", @@ -450,6 +453,8 @@ "booking.basedOnAvailability": "Baseret på tilgængelighed", "booking.bedOptions": "Sengemuligheder", "booking.children": "{totalChildren, plural, one {# barn} other {# børn}}", + "booking.confirmation.text": "Tak fordi du bookede hos os! Vi glæder os til at byde dig velkommen og håber du får et behageligt ophold. Hvis du har spørgsmål eller har brug for at foretage ændringer i din reservation, bedes du kontakte os.", + "booking.confirmation.title": "Booking bekræftelse", "booking.guests": "Maks {nrOfGuests, plural, one {# gæst} other {# gæster}}", "booking.nights": "{totalNights, plural, one {# nat} other {# nætter}}", "booking.rooms": "{totalRooms, plural, one {# værelse} other {# værelser}}", @@ -460,6 +465,9 @@ "breakfast.price.free": "{amount} {currency} 0 {currency}/nat", "by": "inden", "characters": "tegn", + "filters.nohotel.heading": "Ingen rum matchede dine filtre.", + "filters.nohotel.text": "Det ser ud til, at ingen hoteller matcher dine filtre. Prøv at justere din søgning for at finde det perfekte ophold.", + "from": "fra", "guaranteeing": "garanti", "guest": "gæst", "guests": "gæster", @@ -480,11 +488,14 @@ "points": "Point", "room type": "værelsestype", "room types": "værelsestyper", + "signup.terms": "Ved at tilmelde dig accepterer du Scandic Friends vilkår og betingelser. Dit medlemskab er gyldigt indtil videre, og du kan til enhver tid opsige dit medlemskab ved at sende en e-mail til Scandics kundeservice", "signupPage.terms": "Ja, jeg accepterer vilkårene og betingelserne for Scandic Friends og forstår, at Scandic vil behandle mine personlige data i overensstemmelse med Scandic's integritetspolicy.", "special character": "speciel karakter", "spendable points expiring by": "{points} Brugbare point udløber den {date}", "to": "til", "uppercase letter": "stort bogstav", "{amount} out of {total}": "{amount} ud af {total}", - "{amount} {currency}": "{amount} {currency}" + "{amount} {currency}": "{amount} {currency}", + "{card} ending with {cardno}": "{card} slutter med {cardno}", + "{difference}{amount} {currency}": "{difference}{amount} {currency}" } diff --git a/i18n/dictionaries/de.json b/i18n/dictionaries/de.json index 6fdbaf405..5cdfe1a31 100644 --- a/i18n/dictionaries/de.json +++ b/i18n/dictionaries/de.json @@ -18,6 +18,7 @@ "Add new card": "Neue Karte hinzufügen", "Address": "Adresse", "Adults": "Erwachsene", + "Age": "Alter", "Airport": "Flughafen", "All our breakfast buffets offer gluten free, vegan, and allergy-friendly options.": "Alle unsere Frühstücksbuffets bieten glutenfreie, vegane und allergikerfreundliche Speisen.", "Allergy Room": "Allergikerzimmer", @@ -42,6 +43,7 @@ "Back to top": "Zurück zur Spitze", "Bar": "Bar", "Based on availability": "Je nach Verfügbarkeit", + "Bed": "Bettentyp", "Bed type": "Bettentyp", "Birth date": "Geburtsdatum", "Book": "Buchen", @@ -304,6 +306,7 @@ "Read more & book a table": "Read more & book a table", "Read more about the hotel": "Lesen Sie mehr über das Hotel", "Read more about wellness & exercise": "Read more about wellness & exercise", + "Reference #{bookingNr}": "Referenz #{bookingNr}", "Relax": "Entspannen", "Remove card from member profile": "Karte aus dem Mitgliedsprofil entfernen", "Request bedtype": "Bettentyp anfragen", @@ -449,6 +452,8 @@ "booking.basedOnAvailability": "Abhängig von der Verfügbarkeit", "booking.bedOptions": "Bettoptionen", "booking.children": "{totalChildren, plural, one {# kind} other {# kinder}}", + "booking.confirmation.text": "Vielen Dank, dass Sie bei uns gebucht haben! Wir freuen uns, Sie bei uns begrüßen zu dürfen und wünschen Ihnen einen angenehmen Aufenthalt. Wenn Sie Fragen haben oder Änderungen an Ihrer Buchung vornehmen müssen, kontaktieren Sie uns bitte..", + "booking.confirmation.title": "Buchungsbestätigung", "booking.guests": "Max {nrOfGuests, plural, one {# gast} other {# gäste}}", "booking.nights": "{totalNights, plural, one {# nacht} other {# Nächte}}", "booking.rooms": "{totalRooms, plural, one {# zimmer} other {# räume}}", @@ -459,6 +464,9 @@ "breakfast.price.free": "{amount} {currency} 0 {currency}/Nacht", "by": "bis", "characters": "figuren", + "filters.nohotel.heading": "Kein Zimmer entspricht Ihren Filtern.", + "filters.nohotel.text": "Es scheint, dass keine Hotels Ihren Filtern entsprechen. Versuchen Sie, Ihre Suche anzupassen, um den perfekten Aufenthalt zu finden.", + "from": "aus", "guaranteeing": "garantiert", "guest": "gast", "guests": "gäste", @@ -479,11 +487,14 @@ "points": "Punkte", "room type": "zimmerart", "room types": "zimmerarten", + "signup.terms": "Mit Ihrer Anmeldung akzeptieren Sie die Allgemeinen Geschäftsbedingungen von Scandic Friends. Ihre Mitgliedschaft ist bis auf Weiteres gültig und Sie können sie jederzeit kündigen, indem Sie eine E-Mail an den Kundenservice von Scandic senden.", "signupPage.terms": "Ja, ich akzeptiere die Allgemeinen Geschäftsbedingungen für Scandic Friends und verstehe, dass Scandic meine persönlichen Daten gemäß Scandics Datenschutzrichtlinie.", "special character": "sonderzeichen", "spendable points expiring by": "{points} Einlösbare punkte verfallen bis zum {date}", "to": "zu", "uppercase letter": "großbuchstabe", "{amount} out of {total}": "{amount} von {total}", - "{amount} {currency}": "{amount} {currency}" + "{amount} {currency}": "{amount} {currency}", + "{card} ending with {cardno}": "{card} endet mit {cardno}", + "{difference}{amount} {currency}": "{difference}{amount} {currency}" } diff --git a/i18n/dictionaries/fi.json b/i18n/dictionaries/fi.json index 61694d250..edbeb7c00 100644 --- a/i18n/dictionaries/fi.json +++ b/i18n/dictionaries/fi.json @@ -18,6 +18,7 @@ "Add new card": "Lisää uusi kortti", "Address": "Osoite", "Adults": "Aikuista", + "Age": "Ikä", "Airport": "Lentokenttä", "All our breakfast buffets offer gluten free, vegan, and allergy-friendly options.": "Kaikki aamiaisbuffettimme tarjoavat gluteenittomia, vegaanisia ja allergiaystävällisiä vaihtoehtoja.", "Allergy Room": "Allergiahuone", @@ -42,6 +43,7 @@ "Back to top": "Takaisin ylös", "Bar": "Bar", "Based on availability": "Saatavuuden mukaan", + "Bed": "Vuodetyyppi", "Bed type": "Vuodetyyppi", "Birth date": "Syntymäaika", "Book": "Varaa", @@ -305,6 +307,7 @@ "Read more & book a table": "Read more & book a table", "Read more about the hotel": "Lue lisää hotellista", "Read more about wellness & exercise": "Read more about wellness & exercise", + "Reference #{bookingNr}": "Referenssi #{bookingNr}", "Relax": "Rentoutua", "Remove card from member profile": "Poista kortti jäsenprofiilista", "Request bedtype": "Pyydä sänkytyyppiä", @@ -448,6 +451,8 @@ "booking.basedOnAvailability": "Saatavuuden mukaan", "booking.bedOptions": "Vuodevaihtoehdot", "booking.children": "{totalChildren, plural, one {# lapsi} other {# lasta}}", + "booking.confirmation.text": "Kiitos, että teit varauksen meiltä! Toivotamme sinut tervetulleeksi ja toivomme sinulle miellyttävää oleskelua. Jos sinulla on kysyttävää tai haluat tehdä muutoksia varaukseesi, ota meihin yhteyttä.", + "booking.confirmation.title": "Varausvahvistus", "booking.guests": "Max {nrOfGuests, plural, one {# vieras} other {# vieraita}}", "booking.nights": "{totalNights, plural, one {# yö} other {# yötä}}", "booking.rooms": "{totalRooms, plural, one {# huone} other {# sviitti}}", @@ -458,6 +463,9 @@ "breakfast.price.free": "{amount} {currency} 0 {currency}/yö", "by": "mennessä", "characters": "hahmoja", + "filters.nohotel.heading": "Yksikään huone ei vastannut suodattimiasi", + "filters.nohotel.text": "Näyttää siltä, ​​että mikään hotelli ei vastaa suodattimiasi. Yritä muokata hakuasi löytääksesi täydellisen oleskelun.", + "from": "alkaen", "guaranteeing": "varmistetaan", "guest": "Vieras", "guests": "Vieraita", @@ -478,11 +486,14 @@ "points": "pistettä", "room type": "huonetyyppi", "room types": "huonetyypit", + "signup.terms": "Rekisteröitymällä hyväksyt Scandic Friendsin käyttöehdot. Jäsenyytesi on voimassa toistaiseksi ja voit lopettaa jäsenyytesi milloin tahansa lähettämällä sähköpostia Scandicin asiakaspalveluun", "signupPage.terms": "Kyllä, hyväksyn Scandic Friends -käyttöehdot ja ymmärrän, että Scandic käsittelee henkilötietojani Scandicin tietosuojakäytännön mukaisesti.", "special character": "erikoishahmo", "spendable points expiring by": "{points} pistettä vanhenee {date} mennessä", "to": "to", "uppercase letter": "iso kirjain", "{amount} out of {total}": "{amount}/{total}", - "{amount} {currency}": "{amount} {currency}" + "{amount} {currency}": "{amount} {currency}", + "{card} ending with {cardno}": "{card} päättyen {cardno}", + "{difference}{amount} {currency}": "{difference}{amount} {currency}" } diff --git a/i18n/dictionaries/no.json b/i18n/dictionaries/no.json index 21f4c7fab..24a86d528 100644 --- a/i18n/dictionaries/no.json +++ b/i18n/dictionaries/no.json @@ -18,6 +18,7 @@ "Add new card": "Legg til nytt kort", "Address": "Adresse", "Adults": "Voksne", + "Age": "Alder", "Airport": "Flyplass", "All our breakfast buffets offer gluten free, vegan, and allergy-friendly options.": "Alle våre frokostbufféer tilbyr glutenfrie, veganske og allergivennlige alternativer.", "Allergy Room": "Allergirom", @@ -42,6 +43,7 @@ "Back to top": "Tilbake til toppen", "Bar": "Bar", "Based on availability": "Basert på tilgjengelighet", + "Bed": "Seng type", "Bed type": "Seng type", "Birth date": "Fødselsdato", "Book": "Bestill", @@ -303,6 +305,7 @@ "Read more & book a table": "Read more & book a table", "Read more about the hotel": "Les mer om hotellet", "Read more about wellness & exercise": "Read more about wellness & exercise", + "Reference #{bookingNr}": "Referanse #{bookingNr}", "Relax": "Slappe av", "Remove card from member profile": "Fjern kortet fra medlemsprofilen", "Request bedtype": "Be om sengetype", @@ -447,15 +450,21 @@ "booking.basedOnAvailability": "Basert på tilgjengelighet", "booking.bedOptions": "Sengemuligheter", "booking.children": "{totalChildren, plural, one {# barn} other {# barn}}", + "booking.confirmation.text": "Takk for at du booket hos oss! Vi ser frem til å ønske deg velkommen og håper du får et hyggelig opphold. Hvis du har spørsmål eller trenger å gjøre endringer i bestillingen din, vennligst kontakt oss.", + "booking.confirmation.title": "Bestillingsbekreftelse", "booking.guests": "Maks {nrOfGuests, plural, one {# gjest} other {# gjester}}", "booking.nights": "{totalNights, plural, one {# natt} other {# netter}}", "booking.rooms": "{totalRooms, plural, one {# rom} other {# rom}}", "booking.selectRoom": "Velg rom", + "booking.terms": "Ved å betale med en av de tilgjengelige betalingsmetodene godtar jeg vilkårene og betingelsene for denne bestillingen og de generelle vilkårene, og forstår at Scandic vil behandle mine personopplysninger i forbindelse med denne bestillingen i henhold til Scandics personvernpolicy. Jeg aksepterer at Scandic krever et gyldig kredittkort under mitt besøk i tilfelle noe blir refundert.", "booking.thisRoomIsEquippedWith": "Dette rommet er utstyrt med", "breakfast.price": "{amount} {currency}/natt", "breakfast.price.free": "{amount} {currency} 0 {currency}/natt", "by": "innen", "characters": "tegn", + "filters.nohotel.heading": "Ingen rom samsvarte med filtrene dine", + "filters.nohotel.text": "Det ser ut til at ingen hoteller samsvarer med filtrene dine. Prøv å justere søket for å finne det perfekte oppholdet.", + "from": "fra", "guaranteeing": "garantiert", "guest": "gjest", "guests": "gjester", @@ -476,11 +485,14 @@ "points": "poeng", "room type": "romtype", "room types": "romtyper", + "signup.terms": "Ved å registrere deg godtar du Scandic Friends vilkår og betingelser. Medlemskapet ditt er gyldig inntil videre, og du kan si opp medlemskapet ditt når som helst ved å sende en e-post til Scandics kundeservice", "signupPage.terms": "Ja, jeg godtar vilkårene og betingelsene for Scandic Friends og forstår at Scandic vil behandle mine personopplysninger i henhold til Scandics integritetspolicy.", "special character": "spesiell karakter", "spendable points expiring by": "{points} Brukbare poeng utløper innen {date}", "to": "til", "uppercase letter": "stor bokstav", "{amount} out of {total}": "{amount} av {total}", - "{amount} {currency}": "{amount} {currency}" + "{amount} {currency}": "{amount} {currency}", + "{card} ending with {cardno}": "{card} slutter med {cardno}", + "{difference}{amount} {currency}": "{difference}{amount} {currency}" } diff --git a/i18n/dictionaries/sv.json b/i18n/dictionaries/sv.json index 97fbffd54..a67214de5 100644 --- a/i18n/dictionaries/sv.json +++ b/i18n/dictionaries/sv.json @@ -18,6 +18,7 @@ "Add new card": "Lägg till nytt kort", "Address": "Adress", "Adults": "Vuxna", + "Age": "Ålder", "Airport": "Flygplats", "All our breakfast buffets offer gluten free, vegan, and allergy-friendly options.": "Alla våra frukostbufféer erbjuder glutenfria, veganska och allergivänliga alternativ.", "Allergy Room": "Allergirum", @@ -42,6 +43,7 @@ "Back to top": "Tillbaka till toppen", "Bar": "Bar", "Based on availability": "Baserat på tillgänglighet", + "Bed": "Sängtyp", "Bed type": "Sängtyp", "Birth date": "Födelsedatum", "Book": "Boka", @@ -303,6 +305,7 @@ "Read more & book a table": "Read more & book a table", "Read more about the hotel": "Läs mer om hotellet", "Read more about wellness & exercise": "Read more about wellness & exercise", + "Reference #{bookingNr}": "Referens #{bookingNr}", "Relax": "Koppla av", "Remove card from member profile": "Ta bort kortet från medlemsprofilen", "Request bedtype": "Request bedtype", @@ -447,6 +450,8 @@ "booking.basedOnAvailability": "Baserat på tillgänglighet", "booking.bedOptions": "Sängalternativ", "booking.children": "{totalChildren, plural, one {# barn} other {# barn}}", + "booking.confirmation.text": "Tack för att du bokar hos oss! Vi ser fram emot att välkomna dig och hoppas att du får en trevlig vistelse. Om du har några frågor eller behöver göra ändringar i din bokning, vänligen kontakta oss.", + "booking.confirmation.title": "Bokningsbekräftelse", "booking.guests": "Max {nrOfGuests, plural, one {# gäst} other {# gäster}}", "booking.nights": "{totalNights, plural, one {# natt} other {# nätter}}", "booking.rooms": "{totalRooms, plural, one {# rum} other {# rum}}", @@ -457,6 +462,9 @@ "breakfast.price.free": "{amount} {currency} 0 {currency}/natt", "by": "innan", "characters": "tecken", + "filters.nohotel.heading": "Inga rum matchade dina filter", + "filters.nohotel.text": "Det verkar som att inga hotell matchar dina filter. Prova att justera din sökning för att hitta den perfekta vistelsen.", + "from": "från", "guaranteeing": "garanterar", "guest": "gäst", "guests": "gäster", @@ -477,6 +485,7 @@ "points": "poäng", "room type": "rumtyp", "room types": "rumstyper", + "signup.terms": "Genom att registrera dig accepterar du Scandic Friends Användarvillkor. Ditt medlemskap gäller tills vidare och du kan när som helst säga upp ditt medlemskap genom att skicka ett mejl till Scandics kundtjänst", "signupPage.terms": "Ja, jag accepterar villkoren för Scandic Friends och förstår att Scandic kommer att behandla mina personuppgifter i enlighet med Scandics integritetspolicy.", "special character": "speciell karaktär", "spendable points expiring by": "{points} poäng förfaller {date}", @@ -485,5 +494,7 @@ "types": "typer", "uppercase letter": "stor bokstav", "{amount} out of {total}": "{amount} av {total}", - "{amount} {currency}": "{amount} {currency}" + "{amount} {currency}": "{amount} {currency}", + "{card} ending with {cardno}": "{card} som slutar på {cardno}", + "{difference}{amount} {currency}": "{difference}{amount} {currency}" } From ca0bac2feee066dbf8f985fdfa114b852788d299 Mon Sep 17 00:00:00 2001 From: Chuma McPhoy Date: Mon, 2 Dec 2024 10:20:55 +0100 Subject: [PATCH 52/52] fix(SW-360): update signup routes based on requst from content team --- constants/routes/signup.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/constants/routes/signup.ts b/constants/routes/signup.ts index 4c63cc47d..3779c6e82 100644 --- a/constants/routes/signup.ts +++ b/constants/routes/signup.ts @@ -1,12 +1,12 @@ import { LangRoute } from "@/types/routes" export const signup: LangRoute = { - en: "/en/scandic-friends/join-scandic-friends", + en: "/en/scandic-friends/join", sv: "/sv/scandic-friends/bli-medlem", - no: "/no/scandic-friends/registrer-deg-for-scandic-friends", - fi: "/fi/scandic-friends/liity-scandic-friends-ohjelmaan", - da: "/da/scandic-friends/tilmeld-dig-scandic-friends", - de: "/de/scandic-friends/werden-sie-mitglied-von-scandic-friends", + no: "/no/scandic-friends/registrer-deg", + fi: "/fi/scandic-friends/liity-jaseneksi", + da: "/da/scandic-friends/tilmeld-dig", + de: "/de/scandic-friends/mitglied-werden", } export const signupVerify: LangRoute = {