feat: SW-2028 Fixed review comments
This commit is contained in:
@@ -7,6 +7,7 @@ import styles from "./specification.module.css"
|
||||
|
||||
import type { SpecificationProps } from "@/types/components/hotelReservation/myStay/receipt"
|
||||
import { RoomPackageCodeEnum } from "@/types/components/hotelReservation/selectRate/roomFilter"
|
||||
import { CurrencyEnum } from "@/types/enums/currency"
|
||||
|
||||
export default async function Specification({
|
||||
ancillaryPackages,
|
||||
@@ -19,10 +20,10 @@ export default async function Specification({
|
||||
(p) => p.type === "Breakfast"
|
||||
)
|
||||
const breakfastTotalPriceInMoney = breakfastPackages
|
||||
.filter((p) => p.currency !== "Points")
|
||||
.filter((p) => p.currency !== CurrencyEnum.POINTS)
|
||||
.reduce((acc, curr) => acc + curr.totalPrice, 0)
|
||||
const breakfastTotalPriceInPoints = breakfastPackages
|
||||
.filter((p) => p.currency === "Points")
|
||||
.filter((p) => p.currency === CurrencyEnum.POINTS)
|
||||
.reduce((acc, curr) => acc + curr.totalPrice, 0)
|
||||
|
||||
const breakfastCount = breakfastPackages.reduce(
|
||||
@@ -138,7 +139,7 @@ export default async function Specification({
|
||||
<dl className={styles.dl}>
|
||||
<Typography variant="Body/Supporting text (caption)/smRegular">
|
||||
<dt>
|
||||
{ancillary.currency !== "Points"
|
||||
{ancillary.currency !== CurrencyEnum.POINTS
|
||||
? intl.formatMessage({ id: "Price including VAT" })
|
||||
: intl.formatMessage({ id: "Price" })}
|
||||
</dt>
|
||||
|
||||
Reference in New Issue
Block a user