Merged in fix/SW-1145-occupancy-room-api-change (pull request #1148)

Fix/SW-1145 occupancy room api change

* fix(SW-1145): change occupancy to min and max

* fix(SW-1145): small edit

* fix(SW-1145): refactor to transform total room occupancy

* fix(SW-1145): remove space

* fix(SW-1145): small fix

* fix(SW-1145): change to max for readability


Approved-by: Erik Tiekstra
Approved-by: Linus Flood
This commit is contained in:
Bianca Widstam
2025-01-08 14:22:01 +00:00
committed by Linus Flood
parent 1018b3ebcd
commit a620be9331
11 changed files with 42 additions and 31 deletions

View File

@@ -16,7 +16,7 @@ import styles from "./roomCard.module.css"
import type { RoomCardProps } from "@/types/components/hotelPage/room"
export function RoomCard({ room }: RoomCardProps) {
const { images, name, roomSize, occupancy } = room
const { images, name, roomSize, totalOccupancy } = room
const intl = useIntl()
const size =
@@ -46,7 +46,11 @@ export function RoomCard({ room }: RoomCardProps) {
<Body color="grey">
{intl.formatMessage(
{ id: "hotelPages.rooms.roomCard.persons" },
{ size, totalOccupancy: occupancy.total }
{
size,
max: totalOccupancy.max,
range: totalOccupancy.range,
}
)}
</Body>
</div>

View File

@@ -17,9 +17,8 @@ import type { RoomSidePeekProps } from "@/types/components/hotelPage/sidepeek/ro
export default async function RoomSidePeek({ room }: RoomSidePeekProps) {
const intl = await getIntl()
const { roomSize, occupancy, descriptions, images } = room
const { roomSize, totalOccupancy, descriptions, images } = room
const roomDescription = descriptions.medium
const totalOccupancy = occupancy.total
// TODO: Not defined where this should lead.
const ctaUrl = ""
@@ -34,7 +33,7 @@ export default async function RoomSidePeek({ room }: RoomSidePeekProps) {
m².{" "}
{intl.formatMessage(
{ id: "booking.accommodatesUpTo" },
{ nrOfGuests: totalOccupancy }
{ range: totalOccupancy.range, max: totalOccupancy.max }
)}
</Body>
<div className={styles.imageContainer}>