Merged in feat(SW-2083)-missing-booking-codes-scenarios-my-stay (pull request #1680)
Feat(SW-2083) missing booking codes scenarios my stay * feat(SW-2083) Show points instead of reward nights * feat(SW-2083) added support for cheque and voucher for totalPrice Approved-by: Niclas Edenvin
This commit is contained in:
@@ -16,6 +16,7 @@ import IconChip from "@/components/TempDesignSystem/IconChip"
|
||||
import useLang from "@/hooks/useLang"
|
||||
|
||||
import { IconForFeatureCode } from "../../utils"
|
||||
import Points from "../Points"
|
||||
import Price from "../Price"
|
||||
import { hasBreakfastPackage } from "../utils/hasBreakfastPackage"
|
||||
import { mapRoomDetails } from "../utils/mapRoomDetails"
|
||||
@@ -91,6 +92,7 @@ export default function MultiRoom({
|
||||
totalPrice: isBookingCancelled ? 0 : bookingInfo.totalPrice,
|
||||
currencyCode: bookingInfo.currencyCode,
|
||||
isMainBooking: false,
|
||||
roomPoints: bookingInfo.roomPoints,
|
||||
})
|
||||
|
||||
// Add room details to the store
|
||||
@@ -120,10 +122,13 @@ export default function MultiRoom({
|
||||
confirmationNumber,
|
||||
cancellationNumber,
|
||||
hotelId,
|
||||
roomPoints,
|
||||
roomPrice,
|
||||
packages,
|
||||
rateDefinition,
|
||||
isCancelled,
|
||||
priceType,
|
||||
vouchers,
|
||||
} = multiRoom
|
||||
|
||||
const fromDate = dt(checkInDate).locale(lang)
|
||||
@@ -293,11 +298,24 @@ export default function MultiRoom({
|
||||
<Typography variant="Body/Lead text">
|
||||
<p>{intl.formatMessage({ id: "Room total" })}</p>
|
||||
</Typography>
|
||||
<Price
|
||||
price={isCancelled ? 0 : roomPrice.perStay.local.price}
|
||||
variant="Body/Paragraph/mdBold"
|
||||
isMember={rateDefinition.isMemberRate}
|
||||
/>
|
||||
{priceType === "points" ? (
|
||||
<Points points={roomPoints} variant="Body/Paragraph/mdBold" />
|
||||
) : priceType === "voucher" ? (
|
||||
<Typography variant="Body/Paragraph/mdBold">
|
||||
<p>
|
||||
{intl.formatMessage(
|
||||
{ id: "{count} voucher" },
|
||||
{ count: vouchers }
|
||||
)}
|
||||
</p>
|
||||
</Typography>
|
||||
) : (
|
||||
<Price
|
||||
price={isCancelled ? 0 : roomPrice.perStay.local.price}
|
||||
variant="Body/Paragraph/mdBold"
|
||||
isMember={rateDefinition.isMemberRate}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user