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,
|
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}
|
||||||
|
|||||||
@@ -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}
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user