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,
bedType: r.bedType,
breakfast: r.breakfast,
roomFeatures: r.roomFeatures,
}))}
totalPrice={totalPrice}
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 { Price } from "@/types/components/hotelReservation/price"
import type { Child } from "@/types/components/hotelReservation/selectRate/selectRate"
import type { Packages } from "@/types/requests/packages"
function Row({
label,
@@ -70,6 +71,7 @@ interface PriceDetailsTableProps {
roomPrice: RoomPrice
bedType?: BedTypeSchema
breakfast?: BreakfastPackage | false
roomFeatures?: Packages | null
}[]
totalPrice: Price
vat: number
@@ -117,6 +119,19 @@ export default function PriceDetailsTable({
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 ? (
<Row
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 { Price } from "@/types/components/hotelReservation/price"
import type { Child } from "@/types/components/hotelReservation/selectRate/selectRate"
import type { Packages } from "@/types/requests/packages"
interface PriceDetailsModalProps {
fromDate: string
@@ -24,6 +25,7 @@ interface PriceDetailsModalProps {
roomPrice: RoomPrice
bedType?: BedTypeSchema
breakfast?: BreakfastPackage | false
roomFeatures?: Packages | null
}[]
totalPrice: Price
vat: number