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"] +}