Merged in fix/refactor-currency-display (pull request #3434)
fix(SW-3616): Handle EuroBonus point type everywhere * Add tests to formatPrice * formatPrice * More work replacing config with api points type * More work replacing config with api points type * More fixing with currency * maybe actually fixed it * Fix MyStay * Clean up * Fix comments * Merge branch 'master' into fix/refactor-currency-display * Fix calculateTotalPrice for EB points + SF points + cash Approved-by: Joakim Jäderberg
This commit is contained in:
@@ -11,7 +11,7 @@ import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||
|
||||
import useLang from "../../../hooks/useLang"
|
||||
import { useBookingConfirmationStore } from "../../../stores/booking-confirmation"
|
||||
import { ReceiptRoom as Room } from "./Room"
|
||||
import { ReceiptRoom } from "./Room"
|
||||
import TotalPrice from "./TotalPrice"
|
||||
|
||||
import styles from "./receipt.module.css"
|
||||
@@ -69,7 +69,7 @@ export function Receipt() {
|
||||
<Divider color="Border/Divider/Subtle" />
|
||||
|
||||
{filteredRooms.map((room, idx) => (
|
||||
<Room
|
||||
<ReceiptRoom
|
||||
key={room ? room.confirmationNumber : `loader-${idx}`}
|
||||
room={room}
|
||||
roomNumber={idx + 1}
|
||||
|
||||
@@ -60,7 +60,14 @@ export function LinkedReservation({
|
||||
totalBookingPrice,
|
||||
currencyCode
|
||||
)
|
||||
: formatPrice(intl, totalBookingPrice, currencyCode)
|
||||
: formatPrice(
|
||||
intl,
|
||||
totalBookingPrice,
|
||||
currencyCode,
|
||||
undefined,
|
||||
undefined,
|
||||
roomData.pointsType
|
||||
)
|
||||
|
||||
setFormattedTotalCost(formattedTotalCost)
|
||||
}
|
||||
|
||||
@@ -42,7 +42,8 @@ export function mapRoomState(
|
||||
booking.roomPoints,
|
||||
CurrencyEnum.POINTS,
|
||||
booking.roomPrice,
|
||||
booking.currencyCode
|
||||
booking.currencyCode,
|
||||
booking.roomPointType
|
||||
)
|
||||
} else if (booking.cheques) {
|
||||
formattedRoomCost = formatPrice(
|
||||
@@ -72,6 +73,7 @@ export function mapRoomState(
|
||||
childBedPreferences: booking.childBedPreferences,
|
||||
confirmationNumber: booking.confirmationNumber,
|
||||
currencyCode: booking.currencyCode,
|
||||
pointsType: booking.roomPointType,
|
||||
formattedRoomCost,
|
||||
fromDate: booking.checkInDate,
|
||||
name: room.name,
|
||||
|
||||
Reference in New Issue
Block a user