Merged in feat/SW-1292-scandic-go-breakfast-information (pull request #1407)
feat/SW-1292-scandic-go-breakfast-information * feat(SW-1292): display breakfast information for scandic go Approved-by: Erik Tiekstra
This commit is contained in:
@@ -1,15 +1,31 @@
|
||||
import OpeningHours from "@/components/OpeningHours"
|
||||
import AccordionItem from "@/components/TempDesignSystem/Accordion/AccordionItem"
|
||||
import Body from "@/components/TempDesignSystem/Text/Body"
|
||||
import { getIntl } from "@/i18n"
|
||||
|
||||
import type { BreakfastAmenityProps } from "@/types/components/hotelPage/sidepeek/amenities"
|
||||
import { IconName } from "@/types/components/icon"
|
||||
import { HotelTypeEnum } from "@/types/enums/hotelType"
|
||||
|
||||
export default async function BreakfastAmenity({
|
||||
openingHours,
|
||||
alternateOpeningHours,
|
||||
hotelType,
|
||||
}: BreakfastAmenityProps) {
|
||||
const intl = await getIntl()
|
||||
|
||||
const accordionContent =
|
||||
hotelType === HotelTypeEnum.ScandicGo ? (
|
||||
<Body>{intl.formatMessage({ id: "All-day breakfast" })}</Body>
|
||||
) : (
|
||||
<OpeningHours
|
||||
openingHours={openingHours!}
|
||||
alternateOpeningHours={alternateOpeningHours!}
|
||||
heading={intl.formatMessage({ id: "Opening hours" })}
|
||||
type="amenities"
|
||||
/>
|
||||
)
|
||||
|
||||
return (
|
||||
<AccordionItem
|
||||
title={intl.formatMessage({ id: "Breakfast" })}
|
||||
@@ -17,12 +33,7 @@ export default async function BreakfastAmenity({
|
||||
variant="sidepeek"
|
||||
trackingId="amenities:breakfast"
|
||||
>
|
||||
<OpeningHours
|
||||
openingHours={openingHours}
|
||||
alternateOpeningHours={alternateOpeningHours}
|
||||
heading={intl.formatMessage({ id: "Opening hours" })}
|
||||
type="amenities"
|
||||
/>
|
||||
{accordionContent}
|
||||
</AccordionItem>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ import FilteredAmenities from "./FilteredAmenities"
|
||||
import { SidepeekSlugs } from "@/types/components/hotelPage/hotelPage"
|
||||
import type { AmenitiesSidePeekProps } from "@/types/components/hotelPage/sidepeek/amenities"
|
||||
import { FacilityEnum } from "@/types/enums/facilities"
|
||||
import { HotelTypeEnum } from "@/types/enums/hotelType"
|
||||
|
||||
export default async function AmenitiesSidePeek({
|
||||
amenitiesList,
|
||||
@@ -20,6 +21,7 @@ export default async function AmenitiesSidePeek({
|
||||
checkInInformation,
|
||||
accessibility,
|
||||
restaurants,
|
||||
hotelType,
|
||||
}: AmenitiesSidePeekProps) {
|
||||
const intl = await getIntl()
|
||||
|
||||
@@ -60,10 +62,11 @@ export default async function AmenitiesSidePeek({
|
||||
parkingElevatorPitch={parking.parkingElevatorPitch}
|
||||
parkingPageUrl={parking.parkingPageUrl}
|
||||
/>
|
||||
{breakfastOpeningHours && (
|
||||
{(breakfastOpeningHours || hotelType === HotelTypeEnum.ScandicGo) && (
|
||||
<BreakfastAmenity
|
||||
openingHours={breakfastOpeningHours.openingHours}
|
||||
alternateOpeningHours={breakfastOpeningHours.alternateOpeningHours}
|
||||
openingHours={breakfastOpeningHours?.openingHours}
|
||||
alternateOpeningHours={breakfastOpeningHours?.alternateOpeningHours}
|
||||
hotelType={hotelType}
|
||||
/>
|
||||
)}
|
||||
<CheckInAmenity checkInInformation={checkInInformation} />
|
||||
|
||||
@@ -81,6 +81,7 @@ export default async function HotelPage({ hotelId }: HotelPageProps) {
|
||||
location,
|
||||
ratings,
|
||||
parking,
|
||||
hotelType,
|
||||
} = hotelData.hotel
|
||||
const restaurants = hotelData.restaurants
|
||||
const roomCategories = hotelData.roomCategories
|
||||
@@ -231,6 +232,7 @@ export default async function HotelPage({ hotelId }: HotelPageProps) {
|
||||
: undefined,
|
||||
}}
|
||||
restaurants={restaurants}
|
||||
hotelType={hotelType}
|
||||
/>
|
||||
<AboutTheHotelSidePeek
|
||||
hotelAddress={address}
|
||||
|
||||
Reference in New Issue
Block a user