fix(SW-2210): Removed isUserLoggedIn from RatesStore
This commit is contained in:
committed by
Michael Zetterberg
parent
5323a8e46e
commit
7b76e351d9
@@ -1,5 +1,6 @@
|
|||||||
"use client"
|
"use client"
|
||||||
import { useRouter } from "next/navigation"
|
import { useRouter } from "next/navigation"
|
||||||
|
import { useSession } from "next-auth/react"
|
||||||
import { useState, useTransition } from "react"
|
import { useState, useTransition } from "react"
|
||||||
import { useIntl } from "react-intl"
|
import { useIntl } from "react-intl"
|
||||||
|
|
||||||
@@ -13,6 +14,7 @@ import Body from "@/components/TempDesignSystem/Text/Body"
|
|||||||
import Caption from "@/components/TempDesignSystem/Text/Caption"
|
import Caption from "@/components/TempDesignSystem/Text/Caption"
|
||||||
import Footnote from "@/components/TempDesignSystem/Text/Footnote"
|
import Footnote from "@/components/TempDesignSystem/Text/Footnote"
|
||||||
import Subtitle from "@/components/TempDesignSystem/Text/Subtitle"
|
import Subtitle from "@/components/TempDesignSystem/Text/Subtitle"
|
||||||
|
import { isValidClientSession } from "@/utils/clientSession"
|
||||||
import { formatPrice } from "@/utils/numberFormatting"
|
import { formatPrice } from "@/utils/numberFormatting"
|
||||||
|
|
||||||
import MobileSummary from "./MobileSummary"
|
import MobileSummary from "./MobileSummary"
|
||||||
@@ -20,11 +22,10 @@ import { getTotalPrice } from "./utils"
|
|||||||
|
|
||||||
import styles from "./rateSummary.module.css"
|
import styles from "./rateSummary.module.css"
|
||||||
|
|
||||||
import type { RateSummaryProps } from "@/types/components/hotelReservation/selectRate/rateSummary"
|
|
||||||
import { RateEnum } from "@/types/enums/rate"
|
import { RateEnum } from "@/types/enums/rate"
|
||||||
import { RateTypeEnum } from "@/types/enums/rateType"
|
import { RateTypeEnum } from "@/types/enums/rateType"
|
||||||
|
|
||||||
export default function RateSummary({ isUserLoggedIn }: RateSummaryProps) {
|
export default function RateSummary() {
|
||||||
const {
|
const {
|
||||||
bookingCode,
|
bookingCode,
|
||||||
bookingRooms,
|
bookingRooms,
|
||||||
@@ -45,6 +46,8 @@ export default function RateSummary({ isUserLoggedIn }: RateSummaryProps) {
|
|||||||
roomsAvailability: state.roomsAvailability,
|
roomsAvailability: state.roomsAvailability,
|
||||||
searchParams: state.searchParams,
|
searchParams: state.searchParams,
|
||||||
}))
|
}))
|
||||||
|
const { data: session } = useSession()
|
||||||
|
const isUserLoggedIn = isValidClientSession(session)
|
||||||
|
|
||||||
const [isSubmitting, setIsSubmitting] = useState(false)
|
const [isSubmitting, setIsSubmitting] = useState(false)
|
||||||
const intl = useIntl()
|
const intl = useIntl()
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
"use client"
|
"use client"
|
||||||
|
import { useSession } from "next-auth/react"
|
||||||
import { useIntl } from "react-intl"
|
import { useIntl } from "react-intl"
|
||||||
|
|
||||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||||
@@ -13,6 +14,7 @@ import Body from "@/components/TempDesignSystem/Text/Body"
|
|||||||
import Caption from "@/components/TempDesignSystem/Text/Caption"
|
import Caption from "@/components/TempDesignSystem/Text/Caption"
|
||||||
import Subtitle from "@/components/TempDesignSystem/Text/Subtitle"
|
import Subtitle from "@/components/TempDesignSystem/Text/Subtitle"
|
||||||
import { useRoomContext } from "@/contexts/SelectRate/Room"
|
import { useRoomContext } from "@/contexts/SelectRate/Room"
|
||||||
|
import { isValidClientSession } from "@/utils/clientSession"
|
||||||
|
|
||||||
import styles from "./selectedRoomPanel.module.css"
|
import styles from "./selectedRoomPanel.module.css"
|
||||||
|
|
||||||
@@ -21,17 +23,16 @@ import { RateEnum } from "@/types/enums/rate"
|
|||||||
|
|
||||||
export default function SelectedRoomPanel() {
|
export default function SelectedRoomPanel() {
|
||||||
const intl = useIntl()
|
const intl = useIntl()
|
||||||
const { dates, isUserLoggedIn, roomCategories, rooms } = useRatesStore(
|
const { dates, roomCategories, rooms } = useRatesStore((state) => ({
|
||||||
(state) => ({
|
dates: {
|
||||||
dates: {
|
from: state.booking.fromDate,
|
||||||
from: state.booking.fromDate,
|
to: state.booking.toDate,
|
||||||
to: state.booking.toDate,
|
},
|
||||||
},
|
roomCategories: state.roomCategories,
|
||||||
isUserLoggedIn: state.isUserLoggedIn,
|
rooms: state.rooms,
|
||||||
roomCategories: state.roomCategories,
|
}))
|
||||||
rooms: state.rooms,
|
const { data: session } = useSession()
|
||||||
})
|
const isUserLoggedIn = isValidClientSession(session)
|
||||||
)
|
|
||||||
const {
|
const {
|
||||||
actions: { modifyRate },
|
actions: { modifyRate },
|
||||||
isMainRoom,
|
isMainRoom,
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
"use client"
|
"use client"
|
||||||
|
import { useSession } from "next-auth/react"
|
||||||
import { useIntl } from "react-intl"
|
import { useIntl } from "react-intl"
|
||||||
|
|
||||||
import { useRatesStore } from "@/stores/select-rate"
|
import { useRatesStore } from "@/stores/select-rate"
|
||||||
|
|
||||||
import Caption from "@/components/TempDesignSystem/Text/Caption"
|
import Caption from "@/components/TempDesignSystem/Text/Caption"
|
||||||
import { useRoomContext } from "@/contexts/SelectRate/Room"
|
import { useRoomContext } from "@/contexts/SelectRate/Room"
|
||||||
|
import { isValidClientSession } from "@/utils/clientSession"
|
||||||
|
|
||||||
import { getBreakfastMessage } from "./getBreakfastMessage"
|
import { getBreakfastMessage } from "./getBreakfastMessage"
|
||||||
|
|
||||||
@@ -22,10 +24,11 @@ export default function BreakfastMessage({
|
|||||||
const intl = useIntl()
|
const intl = useIntl()
|
||||||
const { roomNr, selectedFilter } = useRoomContext()
|
const { roomNr, selectedFilter } = useRoomContext()
|
||||||
|
|
||||||
const { hotelType, isUserLoggedIn } = useRatesStore((state) => ({
|
const { hotelType } = useRatesStore((state) => ({
|
||||||
hotelType: state.hotelType,
|
hotelType: state.hotelType,
|
||||||
isUserLoggedIn: state.isUserLoggedIn,
|
|
||||||
}))
|
}))
|
||||||
|
const { data: session } = useSession()
|
||||||
|
const isUserLoggedIn = isValidClientSession(session)
|
||||||
|
|
||||||
const breakfastMessages = {
|
const breakfastMessages = {
|
||||||
included: intl.formatMessage({
|
included: intl.formatMessage({
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
"use client"
|
"use client"
|
||||||
|
import { useSession } from "next-auth/react"
|
||||||
import { useIntl } from "react-intl"
|
import { useIntl } from "react-intl"
|
||||||
|
|
||||||
import NoRateAvailableCard from "@scandic-hotels/design-system/NoRateAvailableCard"
|
import NoRateAvailableCard from "@scandic-hotels/design-system/NoRateAvailableCard"
|
||||||
import RegularRateCard from "@scandic-hotels/design-system/RegularRateCard"
|
import RegularRateCard from "@scandic-hotels/design-system/RegularRateCard"
|
||||||
|
|
||||||
import { useRatesStore } from "@/stores/select-rate"
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
sumPackages,
|
sumPackages,
|
||||||
sumPackagesRequestedPrice,
|
sumPackagesRequestedPrice,
|
||||||
} from "@/components/HotelReservation/utils"
|
} from "@/components/HotelReservation/utils"
|
||||||
import { useRoomContext } from "@/contexts/SelectRate/Room"
|
import { useRoomContext } from "@/contexts/SelectRate/Room"
|
||||||
import useRateTitles from "@/hooks/booking/useRateTitles"
|
import useRateTitles from "@/hooks/booking/useRateTitles"
|
||||||
|
import { isValidClientSession } from "@/utils/clientSession"
|
||||||
|
|
||||||
import { isSelectedPriceProduct } from "./isSelected"
|
import { isSelectedPriceProduct } from "./isSelected"
|
||||||
import { calculatePricePerNightPriceProduct } from "./totalPricePerNight"
|
import { calculatePricePerNightPriceProduct } from "./totalPricePerNight"
|
||||||
@@ -45,7 +45,8 @@ export default function Regular({
|
|||||||
const rateTitles = useRateTitles()
|
const rateTitles = useRateTitles()
|
||||||
const { isMainRoom, roomNr, selectedFilter, selectedPackages, selectedRate } =
|
const { isMainRoom, roomNr, selectedFilter, selectedPackages, selectedRate } =
|
||||||
useRoomContext()
|
useRoomContext()
|
||||||
const isUserLoggedIn = useRatesStore((state) => state.isUserLoggedIn)
|
const { data: session } = useSession()
|
||||||
|
const isUserLoggedIn = isValidClientSession(session)
|
||||||
|
|
||||||
if (selectedFilter === BookingCodeFilterEnum.Discounted) {
|
if (selectedFilter === BookingCodeFilterEnum.Discounted) {
|
||||||
return null
|
return null
|
||||||
@@ -87,21 +88,21 @@ export default function Regular({
|
|||||||
|
|
||||||
const memberPricePerNight = member
|
const memberPricePerNight = member
|
||||||
? calculatePricePerNightPriceProduct(
|
? calculatePricePerNightPriceProduct(
|
||||||
member.localPrice.pricePerNight,
|
member.localPrice.pricePerNight,
|
||||||
member.requestedPrice?.pricePerNight,
|
member.requestedPrice?.pricePerNight,
|
||||||
nights,
|
nights,
|
||||||
pkgsSum.price,
|
pkgsSum.price,
|
||||||
pkgsSumRequested.price
|
pkgsSumRequested.price
|
||||||
)
|
)
|
||||||
: undefined
|
: undefined
|
||||||
const standardPricePerNight = standard
|
const standardPricePerNight = standard
|
||||||
? calculatePricePerNightPriceProduct(
|
? calculatePricePerNightPriceProduct(
|
||||||
standard.localPrice.pricePerNight,
|
standard.localPrice.pricePerNight,
|
||||||
standard.requestedPrice?.pricePerNight,
|
standard.requestedPrice?.pricePerNight,
|
||||||
nights,
|
nights,
|
||||||
pkgsSum.price,
|
pkgsSum.price,
|
||||||
pkgsSumRequested.price
|
pkgsSumRequested.price
|
||||||
)
|
)
|
||||||
: undefined
|
: undefined
|
||||||
|
|
||||||
let approximateMemberRatePrice = null
|
let approximateMemberRatePrice = null
|
||||||
@@ -149,12 +150,12 @@ export default function Regular({
|
|||||||
const approximateRate =
|
const approximateRate =
|
||||||
approximatePrice && requestedCurrency
|
approximatePrice && requestedCurrency
|
||||||
? {
|
? {
|
||||||
label: intl.formatMessage({
|
label: intl.formatMessage({
|
||||||
defaultMessage: "Approx.",
|
defaultMessage: "Approx.",
|
||||||
}),
|
}),
|
||||||
price: approximatePrice,
|
price: approximatePrice,
|
||||||
unit: requestedCurrency,
|
unit: requestedCurrency,
|
||||||
}
|
}
|
||||||
: undefined
|
: undefined
|
||||||
|
|
||||||
const isSelected = isSelectedPriceProduct(
|
const isSelected = isSelectedPriceProduct(
|
||||||
@@ -165,21 +166,21 @@ export default function Regular({
|
|||||||
|
|
||||||
const rateTermDetails = product.rateDefinitionMember
|
const rateTermDetails = product.rateDefinitionMember
|
||||||
? [
|
? [
|
||||||
{
|
{
|
||||||
title: product.rateDefinition.title,
|
title: product.rateDefinition.title,
|
||||||
terms: product.rateDefinition.generalTerms,
|
terms: product.rateDefinition.generalTerms,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: product.rateDefinitionMember.title,
|
title: product.rateDefinitionMember.title,
|
||||||
terms: product.rateDefinition.generalTerms,
|
terms: product.rateDefinition.generalTerms,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
: [
|
: [
|
||||||
{
|
{
|
||||||
title: product.rateDefinition.title,
|
title: product.rateDefinition.title,
|
||||||
terms: product.rateDefinition.generalTerms,
|
terms: product.rateDefinition.generalTerms,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<RegularRateCard
|
<RegularRateCard
|
||||||
|
|||||||
@@ -1,11 +1,14 @@
|
|||||||
"use client"
|
"use client"
|
||||||
|
|
||||||
|
import { useSession } from "next-auth/react"
|
||||||
|
|
||||||
import { dt } from "@/lib/dt"
|
import { dt } from "@/lib/dt"
|
||||||
import { useRatesStore } from "@/stores/select-rate"
|
import { useRatesStore } from "@/stores/select-rate"
|
||||||
|
|
||||||
import SkeletonShimmer from "@/components/SkeletonShimmer"
|
import SkeletonShimmer from "@/components/SkeletonShimmer"
|
||||||
import Divider from "@/components/TempDesignSystem/Divider"
|
import Divider from "@/components/TempDesignSystem/Divider"
|
||||||
import { useRoomContext } from "@/contexts/SelectRate/Room"
|
import { useRoomContext } from "@/contexts/SelectRate/Room"
|
||||||
|
import { isValidClientSession } from "@/utils/clientSession"
|
||||||
|
|
||||||
import BreakfastMessage from "./BreakfastMessage"
|
import BreakfastMessage from "./BreakfastMessage"
|
||||||
import Campaign from "./Campaign"
|
import Campaign from "./Campaign"
|
||||||
@@ -38,8 +41,10 @@ export default function Rates({
|
|||||||
const nights = useRatesStore((state) =>
|
const nights = useRatesStore((state) =>
|
||||||
dt(state.booking.toDate).diff(state.booking.fromDate, "days")
|
dt(state.booking.toDate).diff(state.booking.fromDate, "days")
|
||||||
)
|
)
|
||||||
|
const { data: session } = useSession()
|
||||||
|
const isUserLoggedIn = isValidClientSession(session)
|
||||||
function handleSelectRate(product: Product) {
|
function handleSelectRate(product: Product) {
|
||||||
selectRate({ features, product, roomType, roomTypeCode })
|
selectRate({ features, product, roomType, roomTypeCode }, isUserLoggedIn)
|
||||||
}
|
}
|
||||||
|
|
||||||
const sharedProps = {
|
const sharedProps = {
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import type { RoomsContainerProps } from "@/types/components/hotelReservation/se
|
|||||||
export function RoomsContainer({
|
export function RoomsContainer({
|
||||||
booking,
|
booking,
|
||||||
hotelType,
|
hotelType,
|
||||||
isUserLoggedIn,
|
|
||||||
roomCategories,
|
roomCategories,
|
||||||
vat,
|
vat,
|
||||||
}: RoomsContainerProps) {
|
}: RoomsContainerProps) {
|
||||||
@@ -36,13 +35,12 @@ export function RoomsContainer({
|
|||||||
<RatesProvider
|
<RatesProvider
|
||||||
booking={booking}
|
booking={booking}
|
||||||
hotelType={hotelType}
|
hotelType={hotelType}
|
||||||
isUserLoggedIn={isUserLoggedIn}
|
|
||||||
roomCategories={roomCategories}
|
roomCategories={roomCategories}
|
||||||
roomsAvailability={roomsAvailability.data}
|
roomsAvailability={roomsAvailability.data}
|
||||||
vat={vat}
|
vat={vat}
|
||||||
>
|
>
|
||||||
<Rooms />
|
<Rooms />
|
||||||
<RateSummary isUserLoggedIn={isUserLoggedIn} />
|
<RateSummary />
|
||||||
</RatesProvider>
|
</RatesProvider>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,13 +5,11 @@ import { Suspense } from "react"
|
|||||||
import { REDEMPTION } from "@/constants/booking"
|
import { REDEMPTION } from "@/constants/booking"
|
||||||
import { getHotel } from "@/lib/trpc/memoizedRequests"
|
import { getHotel } from "@/lib/trpc/memoizedRequests"
|
||||||
|
|
||||||
import { auth } from "@/auth"
|
|
||||||
import HotelInfoCard from "@/components/HotelReservation/SelectRate/HotelInfoCard"
|
import HotelInfoCard from "@/components/HotelReservation/SelectRate/HotelInfoCard"
|
||||||
import { RoomsContainer } from "@/components/HotelReservation/SelectRate/RoomsContainer"
|
import { RoomsContainer } from "@/components/HotelReservation/SelectRate/RoomsContainer"
|
||||||
import TrackingSDK from "@/components/TrackingSDK"
|
import TrackingSDK from "@/components/TrackingSDK"
|
||||||
import { setLang } from "@/i18n/serverContext"
|
import { setLang } from "@/i18n/serverContext"
|
||||||
import { getHotelSearchDetails } from "@/utils/hotelSearchDetails"
|
import { getHotelSearchDetails } from "@/utils/hotelSearchDetails"
|
||||||
import { isValidSession } from "@/utils/session"
|
|
||||||
import { convertSearchParamsToObj } from "@/utils/url"
|
import { convertSearchParamsToObj } from "@/utils/url"
|
||||||
|
|
||||||
import { getValidDates } from "./getValidDates"
|
import { getValidDates } from "./getValidDates"
|
||||||
@@ -53,9 +51,6 @@ export default async function SelectRatePage({
|
|||||||
selectHotelParams.toDate
|
selectHotelParams.toDate
|
||||||
)
|
)
|
||||||
|
|
||||||
const session = await auth()
|
|
||||||
const isUserLoggedIn = isValidSession(session)
|
|
||||||
|
|
||||||
const arrivalDate = fromDate.toDate()
|
const arrivalDate = fromDate.toDate()
|
||||||
const departureDate = toDate.toDate()
|
const departureDate = toDate.toDate()
|
||||||
|
|
||||||
@@ -85,7 +80,6 @@ export default async function SelectRatePage({
|
|||||||
<RoomsContainer
|
<RoomsContainer
|
||||||
booking={booking}
|
booking={booking}
|
||||||
hotelType={hotelData.hotel.hotelType}
|
hotelType={hotelData.hotel.hotelType}
|
||||||
isUserLoggedIn={isUserLoggedIn}
|
|
||||||
roomCategories={hotelData.roomCategories}
|
roomCategories={hotelData.roomCategories}
|
||||||
vat={hotelData.hotel.vat}
|
vat={hotelData.hotel.vat}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ export default function RatesProvider({
|
|||||||
booking,
|
booking,
|
||||||
children,
|
children,
|
||||||
hotelType,
|
hotelType,
|
||||||
isUserLoggedIn,
|
|
||||||
roomCategories,
|
roomCategories,
|
||||||
roomsAvailability,
|
roomsAvailability,
|
||||||
vat,
|
vat,
|
||||||
@@ -28,7 +27,6 @@ export default function RatesProvider({
|
|||||||
storeRef.current = createRatesStore({
|
storeRef.current = createRatesStore({
|
||||||
booking,
|
booking,
|
||||||
hotelType,
|
hotelType,
|
||||||
isUserLoggedIn,
|
|
||||||
labels: {
|
labels: {
|
||||||
accessibilityRoom: intl.formatMessage({
|
accessibilityRoom: intl.formatMessage({
|
||||||
defaultMessage: "Accessibility room",
|
defaultMessage: "Accessibility room",
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ import type { PriceProduct } from "@/types/trpc/routers/hotel/roomAvailability"
|
|||||||
export function createRatesStore({
|
export function createRatesStore({
|
||||||
booking,
|
booking,
|
||||||
hotelType,
|
hotelType,
|
||||||
isUserLoggedIn,
|
|
||||||
labels,
|
labels,
|
||||||
pathname,
|
pathname,
|
||||||
roomCategories,
|
roomCategories,
|
||||||
@@ -126,7 +125,6 @@ export function createRatesStore({
|
|||||||
packageOptions,
|
packageOptions,
|
||||||
hotelType,
|
hotelType,
|
||||||
isRedemptionBooking,
|
isRedemptionBooking,
|
||||||
isUserLoggedIn,
|
|
||||||
pathname,
|
pathname,
|
||||||
rateSummary,
|
rateSummary,
|
||||||
roomConfigurations,
|
roomConfigurations,
|
||||||
@@ -307,7 +305,7 @@ export function createRatesStore({
|
|||||||
})
|
})
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
selectRate(selectedRate) {
|
selectRate(selectedRate, isUserLoggedIn) {
|
||||||
return set(
|
return set(
|
||||||
produce((state: RatesState) => {
|
produce((state: RatesState) => {
|
||||||
if (!selectedRate.product) {
|
if (!selectedRate.product) {
|
||||||
|
|||||||
@@ -1,10 +1,6 @@
|
|||||||
import type { Price } from "../price"
|
import type { Price } from "../price"
|
||||||
|
|
||||||
export interface RateSummaryProps {
|
export interface MobileSummaryProps {
|
||||||
isUserLoggedIn: boolean
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface MobileSummaryProps extends RateSummaryProps {
|
|
||||||
isAllRoomsSelected: boolean
|
isAllRoomsSelected: boolean
|
||||||
isUserLoggedIn: boolean
|
isUserLoggedIn: boolean
|
||||||
totalPriceToShow: Price
|
totalPriceToShow: Price
|
||||||
|
|||||||
@@ -5,5 +5,4 @@ export interface RoomsContainerProps
|
|||||||
extends Pick<HotelData, "roomCategories">,
|
extends Pick<HotelData, "roomCategories">,
|
||||||
Pick<HotelData["hotel"], "hotelType" | "vat"> {
|
Pick<HotelData["hotel"], "hotelType" | "vat"> {
|
||||||
booking: SelectRateSearchParams
|
booking: SelectRateSearchParams
|
||||||
isUserLoggedIn: boolean
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import type { AvailabilityError } from "../stores/rates"
|
|||||||
export interface RatesProviderProps extends React.PropsWithChildren {
|
export interface RatesProviderProps extends React.PropsWithChildren {
|
||||||
booking: SelectRateSearchParams
|
booking: SelectRateSearchParams
|
||||||
hotelType: string | undefined
|
hotelType: string | undefined
|
||||||
isUserLoggedIn: boolean
|
|
||||||
roomCategories: Room[]
|
roomCategories: Room[]
|
||||||
roomsAvailability: (RoomsAvailability | AvailabilityError)[] | undefined
|
roomsAvailability: (RoomsAvailability | AvailabilityError)[] | undefined
|
||||||
vat: number
|
vat: number
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ interface Actions {
|
|||||||
removeSelectedPackages: VoidFunction
|
removeSelectedPackages: VoidFunction
|
||||||
selectFilter: (filter: BookingCodeFilterEnum) => void
|
selectFilter: (filter: BookingCodeFilterEnum) => void
|
||||||
selectPackages: (codes: PackageEnum[]) => void
|
selectPackages: (codes: PackageEnum[]) => void
|
||||||
selectRate: (rate: SelectedRate) => void
|
selectRate: (rate: SelectedRate, isUserLoggedIn: boolean) => void
|
||||||
updateRooms: (rooms: RoomConfiguration[] | undefined) => void
|
updateRooms: (rooms: RoomConfiguration[] | undefined) => void
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -55,7 +55,6 @@ export interface RatesState {
|
|||||||
booking: SelectRateSearchParams
|
booking: SelectRateSearchParams
|
||||||
hotelType: string | undefined
|
hotelType: string | undefined
|
||||||
isRedemptionBooking: boolean
|
isRedemptionBooking: boolean
|
||||||
isUserLoggedIn: boolean
|
|
||||||
packageOptions: DefaultFilterOptions[]
|
packageOptions: DefaultFilterOptions[]
|
||||||
pathname: string
|
pathname: string
|
||||||
rateSummary: Array<Rate | null>
|
rateSummary: Array<Rate | null>
|
||||||
@@ -73,7 +72,6 @@ export interface InitialState
|
|||||||
RatesState,
|
RatesState,
|
||||||
| "booking"
|
| "booking"
|
||||||
| "hotelType"
|
| "hotelType"
|
||||||
| "isUserLoggedIn"
|
|
||||||
| "pathname"
|
| "pathname"
|
||||||
| "roomCategories"
|
| "roomCategories"
|
||||||
| "roomsAvailability"
|
| "roomsAvailability"
|
||||||
|
|||||||
Reference in New Issue
Block a user