Merged in feat/SW-3526-show-sas-eb-points-rate-in- (pull request #2933)

feat(SW-3526): Show EB points rate and label in booking flow

* feat(SW-3526): Show EB points rate and label in booking flow

* feat(SW-3526) Optimized points currency code

* feat(SW-3526) Removed extra multiplication for token expiry after rebase

* feat(SW-3526): Updated to exhaustive check and thow if type error

Approved-by: Anton Gunnarsson
This commit is contained in:
Hrishikesh Vaipurkar
2025-10-15 06:54:44 +00:00
parent 73af1eed9b
commit 78ede453a2
27 changed files with 281 additions and 176 deletions

View File

@@ -3,6 +3,7 @@ import { useIntl } from "react-intl"
import PointsRateCard from "@scandic-hotels/design-system/PointsRateCard"
import { useGetPointsCurrency } from "../../../../../../../bookingFlowConfig/bookingFlowConfigContext"
import { useSelectRateContext } from "../../../../../../../contexts/SelectRate/SelectRateContext"
import { BookingCodeFilterEnum } from "../../../../../../../stores/bookingCode-filter"
import { sumPackages } from "../../../../../../../utils/SelectRate"
@@ -33,6 +34,7 @@ export default function Redemptions({
actions: { selectRate },
selectedRates,
} = useSelectRateContext()
const pointsCurrency = useGetPointsCurrency()
// TODO: Replace with context value when we have support for dropdown "Show all rates"
const selectedFilter = BookingCodeFilterEnum.All as BookingCodeFilterEnum
@@ -86,7 +88,7 @@ export default function Redemptions({
price: additionalPrice.toString(),
}
: undefined,
currency: "PTS",
currency: pointsCurrency ?? "PTS",
isDisabled: !r.redemption.hasEnoughPoints,
points: r.redemption.localPrice.pointsPerStay.toString(),
rateCode: r.redemption.rateCode,