Merged in fix/SW-1645-price-details-popup-missing-data (pull request #1413)

fix(SW-1645): added room features to price detail popup

* fix(SW-1645): added room features to price detail popup


Approved-by: Michael Zetterberg
Approved-by: Christian Andolf
This commit is contained in:
Tobias Johansson
2025-02-27 09:06:59 +00:00
parent 895dce2f72
commit b3cd907584
3 changed files with 18 additions and 0 deletions

View File

@@ -359,6 +359,7 @@ export default function SummaryUI({
roomType: r.roomType, roomType: r.roomType,
bedType: r.bedType, bedType: r.bedType,
breakfast: r.breakfast, breakfast: r.breakfast,
roomFeatures: r.roomFeatures,
}))} }))}
totalPrice={totalPrice} totalPrice={totalPrice}
vat={vat} vat={vat}

View File

@@ -17,6 +17,7 @@ import type { BreakfastPackage } from "@/types/components/hotelReservation/enter
import type { RoomPrice } from "@/types/components/hotelReservation/enterDetails/details" import type { RoomPrice } from "@/types/components/hotelReservation/enterDetails/details"
import type { Price } from "@/types/components/hotelReservation/price" import type { Price } from "@/types/components/hotelReservation/price"
import type { Child } from "@/types/components/hotelReservation/selectRate/selectRate" import type { Child } from "@/types/components/hotelReservation/selectRate/selectRate"
import type { Packages } from "@/types/requests/packages"
function Row({ function Row({
label, label,
@@ -70,6 +71,7 @@ interface PriceDetailsTableProps {
roomPrice: RoomPrice roomPrice: RoomPrice
bedType?: BedTypeSchema bedType?: BedTypeSchema
breakfast?: BreakfastPackage | false breakfast?: BreakfastPackage | false
roomFeatures?: Packages | null
}[] }[]
totalPrice: Price totalPrice: Price
vat: number vat: number
@@ -117,6 +119,19 @@ export default function PriceDetailsTable({
room.roomPrice.perNight.local.currency room.roomPrice.perNight.local.currency
)} )}
/> />
{room.roomFeatures
? room.roomFeatures.map((feature) => (
<Row
key={feature.code}
label={feature.description}
value={formatPrice(
intl,
0,
room.roomPrice.perStay.local.currency
)}
/>
))
: null}
{room.bedType ? ( {room.bedType ? (
<Row <Row
label={room.bedType.description} label={room.bedType.description}

View File

@@ -13,6 +13,7 @@ import type { BreakfastPackage } from "@/types/components/hotelReservation/enter
import type { RoomPrice } from "@/types/components/hotelReservation/enterDetails/details" import type { RoomPrice } from "@/types/components/hotelReservation/enterDetails/details"
import type { Price } from "@/types/components/hotelReservation/price" import type { Price } from "@/types/components/hotelReservation/price"
import type { Child } from "@/types/components/hotelReservation/selectRate/selectRate" import type { Child } from "@/types/components/hotelReservation/selectRate/selectRate"
import type { Packages } from "@/types/requests/packages"
interface PriceDetailsModalProps { interface PriceDetailsModalProps {
fromDate: string fromDate: string
@@ -24,6 +25,7 @@ interface PriceDetailsModalProps {
roomPrice: RoomPrice roomPrice: RoomPrice
bedType?: BedTypeSchema bedType?: BedTypeSchema
breakfast?: BreakfastPackage | false breakfast?: BreakfastPackage | false
roomFeatures?: Packages | null
}[] }[]
totalPrice: Price totalPrice: Price
vat: number vat: number