diff --git a/components/ContentType/HotelPage/SidePeeks/MeetingsAndConferences/index.tsx b/components/ContentType/HotelPage/SidePeeks/MeetingsAndConferences/index.tsx new file mode 100644 index 000000000..637c4533c --- /dev/null +++ b/components/ContentType/HotelPage/SidePeeks/MeetingsAndConferences/index.tsx @@ -0,0 +1,59 @@ +import { meetingsAndConferences } from "@/constants/routes/hotelPageParams" + +import Image from "@/components/Image" +import Button from "@/components/TempDesignSystem/Button" +import Link from "@/components/TempDesignSystem/Link" +import SidePeek from "@/components/TempDesignSystem/SidePeek" +import Subtitle from "@/components/TempDesignSystem/Text/Subtitle" +import Title from "@/components/TempDesignSystem/Text/Title" +import { getIntl } from "@/i18n" +import { getLang } from "@/i18n/serverContext" + +import styles from "./meetingsAndConferences.module.css" + +import { MeetingsAndConferencesSidePeekProps } from "@/types/components/hotelPage/sidepeek/meetingsAndConferences" + +export default async function MeetingsAndConferencesSidePeek({ + meetingFacilities, +}: MeetingsAndConferencesSidePeekProps) { + const lang = getLang() + const intl = await getIntl() + return ( + +
+ + + {intl.formatMessage({ id: "Creative spaces for meetings" })} + + +
+ + +
{meetingFacilities?.headingText}
+
+
+ +
+
+
+ ) +} diff --git a/components/ContentType/HotelPage/SidePeeks/MeetingsAndConferences/meetingsAndConferences.module.css b/components/ContentType/HotelPage/SidePeeks/MeetingsAndConferences/meetingsAndConferences.module.css new file mode 100644 index 000000000..b150919a4 --- /dev/null +++ b/components/ContentType/HotelPage/SidePeeks/MeetingsAndConferences/meetingsAndConferences.module.css @@ -0,0 +1,35 @@ +.wrapper { + display: flex; + flex-direction: column; + gap: var(--Spacing-x4); + margin-bottom: calc( + var(--Spacing-x4) * 2 + 80px + ); /* Creates space between the wrapper and buttonContainer */ +} + +.information { + display: grid; + grid-template-columns: 1fr 1fr; + grid-template-rows: 1fr 1fr; + gap: var(--Spacing-x2); +} + +.image { + width: 100%; + height: 175px; + object-fit: cover; +} + +.text { + grid-column: 1 / 3; +} + +.buttonContainer { + background-color: var(--Base-Background-Primary-Normal); + border-top: 1px solid var(--Base-Border-Subtle); + padding: var(--Spacing-x4) var(--Spacing-x2); + width: 100%; + position: absolute; + left: 0; + bottom: 0; +} diff --git a/i18n/dictionaries/da.json b/i18n/dictionaries/da.json index eefc1cd1d..3a66fc700 100644 --- a/i18n/dictionaries/da.json +++ b/i18n/dictionaries/da.json @@ -95,6 +95,7 @@ "Could not find requested resource": "Kunne ikke finde den anmodede ressource", "Country": "Land", "Country code": "Landekode", + "Creative spaces for meetings": "Kreative rum til møder", "Credit card": "Kreditkort", "Credit card deleted successfully": "Kreditkort blev slettet", "Currency Code": "DKK", diff --git a/i18n/dictionaries/de.json b/i18n/dictionaries/de.json index 8c5352c9b..8768310d2 100644 --- a/i18n/dictionaries/de.json +++ b/i18n/dictionaries/de.json @@ -95,6 +95,7 @@ "Could not find requested resource": "Die angeforderte Ressource konnte nicht gefunden werden.", "Country": "Land", "Country code": "Landesvorwahl", + "Creative spaces for meetings": "Kreative Räume für Meetings", "Credit card": "Kreditkarte", "Credit card deleted successfully": "Kreditkarte erfolgreich gelöscht", "Currency Code": "EUR", diff --git a/i18n/dictionaries/en.json b/i18n/dictionaries/en.json index 91c371258..4193038a4 100644 --- a/i18n/dictionaries/en.json +++ b/i18n/dictionaries/en.json @@ -103,6 +103,7 @@ "Could not find requested resource": "Could not find requested resource", "Country": "Country", "Country code": "Country code", + "Creative spaces for meetings": "Creative spaces for meetings", "Credit card": "Credit card", "Credit card deleted successfully": "Credit card deleted successfully", "Currency Code": "EUR", diff --git a/i18n/dictionaries/fi.json b/i18n/dictionaries/fi.json index 086e635de..4a0ca7811 100644 --- a/i18n/dictionaries/fi.json +++ b/i18n/dictionaries/fi.json @@ -95,6 +95,7 @@ "Could not find requested resource": "Pyydettyä resurssia ei löytynyt", "Country": "Maa", "Country code": "Maatunnus", + "Creative spaces for meetings": "Luovia tiloja kokouksille", "Credit card": "Luottokortti", "Credit card deleted successfully": "Luottokortti poistettu onnistuneesti", "Currency Code": "EUR", diff --git a/i18n/dictionaries/no.json b/i18n/dictionaries/no.json index 6de6aa1e4..8f849219f 100644 --- a/i18n/dictionaries/no.json +++ b/i18n/dictionaries/no.json @@ -95,6 +95,7 @@ "Could not find requested resource": "Kunne ikke finne den forespurte ressursen", "Country": "Land", "Country code": "Landskode", + "Creative spaces for meetings": "Kreative rom for møter", "Credit card deleted successfully": "Kredittkort slettet", "Currency Code": "NOK", "Current password": "Nåværende passord", diff --git a/i18n/dictionaries/sv.json b/i18n/dictionaries/sv.json index 31ad5c056..620c4c747 100644 --- a/i18n/dictionaries/sv.json +++ b/i18n/dictionaries/sv.json @@ -95,6 +95,7 @@ "Could not find requested resource": "Det gick inte att hitta den begärda resursen", "Country": "Land", "Country code": "Landskod", + "Creative spaces for meetings": "Kreativa utrymmen för möten", "Credit card deleted successfully": "Kreditkort har tagits bort", "Currency Code": "SEK", "Current password": "Nuvarande lösenord", diff --git a/server/routers/hotels/query.ts b/server/routers/hotels/query.ts index e91905c6b..f91b4a762 100644 --- a/server/routers/hotels/query.ts +++ b/server/routers/hotels/query.ts @@ -210,6 +210,87 @@ export const getHotelData = cache( ) export const hotelQueryRouter = router({ + get: contentStackUidWithServiceProcedure.query(async ({ ctx }) => { + const { lang, uid } = ctx + + const contentstackData = await getContentstackData(lang, uid) + const hotelId = contentstackData?.hotel_page_id + + if (!hotelId) { + throw notFound(`Hotel not found for uid: ${uid}`) + } + + const hotelData = await getHotelData( + { + hotelId, + language: ctx.lang, + }, + ctx.serviceToken + ) + + if (!hotelData) { + throw notFound() + } + + const included = hotelData.included || [] + + const hotelAttributes = hotelData.data.attributes + const images = hotelAttributes.gallery?.smallerImages + const hotelAlerts = hotelAttributes.specialAlerts + + const roomCategories = included + ? included.filter((item) => item.type === "roomcategories") + : [] + + const activities = contentstackData?.content + ? contentstackData?.content[0] + : null + + const facilities: Facility[] = [ + { + ...hotelData.data.attributes.restaurantImages, + id: FacilityCardTypeEnum.restaurant, + headingText: + hotelData?.data.attributes.restaurantImages?.headingText ?? "", + heroImages: + hotelData?.data.attributes.restaurantImages?.heroImages ?? [], + }, + { + ...hotelData.data.attributes.conferencesAndMeetings, + id: FacilityCardTypeEnum.conference, + headingText: + hotelData?.data.attributes.conferencesAndMeetings?.headingText ?? "", + heroImages: + hotelData?.data.attributes.conferencesAndMeetings?.heroImages ?? [], + }, + { + ...hotelData.data.attributes.healthAndWellness, + id: FacilityCardTypeEnum.wellness, + headingText: + hotelData?.data.attributes.healthAndWellness?.headingText ?? "", + heroImages: + hotelData?.data.attributes.healthAndWellness?.heroImages ?? [], + }, + ] + + return { + hotelId, + hotelName: hotelAttributes.name, + hotelDescription: hotelAttributes.hotelContent.texts.descriptions.short, + hotelLocation: hotelAttributes.location, + hotelAddress: hotelAttributes.address, + hotelRatings: hotelAttributes.ratings, + hotelDetailedFacilities: hotelAttributes.detailedFacilities, + hotelImages: images, + pointsOfInterest: hotelAttributes.pointsOfInterest, + roomCategories, + activitiesCard: activities?.upcoming_activities_card, + facilities, + alerts: hotelAlerts, + faq: contentstackData?.faq, + healthFacilities: hotelAttributes.healthFacilities, + } + }), availability: router({ hotels: serviceProcedure .input(getHotelsAvailabilityInputSchema) diff --git a/types/components/hotelPage/sidepeek/meetingsAndConferences.ts b/types/components/hotelPage/sidepeek/meetingsAndConferences.ts new file mode 100644 index 000000000..abbfc8214 --- /dev/null +++ b/types/components/hotelPage/sidepeek/meetingsAndConferences.ts @@ -0,0 +1,5 @@ +import type { Hotel } from "@/types/hotel" + +export type MeetingsAndConferencesSidePeekProps = { + meetingFacilities: Hotel["conferencesAndMeetings"] +}