Merged in feat/SW-1207-parking-teaser (pull request #1217)
Feat(SW-1207): Add parking elevator pitch to hotel sidepeek * feat(SW-1207): Add parking elevator pitch to hotel sidepeek * fix(SW-1207): remove optional from parking elevator pitch Approved-by: Erik Tiekstra Approved-by: Fredrik Thorsson
This commit is contained in:
@@ -17,7 +17,8 @@ import { IconName } from "@/types/components/icon"
|
|||||||
|
|
||||||
export default async function ParkingAmenity({
|
export default async function ParkingAmenity({
|
||||||
parking,
|
parking,
|
||||||
hasParkingPage,
|
parkingElevatorPitch,
|
||||||
|
hasExtraParkingPage,
|
||||||
}: ParkingAmenityProps) {
|
}: ParkingAmenityProps) {
|
||||||
const intl = await getIntl()
|
const intl = await getIntl()
|
||||||
|
|
||||||
@@ -29,6 +30,7 @@ export default async function ParkingAmenity({
|
|||||||
trackingId="amenities:parking"
|
trackingId="amenities:parking"
|
||||||
>
|
>
|
||||||
<div className={styles.wrapper}>
|
<div className={styles.wrapper}>
|
||||||
|
{parkingElevatorPitch}
|
||||||
{parking.map((data) => (
|
{parking.map((data) => (
|
||||||
<div key={data.type} className={styles.information}>
|
<div key={data.type} className={styles.information}>
|
||||||
<div className={styles.list}>
|
<div className={styles.list}>
|
||||||
@@ -84,14 +86,14 @@ export default async function ParkingAmenity({
|
|||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
{hasParkingPage && (
|
{hasExtraParkingPage && (
|
||||||
<Button
|
<Button
|
||||||
className={styles.parkingPageLink}
|
className={styles.parkingPageLink}
|
||||||
theme="base"
|
theme="base"
|
||||||
intent="secondary"
|
intent="secondary"
|
||||||
asChild
|
asChild
|
||||||
>
|
>
|
||||||
{/* Not decided how to handle linking to separate parking page */}
|
{/* TODO: Add URL to separate parking page */}
|
||||||
<Link href="#" color="burgundy" weight="bold">
|
<Link href="#" color="burgundy" weight="bold">
|
||||||
{intl.formatMessage({ id: "About parking" })}
|
{intl.formatMessage({ id: "About parking" })}
|
||||||
</Link>
|
</Link>
|
||||||
|
|||||||
@@ -58,8 +58,11 @@ export default async function AmenitiesSidePeek({
|
|||||||
title={intl.formatMessage({ id: "Amenities" })}
|
title={intl.formatMessage({ id: "Amenities" })}
|
||||||
>
|
>
|
||||||
<Accordion>
|
<Accordion>
|
||||||
{parking.length ? <ParkingAmenity parking={parking} /> : null}
|
<ParkingAmenity
|
||||||
|
parking={parking.parking}
|
||||||
|
parkingElevatorPitch={parking.parkingElevatorPitch}
|
||||||
|
hasExtraParkingPage={parking.hasExtraParkingPage}
|
||||||
|
/>
|
||||||
{breakfastOpeningHours && (
|
{breakfastOpeningHours && (
|
||||||
<BreakfastAmenity
|
<BreakfastAmenity
|
||||||
openingHours={breakfastOpeningHours.openingHours}
|
openingHours={breakfastOpeningHours.openingHours}
|
||||||
|
|||||||
@@ -85,6 +85,8 @@ export default async function HotelPage({ hotelId }: HotelPageProps) {
|
|||||||
conferencesAndMeetings,
|
conferencesAndMeetings,
|
||||||
hotelRoomElevatorPitchText,
|
hotelRoomElevatorPitchText,
|
||||||
gallery,
|
gallery,
|
||||||
|
hotelParking,
|
||||||
|
displayWebPage,
|
||||||
} = additionalData
|
} = additionalData
|
||||||
|
|
||||||
const images = gallery?.smallerImages
|
const images = gallery?.smallerImages
|
||||||
@@ -208,7 +210,11 @@ export default async function HotelPage({ hotelId }: HotelPageProps) {
|
|||||||
<SidePeekProvider>
|
<SidePeekProvider>
|
||||||
<AmenitiesSidePeek
|
<AmenitiesSidePeek
|
||||||
amenitiesList={detailedFacilities}
|
amenitiesList={detailedFacilities}
|
||||||
parking={parking}
|
parking={{
|
||||||
|
parking: parking,
|
||||||
|
parkingElevatorPitch: hotelParking.elevatorPitch,
|
||||||
|
hasExtraParkingPage: displayWebPage.parking,
|
||||||
|
}}
|
||||||
checkInInformation={hotelFacts.checkin}
|
checkInInformation={hotelFacts.checkin}
|
||||||
accessibility={hotelFacts.hotelInformation.accessibility}
|
accessibility={hotelFacts.hotelInformation.accessibility}
|
||||||
restaurants={restaurants}
|
restaurants={restaurants}
|
||||||
|
|||||||
@@ -29,8 +29,8 @@ export const restaurantsOverviewPageSchema = z.object({
|
|||||||
restaurantsContentDescriptionMedium: z.string().optional(),
|
restaurantsContentDescriptionMedium: z.string().optional(),
|
||||||
})
|
})
|
||||||
|
|
||||||
const extraPageSchema = z.object({
|
export const extraPageSchema = z.object({
|
||||||
elevatorPitch: z.string().optional(),
|
elevatorPitch: z.string(),
|
||||||
mainBody: z.string().optional(),
|
mainBody: z.string().optional(),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -3,10 +3,11 @@ import type {
|
|||||||
RestaurantData,
|
RestaurantData,
|
||||||
RestaurantOpeningHours,
|
RestaurantOpeningHours,
|
||||||
} from "@/types/hotel"
|
} from "@/types/hotel"
|
||||||
|
import type { ParkingAmenityProps } from "./parking"
|
||||||
|
|
||||||
export type AmenitiesSidePeekProps = {
|
export type AmenitiesSidePeekProps = {
|
||||||
amenitiesList: Hotel["detailedFacilities"]
|
amenitiesList: Hotel["detailedFacilities"]
|
||||||
parking: Hotel["parking"]
|
parking: ParkingAmenityProps
|
||||||
checkInInformation: Hotel["hotelFacts"]["checkin"]
|
checkInInformation: Hotel["hotelFacts"]["checkin"]
|
||||||
accessibility: Hotel["hotelFacts"]["hotelInformation"]["accessibility"]
|
accessibility: Hotel["hotelFacts"]["hotelInformation"]["accessibility"]
|
||||||
restaurants: RestaurantData[]
|
restaurants: RestaurantData[]
|
||||||
|
|||||||
@@ -8,7 +8,8 @@ export enum Periods {
|
|||||||
|
|
||||||
export type ParkingAmenityProps = {
|
export type ParkingAmenityProps = {
|
||||||
parking: Hotel["parking"]
|
parking: Hotel["parking"]
|
||||||
hasParkingPage?: boolean
|
parkingElevatorPitch: string
|
||||||
|
hasExtraParkingPage: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ParkingListProps = {
|
export type ParkingListProps = {
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import type {
|
|||||||
} from "@/server/routers/hotels/output"
|
} from "@/server/routers/hotels/output"
|
||||||
import type {
|
import type {
|
||||||
additionalDataSchema,
|
additionalDataSchema,
|
||||||
|
extraPageSchema,
|
||||||
facilitySchema,
|
facilitySchema,
|
||||||
} from "@/server/routers/hotels/schemas/additionalData"
|
} from "@/server/routers/hotels/schemas/additionalData"
|
||||||
import type { imageSchema } from "@/server/routers/hotels/schemas/image"
|
import type { imageSchema } from "@/server/routers/hotels/schemas/image"
|
||||||
@@ -41,6 +42,8 @@ export type CheckInData = z.infer<typeof checkinSchema>
|
|||||||
|
|
||||||
export type AdditionalData = z.infer<typeof additionalDataSchema>
|
export type AdditionalData = z.infer<typeof additionalDataSchema>
|
||||||
|
|
||||||
|
export type ExtraPageSchema = z.infer<typeof extraPageSchema>
|
||||||
|
|
||||||
export type PointOfInterest = z.output<typeof pointOfInterestSchema>
|
export type PointOfInterest = z.output<typeof pointOfInterestSchema>
|
||||||
|
|
||||||
export enum PointOfInterestGroupEnum {
|
export enum PointOfInterestGroupEnum {
|
||||||
|
|||||||
Reference in New Issue
Block a user