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:
@@ -18,6 +18,7 @@ import { RoomPackageCodeEnum } from "@scandic-hotels/trpc/enums/roomFilter"
|
||||
import { AvailabilityEnum } from "@scandic-hotels/trpc/enums/selectHotel"
|
||||
import { selectRateRoomsAvailabilityInputSchema } from "@scandic-hotels/trpc/routers/hotels/availability/selectRate/rooms/schema"
|
||||
|
||||
import { useGetPointsCurrency } from "../../../bookingFlowConfig/bookingFlowConfigContext"
|
||||
import { useIsLoggedIn } from "../../../hooks/useIsLoggedIn"
|
||||
import useLang from "../../../hooks/useLang"
|
||||
import { BookingCodeFilterEnum } from "../../../stores/bookingCode-filter"
|
||||
@@ -68,6 +69,7 @@ export function SelectRateProvider({
|
||||
const updateBooking = useUpdateBooking()
|
||||
const isUserLoggedIn = useIsLoggedIn()
|
||||
const intl = useIntl()
|
||||
const pointsCurrency = useGetPointsCurrency()
|
||||
|
||||
const [activeRoomIndex, setInternalActiveRoomIndex] = useQueryState<number>(
|
||||
"activeRoomIndex",
|
||||
@@ -233,6 +235,7 @@ export function SelectRateProvider({
|
||||
roomConfiguration: roomAvailability[ix]?.[0],
|
||||
})),
|
||||
isMember: isUserLoggedIn,
|
||||
pointsCurrency,
|
||||
})
|
||||
|
||||
const getPriceForRoom = useCallback(
|
||||
@@ -253,9 +256,10 @@ export function SelectRateProvider({
|
||||
],
|
||||
isMember: isUserLoggedIn && roomIndex === 0,
|
||||
addAdditionalCost: false,
|
||||
pointsCurrency,
|
||||
})
|
||||
},
|
||||
[selectedRates, roomAvailability, isUserLoggedIn]
|
||||
[selectedRates, roomAvailability, isUserLoggedIn, pointsCurrency]
|
||||
)
|
||||
|
||||
const setActiveRoomIndex = useCallback(
|
||||
|
||||
Reference in New Issue
Block a user