feat: SW-2028 Fixed review comments

This commit is contained in:
Hrishikesh Vaipurkar
2025-03-31 16:35:52 +02:00
parent 4e9ee82efa
commit 96fd0b73e4
14 changed files with 214 additions and 195 deletions

View File

@@ -138,7 +138,8 @@ export default function PriceDetailsTable({
"corporateCheque" in room.roomRate
? room.roomRate.corporateCheque
: undefined
const redemptionPrice = "redemption" in room.roomRate ? room.roomRate.redemption : undefined
const redemptionPrice =
"redemption" in room.roomRate ? room.roomRate.redemption : undefined
if (!price && !voucherPrice && !chequePrice && !redemptionPrice) {
return null
}
@@ -283,25 +284,18 @@ export default function PriceDetailsTable({
})}
<TableSection>
<TableSectionHeader title={intl.formatMessage({ id: "Total" })} />
{
// @ts-expect-error Currency type is string instead of CurrencyEnum. Change also impacts packages
!noVatCurrencies.includes(totalPrice.local.currency) ? (
<>
<Row
label={intl.formatMessage({ id: "Price excluding VAT" })}
value={formatPrice(
intl,
priceExclVat,
totalPrice.local.currency
)}
/>
<Row
label={intl.formatMessage({ id: "VAT {vat}%" }, { vat })}
value={formatPrice(intl, vatAmount, totalPrice.local.currency)}
/>
</>
) : null
}
{!noVatCurrencies.includes(totalPrice.local.currency) ? (
<>
<Row
label={intl.formatMessage({ id: "Price excluding VAT" })}
value={formatPrice(intl, priceExclVat, totalPrice.local.currency)}
/>
<Row
label={intl.formatMessage({ id: "VAT {vat}%" }, { vat })}
value={formatPrice(intl, vatAmount, totalPrice.local.currency)}
/>
</>
) : null}
<tr className={styles.row}>
<td>
<Body textTransform="bold">

View File

@@ -262,8 +262,7 @@ export default function SummaryUI({
{formatPrice(
intl,
0,
room.roomPrice.perStay.local.additionalPriceCurrency ??
room.roomPrice.perStay.local.currency
room.roomPrice.perStay.local.currency
)}
</Body>
</div>