feat(SW-914): add checkin information
This commit is contained in:
@@ -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 (
|
||||
<AccordionItem
|
||||
title={`${intl.formatMessage({ id: "Check-in" })}/${intl.formatMessage({ id: "Check-out" })}`}
|
||||
icon={IconName.Business}
|
||||
>
|
||||
<Body textTransform="bold">{intl.formatMessage({ id: "Times" })}</Body>
|
||||
<Body color="uiTextHighContrast">{`${intl.formatMessage({ id: "Check in from" })}: ${checkInTime}`}</Body>
|
||||
<Body color="uiTextHighContrast">{`${intl.formatMessage({ id: "Check out at latest" })}: ${checkOutTime}`}</Body>
|
||||
</AccordionItem>
|
||||
)
|
||||
}
|
||||
@@ -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 (
|
||||
<AccordionItem
|
||||
title={`${intl.formatMessage({ id: "Check-in" })}/${intl.formatMessage({ id: "Check-out" })}`}
|
||||
icon={IconName.Business}
|
||||
>
|
||||
Check in / check out information
|
||||
</AccordionItem>
|
||||
)
|
||||
}
|
||||
@@ -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 (
|
||||
<AccordionItem
|
||||
title={intl.formatMessage({ id: "Parking" })}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export { default as AccessibilityAmenity } from "./Accessibility"
|
||||
export { default as BreakfastAmenity } from "./Breakfast"
|
||||
export { default as CheckInCheckOutAmenity } from "./CheckInCheckOut"
|
||||
export { default as CheckInAmenity } from "./CheckIn"
|
||||
export { default as ParkingAmenity } from "./Parking"
|
||||
|
||||
@@ -8,7 +8,7 @@ import { getLang } from "@/i18n/serverContext"
|
||||
import {
|
||||
AccessibilityAmenity,
|
||||
BreakfastAmenity,
|
||||
CheckInCheckOutAmenity,
|
||||
CheckInAmenity,
|
||||
ParkingAmenity,
|
||||
} from "./AccordionAmenities"
|
||||
import Amenity from "./Amenity"
|
||||
@@ -18,11 +18,12 @@ import type { AmenitiesSidePeekProps } from "@/types/components/hotelPage/sidepe
|
||||
export default async function AmenitiesSidePeek({
|
||||
amenitiesList,
|
||||
parking,
|
||||
checkInInformation,
|
||||
}: AmenitiesSidePeekProps) {
|
||||
const lang = getLang()
|
||||
const intl = await getIntl()
|
||||
|
||||
const filteredAmenities = amenitiesList?.filter((filter) => {
|
||||
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" })}
|
||||
>
|
||||
<Accordion>
|
||||
{parking?.length ? <ParkingAmenity parking={parking} /> : null}
|
||||
{parking.length ? <ParkingAmenity parking={parking} /> : null}
|
||||
<BreakfastAmenity />
|
||||
<CheckInCheckOutAmenity />
|
||||
<CheckInAmenity checkInInformation={checkInInformation} />
|
||||
<AccessibilityAmenity />
|
||||
<Amenity filteredAmenities={filteredAmenities} />
|
||||
</Accordion>
|
||||
|
||||
@@ -31,7 +31,7 @@ export default async function Facility({ data }: FacilityProps) {
|
||||
</Subtitle>
|
||||
<div>
|
||||
<Subtitle type="two" color="uiTextHighContrast">
|
||||
{intl.formatMessage({ id: " Opening Hours" })}
|
||||
{intl.formatMessage({ id: "Opening Hours" })}
|
||||
</Subtitle>
|
||||
<div className={styles.openingHours}>
|
||||
<Body color="uiTextHighContrast">
|
||||
|
||||
@@ -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") || []
|
||||
|
||||
Reference in New Issue
Block a user