fix: align price formatting
This commit is contained in:
@@ -18,7 +18,7 @@ import Body from "@/components/TempDesignSystem/Text/Body"
|
||||
import Caption from "@/components/TempDesignSystem/Text/Caption"
|
||||
import Subtitle from "@/components/TempDesignSystem/Text/Subtitle"
|
||||
import useLang from "@/hooks/useLang"
|
||||
import { getNights } from "@/utils/dateFormatting"
|
||||
import { formatPrice } from "@/utils/numberFormatting"
|
||||
|
||||
import Modal from "../../Modal"
|
||||
import PriceDetailsTable from "../PriceDetailsTable"
|
||||
@@ -148,10 +148,11 @@ export default function SummaryUI({
|
||||
<div className={styles.entry}>
|
||||
<Body color="uiTextHighContrast">{roomType}</Body>
|
||||
<Body color={showMemberPrice ? "red" : "uiTextHighContrast"}>
|
||||
{intl.formatNumber(roomPrice.perStay.local.price, {
|
||||
currency: roomPrice.perStay.local.currency,
|
||||
style: "currency",
|
||||
})}
|
||||
{formatPrice(
|
||||
intl,
|
||||
roomPrice.perStay.local.price,
|
||||
roomPrice.perStay.local.currency
|
||||
)}
|
||||
</Body>
|
||||
</div>
|
||||
<Caption color="uiTextMediumContrast">
|
||||
@@ -196,10 +197,11 @@ export default function SummaryUI({
|
||||
</div>
|
||||
|
||||
<Body color="uiTextHighContrast">
|
||||
{intl.formatNumber(parseInt(roomPackage.localPrice.price), {
|
||||
currency: roomPackage.localPrice.currency,
|
||||
style: "currency",
|
||||
})}
|
||||
{formatPrice(
|
||||
intl,
|
||||
parseInt(roomPackage.localPrice.price),
|
||||
roomPackage.localPrice.currency
|
||||
)}
|
||||
</Body>
|
||||
</div>
|
||||
))
|
||||
@@ -209,10 +211,7 @@ export default function SummaryUI({
|
||||
<Body color="uiTextHighContrast">{bedType.description}</Body>
|
||||
|
||||
<Body color="uiTextHighContrast">
|
||||
{intl.formatNumber(0, {
|
||||
currency: roomPrice.perStay.local.currency,
|
||||
style: "currency",
|
||||
})}
|
||||
{formatPrice(intl, 0, roomPrice.perStay.local.currency)}
|
||||
</Body>
|
||||
</div>
|
||||
) : null}
|
||||
@@ -227,10 +226,7 @@ export default function SummaryUI({
|
||||
</Caption>
|
||||
</div>
|
||||
<Body color="uiTextHighContrast">
|
||||
{intl.formatNumber(0, {
|
||||
currency: roomPrice.perStay.local.currency,
|
||||
style: "currency",
|
||||
})}
|
||||
{formatPrice(intl, 0, roomPrice.perStay.local.currency)}
|
||||
</Body>
|
||||
</div>
|
||||
) : null}
|
||||
@@ -242,10 +238,7 @@ export default function SummaryUI({
|
||||
</Body>
|
||||
</div>
|
||||
<Body color="uiTextHighContrast">
|
||||
{intl.formatNumber(0, {
|
||||
currency: roomPrice.perStay.local.currency,
|
||||
style: "currency",
|
||||
})}
|
||||
{formatPrice(intl, 0, roomPrice.perStay.local.currency)}
|
||||
</Body>
|
||||
</div>
|
||||
) : null}
|
||||
@@ -255,10 +248,7 @@ export default function SummaryUI({
|
||||
{intl.formatMessage({ id: "No breakfast" })}
|
||||
</Body>
|
||||
<Body color="uiTextHighContrast">
|
||||
{intl.formatNumber(0, {
|
||||
currency: roomPrice.perStay.local.currency,
|
||||
style: "currency",
|
||||
})}
|
||||
{formatPrice(intl, 0, roomPrice.perStay.local.currency)}
|
||||
</Body>
|
||||
</div>
|
||||
) : null}
|
||||
@@ -275,10 +265,11 @@ export default function SummaryUI({
|
||||
)}
|
||||
</Caption>
|
||||
<Body color="uiTextHighContrast">
|
||||
{intl.formatNumber(parseInt(breakfast.localPrice.totalPrice), {
|
||||
currency: breakfast.localPrice.currency,
|
||||
style: "currency",
|
||||
})}
|
||||
{formatPrice(
|
||||
intl,
|
||||
parseInt(breakfast.localPrice.totalPrice),
|
||||
breakfast.localPrice.currency
|
||||
)}
|
||||
</Body>
|
||||
</div>
|
||||
{children?.length ? (
|
||||
@@ -290,10 +281,7 @@ export default function SummaryUI({
|
||||
)}
|
||||
</Caption>
|
||||
<Body color="uiTextHighContrast">
|
||||
{intl.formatNumber(0, {
|
||||
currency: breakfast.localPrice.currency,
|
||||
style: "currency",
|
||||
})}
|
||||
{formatPrice(intl, 0, breakfast.localPrice.currency)}
|
||||
</Body>
|
||||
</div>
|
||||
) : null}
|
||||
@@ -331,18 +319,20 @@ export default function SummaryUI({
|
||||
</div>
|
||||
<div>
|
||||
<Body textTransform="bold">
|
||||
{intl.formatNumber(totalPrice.local.price, {
|
||||
currency: totalPrice.local.currency,
|
||||
style: "currency",
|
||||
})}
|
||||
{formatPrice(
|
||||
intl,
|
||||
totalPrice.local.price,
|
||||
totalPrice.local.currency
|
||||
)}
|
||||
</Body>
|
||||
{totalPrice.requested && (
|
||||
<Caption color="uiTextMediumContrast">
|
||||
{intl.formatMessage({ id: "Approx." })}{" "}
|
||||
{intl.formatNumber(totalPrice.requested.price, {
|
||||
currency: totalPrice.requested.currency,
|
||||
style: "currency",
|
||||
})}
|
||||
{formatPrice(
|
||||
intl,
|
||||
totalPrice.requested.price,
|
||||
totalPrice.requested.currency
|
||||
)}
|
||||
</Caption>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user