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:
@@ -359,6 +359,7 @@ export default function SummaryUI({
|
||||
roomType: r.roomType,
|
||||
bedType: r.bedType,
|
||||
breakfast: r.breakfast,
|
||||
roomFeatures: r.roomFeatures,
|
||||
}))}
|
||||
totalPrice={totalPrice}
|
||||
vat={vat}
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user