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

@@ -85,7 +85,7 @@ export default function RoomCard({
)
)
const { name, roomSize, occupancy, images } = selectedRoom || {}
const { name, roomSize, totalOccupancy, images } = selectedRoom || {}
const freeCancelation = intl.formatMessage({ id: "Free cancellation" })
const nonRefundable = intl.formatMessage({ id: "Non-refundable" })
@@ -150,13 +150,13 @@ export default function RoomCard({
</div>
<div className={styles.specification}>
{occupancy?.total && (
{totalOccupancy && (
<Caption color="uiTextMediumContrast" className={styles.guests}>
{intl.formatMessage(
{
id: "booking.guests",
},
{ nrOfGuests: occupancy.total }
{ max: totalOccupancy.max, range: totalOccupancy.range }
)}
</Caption>
)}