diff --git a/components/HotelReservation/SelectRate/RoomSelection/RoomCard/index.tsx b/components/HotelReservation/SelectRate/RoomSelection/RoomCard/index.tsx index 4404b562c..ff6358c16 100644 --- a/components/HotelReservation/SelectRate/RoomSelection/RoomCard/index.tsx +++ b/components/HotelReservation/SelectRate/RoomSelection/RoomCard/index.tsx @@ -4,7 +4,9 @@ import { useIntl } from "react-intl" import { RateDefinition } from "@/server/routers/hotels/output" import FlexibilityOption from "@/components/HotelReservation/SelectRate/RoomSelection/FlexibilityOption" -import { ChevronRightSmallIcon } from "@/components/Icons" +import { ChevronRightSmallIcon, GalleryIcon } from "@/components/Icons" +import Image from "@/components/Image" +import Lightbox from "@/components/Lightbox" import Button from "@/components/TempDesignSystem/Button" import Body from "@/components/TempDesignSystem/Text/Body" import Caption from "@/components/TempDesignSystem/Text/Caption" @@ -51,18 +53,15 @@ export default function RoomCard({ return rateDefinitions.find((def) => def.rateCode === rate?.rateCode) ?.generalTerms } - - const roomSize = roomCategories.find( - (category) => category.name === roomConfiguration.roomType - )?.roomSize - - const occupancy = roomCategories.find( - (category) => category.name === roomConfiguration.roomType - )?.occupancy.total - - const roomDescription = roomCategories.find( + const selectedRoom = roomCategories.find( (room) => room.name === roomConfiguration.roomType - )?.descriptions.short + ) + + const roomSize = selectedRoom?.roomSize + const occupancy = selectedRoom?.occupancy.total + const roomDescription = selectedRoom?.descriptions.short + const images = selectedRoom?.images + const mainImage = images?.[0] return (
@@ -78,7 +77,10 @@ export default function RoomCard({ )} - {roomSize?.min}-{roomSize?.max} m² + {roomSize?.min === roomSize?.max + ? roomSize?.min + : `${roomSize?.min}-${roomSize?.max}`} + m²
) } diff --git a/components/HotelReservation/SelectRate/RoomSelection/RoomCard/roomCard.module.css b/components/HotelReservation/SelectRate/RoomSelection/RoomCard/roomCard.module.css index 0e794cf94..25add23b5 100644 --- a/components/HotelReservation/SelectRate/RoomSelection/RoomCard/roomCard.module.css +++ b/components/HotelReservation/SelectRate/RoomSelection/RoomCard/roomCard.module.css @@ -44,6 +44,7 @@ display: flex; flex-direction: column; gap: var(--Spacing-x1); + margin-bottom: var(--Spacing-x2); } .name { @@ -57,6 +58,12 @@ border-radius: var(--Corner-radius-Medium) var(--Corner-radius-Medium) 0 0; } +.flexibilityOptions { + display: flex; + flex-direction: column; + gap: var(--Spacing-x2); +} + .roomsLeft { position: absolute; top: 12px; @@ -65,3 +72,22 @@ padding: var(--Spacing-x-half) var(--Spacing-x1); border-radius: var(--Corner-radius-Small); } + +.imageContainer { + min-height: 185px; + position: relative; +} + +.galleryIcon { + position: absolute; + bottom: 16px; + right: 16px; + height: 24px; + background-color: rgba(64, 57, 55, 0.9); + padding: 0 var(--Spacing-x-half); + border-radius: var(--Corner-radius-Small); + cursor: pointer; + display: flex; + align-items: center; + gap: var(--Spacing-x-quarter); +} diff --git a/components/HotelReservation/SelectRate/RoomSelection/index.tsx b/components/HotelReservation/SelectRate/RoomSelection/index.tsx index 402ab81b9..1f5ad91d3 100644 --- a/components/HotelReservation/SelectRate/RoomSelection/index.tsx +++ b/components/HotelReservation/SelectRate/RoomSelection/index.tsx @@ -1,8 +1,5 @@ "use client" import { useRouter, useSearchParams } from "next/navigation" -import { useIntl } from "react-intl" - -import Button from "@/components/TempDesignSystem/Button" import RoomCard from "./RoomCard" @@ -16,7 +13,6 @@ export default function RoomSelection({ }: RoomSelectionProps) { const router = useRouter() const searchParams = useSearchParams() - const intl = useIntl() function handleSubmit(e: React.FormEvent) { e.preventDefault() @@ -44,12 +40,12 @@ export default function RoomSelection({ ))} -
+ {/*
This is summary -
+
*/} ) diff --git a/components/Icons/Gallery.tsx b/components/Icons/Gallery.tsx new file mode 100644 index 000000000..5bf1bc8b6 --- /dev/null +++ b/components/Icons/Gallery.tsx @@ -0,0 +1,36 @@ +import { iconVariants } from "./variants" + +import type { IconProps } from "@/types/components/icon" + +export default function GalleryIcon({ className, color, ...props }: IconProps) { + const classNames = iconVariants({ className, color }) + return ( + + + + + + + + + ) +} diff --git a/components/Icons/get-icon-by-icon-name.ts b/components/Icons/get-icon-by-icon-name.ts index 2f89aa6db..15752b50c 100644 --- a/components/Icons/get-icon-by-icon-name.ts +++ b/components/Icons/get-icon-by-icon-name.ts @@ -32,6 +32,7 @@ import { EyeHideIcon, EyeShowIcon, FitnessIcon, + GalleryIcon, GiftIcon, GlobeIcon, HouseIcon, @@ -124,6 +125,8 @@ export function getIconByIconName(icon?: IconName): FC | null { return FacebookIcon case IconName.Fitness: return FitnessIcon + case IconName.Gallery: + return GalleryIcon case IconName.Gift: return GiftIcon case IconName.Globe: diff --git a/components/Icons/index.tsx b/components/Icons/index.tsx index ba86f0784..e8a0b6433 100644 --- a/components/Icons/index.tsx +++ b/components/Icons/index.tsx @@ -31,6 +31,7 @@ export { default as ErrorCircleIcon } from "./ErrorCircle" export { default as EyeHideIcon } from "./EyeHide" export { default as EyeShowIcon } from "./EyeShow" export { default as FitnessIcon } from "./Fitness" +export { default as GalleryIcon } from "./Gallery" export { default as GiftIcon } from "./Gift" export { default as GlobeIcon } from "./Globe" export { default as HeartIcon } from "./Heart" diff --git a/components/TempDesignSystem/Text/Footnote/footnote.module.css b/components/TempDesignSystem/Text/Footnote/footnote.module.css index b3ae66d80..4c2e36b7f 100644 --- a/components/TempDesignSystem/Text/Footnote/footnote.module.css +++ b/components/TempDesignSystem/Text/Footnote/footnote.module.css @@ -66,3 +66,7 @@ .uiTextPlaceholder { color: var(--UI-Text-Placeholder); } + +.white { + color: var(--Main-Grey-White); +} diff --git a/components/TempDesignSystem/Text/Footnote/variants.ts b/components/TempDesignSystem/Text/Footnote/variants.ts index 16f5b3185..1d4ad921e 100644 --- a/components/TempDesignSystem/Text/Footnote/variants.ts +++ b/components/TempDesignSystem/Text/Footnote/variants.ts @@ -11,6 +11,7 @@ const config = { peach50: styles.peach50, uiTextMediumContrast: styles.uiTextMediumContrast, uiTextPlaceholder: styles.uiTextPlaceholder, + white: styles.white, }, textAlign: { center: styles.center, diff --git a/types/components/icon.ts b/types/components/icon.ts index 174d95cf6..f50a79259 100644 --- a/types/components/icon.ts +++ b/types/components/icon.ts @@ -36,6 +36,7 @@ export enum IconName { EyeShow = "EyeShow", Facebook = "Facebook", Fitness = "Fitness", + Gallery = "Gallery", Gift = "Gift", Globe = "Globe", House = "House",