@roomstay/frontend 2.6.91 → 2.6.92
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/177.bundle.js +1 -1
- package/dist/288.bundle.js +1 -1
- package/dist/328.bundle.js +1 -0
- package/dist/main.bundle.js +1 -1
- package/dist/src/api/AvailabilityAPI.d.ts +6 -0
- package/dist/src/api/AvailabilityAPI.js +22 -0
- package/dist/src/api/AvailabilityAPI.js.map +1 -1
- package/dist/src/api/BaseAPI.d.ts +1 -0
- package/dist/src/api/BaseAPI.js +1 -0
- package/dist/src/api/BaseAPI.js.map +1 -1
- package/dist/src/components/steps/room/TabGroupedRooms/TabGroupedRoomList.js +28 -3
- package/dist/src/components/steps/room/TabGroupedRooms/TabGroupedRoomList.js.map +1 -1
- package/dist/src/components/steps/room/roomDetails/RoomDetails.d.ts +1 -0
- package/dist/src/components/steps/room/roomDetails/RoomDetails.js +3 -1
- package/dist/src/components/steps/room/roomDetails/RoomDetails.js.map +1 -1
- package/dist/src/components/steps/room/roomDetails/roomRates/BookNowButton.d.ts +1 -0
- package/dist/src/components/steps/room/roomDetails/roomRates/BookNowButton.js +1 -1
- package/dist/src/components/steps/room/roomDetails/roomRates/BookNowButton.js.map +1 -1
- package/dist/src/components/steps/room/roomDetails/roomRates/RoomRateRow.d.ts +1 -0
- package/dist/src/components/steps/room/roomDetails/roomRates/RoomRateRow.js +4 -1
- package/dist/src/components/steps/room/roomDetails/roomRates/RoomRateRow.js.map +1 -1
- package/dist/src/components/steps/room/roomDetails/roomRates/RoomRates.d.ts +1 -0
- package/dist/src/components/steps/room/roomDetails/roomRates/RoomRates.js +11 -2
- package/dist/src/components/steps/room/roomDetails/roomRates/RoomRates.js.map +1 -1
- package/dist/src/components/steps/room/roomDetails/unavailableRoom/UnavailableRoom.d.ts +2 -1
- package/dist/src/components/steps/room/roomDetails/unavailableRoom/UnavailableRoom.js +2 -2
- package/dist/src/components/steps/room/roomDetails/unavailableRoom/UnavailableRoom.js.map +1 -1
- package/dist/src/contexts/CompanyContext/CompanyContextWrapper.js +1 -0
- package/dist/src/contexts/CompanyContext/CompanyContextWrapper.js.map +1 -1
- package/dist/src/hooks/useAreaAvailability.d.ts +2 -0
- package/dist/src/hooks/useAreaAvailability.js +42 -0
- package/dist/src/hooks/useAreaAvailability.js.map +1 -0
- package/dist/src/models/Api/HotelDTO.d.ts +2 -0
- package/dist/src/models/Api/HotelDTO.js.map +1 -1
- package/dist/src/models/Client/Hotel/Hotel.d.ts +1 -0
- package/dist/src/models/Client/Hotel/Hotel.js.map +1 -1
- package/dist/src/translations/Translation.d.ts +1 -0
- package/dist/src/translations/Translation.js +1 -0
- package/dist/src/translations/Translation.js.map +1 -1
- package/dist/src/translations/languages/en-gb.js +1 -0
- package/dist/src/translations/languages/en-gb.js.map +1 -1
- package/dist/test.bundle.js +1 -1
- package/package.json +2 -2
- package/dist/430.bundle.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompanyContextWrapper.js","sourceRoot":"/","sources":["src/contexts/CompanyContext/CompanyContextWrapper.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAA0G;AAC1G,6CAAsF;AACtF,2CAA2C;AAC3C,yCAAiE;AACjE,+CAAiG;AAEjG,kEAAmC;AACnC,wFAAqF;AACrF,kGAA+F;AAK/F,uFAA8E;AAG9E,kFAA0D;AAC1D,gFAAwD;AACxD,mEAAwD;AACxD,0FAAkE;AAClE,8FAAsE;AACtE,sEAAwD;AACxD,iEAAyC;AACzC,qEAA6C;AAC7C,mEAA2C;AAOpC,MAAM,qBAAqB,GAAG,CAAC,EAAE,aAAa,EAAE,OAAO,EAAE,QAAQ,EAA8B,EAAE,EAAE;;IACtG,MAAM,SAAS,GAAG,IAAA,kBAAU,EAAC,+BAAoB,CAAC,CAAC;IAEnD,MAAM,gBAAgB,GAAG,GAAG,EAAE;QAC1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AChB,CAAC;YAED,MAAM,WAAW,GAAG,cAAc,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC,CAAC;YAE3F,IAAI,WAAW,EAAE,CAAC;gBACd,kBAAkB,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;gBACxC,OAAO,IAAI,CAAC;YAChB,CAAC;iBAAM,CAAC;gBACJ,sCAAsC;gBACtC,OAAO,CAAC,GAAG,CAAC,uEAAuE,OAAO,CAAC,aAAa,EAAE,CAAC,CAAC;gBAC5G,OAAO,KAAK,CAAC;YACjB,CAAC;QACL,CAAC;QAED,sBAAsB,EAAE,GAAG,EAAE;YACzB,cAAc,CAAC,KAAK,CAAC,CAAC;YACtB,2BAA2B,CAAC,IAAI,CAAC,CAAC;QACtC,CAAC;QACD,qBAAqB,EAAE,CAAC,SAAsB,EAAE,EAAE;YAC9C,cAAc,CAAC,IAAI,CAAC,CAAC;YAErB,IAAI,SAAS,EAAE,CAAC;gBACZ,2BAA2B,CAAC,SAAS,CAAC,CAAC;YAC3C,CAAC;QACL,CAAC;QAED,UAAU;QACV,WAAW;QAEX,kBAAkB;QAClB,kBAAkB;QAElB,QAAQ;QACR,kBAAkB;QAClB,qBAAqB;QACrB,YAAY,EAAE,YAAY;QAC1B,aAAa;KAChB,CAAC;IAEF,OAAO,8BAAC,yBAAc,CAAC,QAAQ,IAAC,KAAK,EAAE,cAAc,IAAG,QAAQ,CAA2B,CAAC;AAChG,CAAC,CAAC;AA/eW,QAAA,qBAAqB,yBA+ehC","sourcesContent":["import { BookingEngineContext, CompanyContext, CompanyContextType, SignInUser } from '@frontend/contexts';\nimport { InitialHotelDetailsEvent, SelectedHotelChangeEvent } from '@frontend/events';\nimport { useEvent } from '@frontend/hooks';\nimport { EIntegration, IHotelColorScheme } from '@roomstay/core';\nimport React, { ReactChild, useCallback, useContext, useEffect, useMemo, useState } from 'react';\n\nimport API from '@/api/BookingAPI';\nimport { MemberPortalWidget } from '@/engines/MemberPortalWidget/MemberPortalWidget';\nimport { MemberOnlyFenceSignUp } from '@/events/actions/MemberOnlyFence/MemberOnlyFenceSignUp';\nimport { HotelDTO } from '@/models/Api/HotelDTO';\nimport BasketRow from '@/models/BasketRow';\nimport type { ConfigCompany } from '@/models/Client/Hotel/Company';\nimport type { ConfigHotel, Hotel, InitialHotelDetailsEventPayload } from '@/models/Client/Hotel/Hotel';\nimport { HotelDataSource } from '@/models/Client/Hotel/HotelDataSource.types';\nimport { IPromotion } from '@/models/Promotion/IPromotion.type';\nimport Filter from '@/models/Room/Filters/Filter';\nimport StepHotel from '@/pages/steps/StepHotel/StepHotel';\nimport FilterProvider from '@/providers/FilterProvider';\nimport { Language } from '@/providers/LanguageProvider';\nimport RoomstayThemeEngine from '@/providers/RoomstayThemeEngine';\nimport StaticContextProvider from '@/providers/StaticContextProvider';\nimport * as currencyHelper from '@/util/CurrencyHelper';\nimport DataLayer from '@/util/DataLayer';\nimport StepManager from '@/util/StepManager';\nimport TimeHelper from '@/util/TimeHelper';\n\ninterface CompanyContextWrapperProps {\n children: ReactChild;\n configCompany: ConfigCompany;\n}\n\nexport const CompanyContextWrapper = ({ configCompany: company, children }: CompanyContextWrapperProps) => {\n const beContext = useContext(BookingEngineContext);\n\n const getSelectedHotel = () => {\n for (const hotel of hotels) {\n if (selectedHotelID + '' === hotel.hotelID + '') {\n return hotel;\n }\n }\n };\n\n const [companyId, setCompanyId] = useState(company.companyId);\n const [name, setName] = useState(company.name);\n const [companyShort, setCompanyShort] = useState(company.companyShort);\n const [logo, setLogo] = useState(company.logo);\n const [colors, setColors] = useState(company.colors);\n const [hotels, setHotels] = useState<Hotel[]>(company.hotels as Hotel[]);\n const [logoLink, setLogoLink] = useState(company.logoLink);\n const [privacyPolicyUrl, setPrivacyPolicyUrl] = useState(company.privacyPolicyUrl);\n\n const [selectedHotelID, setSelectedHotelID] = useState<string>();\n\n const selectedHotel = useMemo(() => {\n for (const companyHotel of hotels) {\n if (selectedHotelID + '' === companyHotel.hotelID + '') {\n return companyHotel;\n }\n }\n }, [hotels, selectedHotelID]);\n\n const [currentCurrency, setCurrentCurrency] = useState<string>(getSelectedHotel()?.defaultCurrency ?? 'AUD');\n const [currentLanguage, setCurrentLanguage] = useState<Language>(getSelectedHotel()?.defaultLanguage ?? Language.en_us);\n\n const [memberOnlyModalPromotion, setMemberOnlyModalPromotion] = useState<IPromotion | null>(null);\n\n const [signedInUser, setSignedInUser] = useState<SignInUser | null>(null);\n const [isSigningIn, setIsSigningIn] = useState(false);\n\n const [memberNumber, setMemberNumber] = useState<string>();\n const [isExternalMemberHotel, setIsExternalMemberHotel] = useState<boolean>(false);\n\n const externalMemberType = useMemo(() => {\n const integrations = selectedHotel?.integrations;\n\n // Because integrations is an array of strings technically both Big4 and Top10 theoretically come down, so we'll choose one\n if (integrations?.includes(EIntegration.Big4)) {\n return EIntegration.Big4;\n } else if (integrations?.includes(EIntegration.Top10)) {\n return EIntegration.Top10;\n } else if (integrations?.includes(EIntegration.RmsTop10)) {\n return EIntegration.RmsTop10;\n } else if (integrations?.includes(EIntegration.Gday)) {\n return EIntegration.Gday;\n } else if (integrations?.includes(EIntegration.Salesforce)) {\n return EIntegration.Salesforce;\n } else if (integrations?.includes(EIntegration.RAC)) {\n return EIntegration.RAC;\n }\n }, [selectedHotel]);\n\n useEffect(() => {\n const isExternalProvider =\n selectedHotel?.integrations?.some(\n (provider) =>\n provider === EIntegration.Big4 ||\n provider === EIntegration.Top10 ||\n provider === EIntegration.RmsTop10 ||\n provider === EIntegration.Gday ||\n provider === EIntegration.Salesforce ||\n provider === EIntegration.RAC\n ) || false;\n setIsExternalMemberHotel(isExternalProvider);\n\n raise(new SelectedHotelChangeEvent(selectedHotel));\n }, [selectedHotel]);\n\n const { raise } = useEvent();\n\n const getHotelFromArrayWithId = (id: string, arrayOfHotels: Hotel[] | ConfigHotel[]) => {\n for (const nextHotel of arrayOfHotels) {\n if (nextHotel.hotelID + '' === id + '') {\n return nextHotel;\n }\n }\n };\n const getHotelFromID = (id: string): Hotel => {\n return getHotelFromArrayWithId(id, hotels) as Hotel;\n };\n\n const updateHotel = (newHotel: Hotel, callback?: (hotel: Hotel) => Hotel) => {\n setHotels((oldHotels) => {\n let modified = false;\n const newHotelArray = oldHotels.map((mappingHotel) => {\n if (mappingHotel.hotelID + '' === newHotel.hotelID + '') {\n modified = true;\n\n const hotelDetails: InitialHotelDetailsEventPayload = {\n name: newHotel.name,\n hotelID: newHotel.hotelID,\n hotelUrl: newHotel.hotelUrl,\n currency: newHotel.defaultCurrency,\n language: newHotel.defaultLanguage,\n address: newHotel.address,\n };\n\n const event = new InitialHotelDetailsEvent(hotelDetails);\n raise(event);\n\n if (callback) {\n return { ...callback(mappingHotel) };\n }\n\n return { ...newHotel };\n }\n\n return { ...mappingHotel };\n });\n\n if (!modified) {\n newHotelArray.push(newHotel);\n if (callback) {\n // Fixed: Ensure the callback returns the hotel; otherwise, the UI may receive undefined.\n callback(newHotel);\n }\n }\n\n return newHotelArray;\n });\n };\n\n const signUserIn = async (user: SignInUser) => {\n raise(new MemberOnlyFenceSignUp(memberOnlyModalPromotion as IPromotion, user));\n\n workingContext.closeMemberSignupModal();\n\n await beContext.sessionProvider.updateSession({ user: user, memberId: user.memberNumber });\n\n setSignedInUser(user);\n setMemberNumber(user.memberNumber);\n\n if (user.saveState) {\n await beContext.storageProvider.setUser(user);\n }\n };\n\n const signUserOut = async () => {\n await beContext.sessionProvider.updateSession({ user: undefined, memberId: undefined });\n await beContext.storageProvider.setUser(undefined);\n setSignedInUser(null);\n setMemberNumber(undefined);\n };\n\n const getHotel = useCallback(\n (hotelId: string) =>\n new Promise<Hotel>(async (resolve, reject) => {\n const currentHotelVersion: Hotel | undefined = getHotelFromID(hotelId) as Hotel;\n const newHotel: Hotel = {\n ...currentHotelVersion,\n // Fixed: Specified Hotel not found\n // Ensure hotelID is set explicitly in case currentHotelVersion is undefined or missing it.\n hotelID: hotelId,\n };\n let details: HotelDTO;\n\n try {\n details = await API.Hotel.fetchData(currentLanguage, newHotel);\n } catch (ex) {\n reject(ex);\n }\n\n updateHotel(newHotel, (updatedHotel) => {\n updatedHotel.name = details.name;\n updatedHotel.address = details.address;\n\n updatedHotel.latitude = Number(details.latitude);\n updatedHotel.longitude = Number(details.longitude);\n updatedHotel.phone = details.phone;\n\n updatedHotel.checkInTime = TimeHelper.convert24To12hr(details.checkInTime);\n updatedHotel.checkOutTime = TimeHelper.convert24To12hr(details.checkOutTime);\n\n updatedHotel.paymentCardTypes = details.paymentCardTypes;\n updatedHotel.description = details.description;\n updatedHotel.locationDescription = details.locationDescription;\n updatedHotel.policies = details.policies;\n\n updatedHotel.hotelServices = details.hotelServices;\n updatedHotel.businessServices = details.businessServices;\n updatedHotel.rooms = details.rooms;\n\n updatedHotel.hasLoadedDetails = true;\n updatedHotel.dataSource = details.dataSource;\n\n updatedHotel.defaultCurrency = details.currencyCode;\n updatedHotel.cardProcessor = details.cardProcessor;\n updatedHotel.paymentMethods = details.paymentMethods;\n updatedHotel.planpay = details.planpay;\n updatedHotel.hotelUrl = details.hotelUrl || updatedHotel.hotelUrl || '';\n updatedHotel.heroImage = details.heroImage || updatedHotel.heroImage || '';\n updatedHotel.images = details.images || [];\n\n updatedHotel.email = details.email;\n updatedHotel.roomGroups = details.roomGroups;\n updatedHotel.rmsUseDepositQuote = details.rmsUseDepositQuote;\n updatedHotel.enableCreditCardSurcharge = details.enableCreditCardSurcharge;\n updatedHotel.integrations = details.integrations;\n updatedHotel.availableCountries = details.availableCountries;\n updatedHotel.preventCancellation = details.preventCancellation;\n updatedHotel.enableRoomUpsells = details.enableRoomUpsells;\n updatedHotel.enableRateUpsells = details.enableRateUpsells;\n\n if (updatedHotel.dataSource === HotelDataSource.Roomstay) {\n if (details.logo) {\n updatedHotel.logo = details.logo;\n }\n\n if (details.colors) {\n updatedHotel.colors = details.colors as IHotelColorScheme;\n }\n\n if (details.distanceUnitType) {\n updatedHotel.distanceUnitType = details.distanceUnitType;\n }\n\n if (details.weekdayStartsOn) {\n updatedHotel.startsWeekOnDay = details.weekdayStartsOn;\n }\n\n if (details.crossSellHotelIds) {\n updatedHotel.crossSellHotelIds = details.crossSellHotelIds;\n }\n\n if (details.stateFieldConfiguration) {\n updatedHotel.stateFieldConfiguration = details.stateFieldConfiguration;\n }\n }\n\n if (currentHotelVersion?.maxAdults) {\n //using HotelSpec maxAdults from frontend\n updatedHotel.maxAdults = currentHotelVersion.maxAdults;\n }\n\n if (details.maxAdults !== undefined) {\n updatedHotel.maxAdults = details.maxAdults;\n }\n\n if (details.maxChildren !== undefined) {\n updatedHotel.maxChildren = details.maxChildren;\n }\n\n if (details.maxInfants !== undefined) {\n updatedHotel.maxInfants = details.maxInfants;\n }\n\n if (details.rooms) {\n //dymanic maxOccupancy from rooms database\n const roomArray = Object.values(details.rooms);\n\n if (roomArray.length) {\n updatedHotel.maxOccupancy = roomArray.reduce((previousMax, current) => {\n return Math.max(previousMax, current.maxOccupancy);\n }, 0);\n }\n }\n\n updatedHotel.childConfiguration = details.childConfiguration;\n\n /**\n * Prioritized perks from roomstay-clients than roomstay-admin\n */\n updatedHotel.perks = updatedHotel.perks?.length ? updatedHotel.perks : details.perks;\n updatedHotel.perkTitle = updatedHotel.perkTitle ?? details.perkTitle;\n\n updatedHotel.countryPrefix = details.countryPrefix ?? updatedHotel.countryPrefix ?? '';\n updatedHotel.quoteImageDesktop = details.quoteImageDesktop ?? updatedHotel.quoteImageDesktop ?? '';\n updatedHotel.quoteImageMobile = details.quoteImageMobile ?? updatedHotel.quoteImageMobile ?? '';\n updatedHotel.memberOnlyImage = details.memberOnlyImage ?? updatedHotel.memberOnlyImage ?? '';\n if (details.memberOnlyRenderRateLast !== undefined) {\n updatedHotel.memberOnlyRenderRateLast = details.memberOnlyRenderRateLast;\n }\n updatedHotel.captureChildAge = details.captureChildAge;\n\n updatedHotel.fees = details.fees;\n updatedHotel.addDepositFeeToBookingTotal = details.addDepositFeeToBookingTotal;\n\n updatedHotel.company = details.company;\n\n updatedHotel.itineraryNote = details.itineraryNote;\n\n updatedHotel.minAdultAge = details.minAdultAge;\n updatedHotel.maxAdultAge = details.maxAdultAge;\n updatedHotel.countInfantsInOccupancy = details.countInfantsInOccupancy;\n updatedHotel.preferProviderBookingId = details.preferProviderBookingId;\n updatedHotel.disableSavedPayments = details.disableSavedPayments;\n updatedHotel.showUnavailableRooms = details.showUnavailableRooms;\n updatedHotel.isRACMemberNoRequired = details.isRACMemberNoRequired;\n\n resolve(updatedHotel);\n\n return updatedHotel;\n });\n }),\n []\n );\n\n useEffect(() => {\n setCompanyId(company.companyId);\n setName(company.name);\n setCompanyShort(company.companyShort);\n setLogo(company.logo);\n setColors(company.colors);\n setLogoLink(company.logoLink);\n setPrivacyPolicyUrl(company.privacyPolicyUrl);\n\n const configHotels = company.hotels.map((hotel: ConfigHotel) => {\n return { ...hotel, hasLoadedDetails: false, hotelID: `${hotel.hotelID}` } as Hotel;\n });\n setHotels(configHotels);\n\n if (company.selectedHotel) {\n const hotelId = typeof company.selectedHotel === 'string' ? company.selectedHotel : company.selectedHotel.hotelID + '';\n const targetHotel: ConfigHotel | undefined = getHotelFromArrayWithId(hotelId, configHotels);\n if (targetHotel) {\n setSelectedHotelID(hotelId);\n } else {\n // TODO: add centralized error logging\n console.log(`Unable to set selected hotel automatically. No Hotel found with ID: ${company.selectedHotel}`);\n }\n } else {\n /*\n We need to check if for some reason HotelStep isn't set as the first step,\n to automatically select a hotel, so engine doesn't fall over\n\n Possible TODO: We might need to do this on a new Step level, instead of here, as dynamically checking if StepHotel\n is first is probably not a great idea...\n */\n\n // Don't select hotel for MemberPortalWidget with groupWidgetConfig\n const isMemberPortalWithGroup = beContext.engine instanceof MemberPortalWidget && beContext.engine.getConfig().groupWidgetConfig;\n\n if (StepManager.getFirstStep() !== StepHotel && !isMemberPortalWithGroup) {\n setSelectedHotelID(configHotels[0].hotelID);\n console.log(`No selected hotel found - defaulting to ${configHotels[0].name}`);\n } else {\n RoomstayThemeEngine.registerStyles(company.colors);\n }\n }\n }, [company]);\n\n const onSelectedHotelIDChanged = React.useCallback(async () => {\n if (selectedHotelID) {\n const selectedHotel = await getHotel(selectedHotelID);\n\n if (selectedHotel) {\n currencyHelper.loadExchangeRates(selectedHotel.defaultCurrency ?? 'AUD');\n\n StaticContextProvider.MemberOnlyRateCodes = selectedHotel.memberOnlyRates ?? [];\n\n DataLayer.instance.initialiseGTM(company, selectedHotel);\n\n // Prep session based storage\n const sessionProvider = beContext.engine.getSessionProvider();\n await sessionProvider.setHotelID(selectedHotelID);\n\n // Prep local storage (non-session based)\n beContext.storageProvider.setHotelId(selectedHotelID);\n\n // Reload current user?\n const user = await beContext.storageProvider.getUser();\n\n if (user) {\n await signUserIn(user);\n }\n\n setCurrentCurrency(selectedHotel.defaultCurrency);\n\n selectedHotel?.onLoad?.();\n }\n } else {\n DataLayer.instance.initialiseGTM(company);\n }\n }, [selectedHotelID]);\n\n useEffect(() => {\n onSelectedHotelIDChanged();\n }, [onSelectedHotelIDChanged]);\n\n useEffect(() => {\n const selectedHotel = getSelectedHotel();\n\n DataLayer.instance.setCurrencyCodes(currentCurrency, selectedHotel?.defaultCurrency ?? currentCurrency);\n }, [currentCurrency, selectedHotelID]);\n\n // TODO: Add Hotel Details fetch\n // TODO: re-do fetch on language change\n\n const workingContext: CompanyContextType = {\n currentLanguage,\n currentCurrency,\n\n memberOnlyModalPromotion,\n\n companyId,\n name,\n companyShort,\n logo,\n logoLink,\n privacyPolicyUrl,\n\n colors,\n hotels,\n\n signedInUser,\n isSigningIn,\n\n selectedHotelID: selectedHotelID as string,\n\n updateLowestPricePerNight: (hotel: string | Hotel, row: BasketRow) => {\n const targetHotel = getHotelFromID(typeof hotel === 'string' ? hotel : hotel.hotelID + '');\n\n if (targetHotel && row) {\n const updatePrice = (value: number, isLoading: boolean) => {\n updateHotel(targetHotel, (hotel) => ({\n ...hotel,\n lowestPrice: { value, isLoading },\n }));\n };\n\n const filters: Filter[] = Object.values(beContext.currentFilters).filter(Boolean) as Filter[];\n\n // Start loading with price = 0\n updatePrice(0, true);\n\n FilterProvider.getRoomList(row, filters, targetHotel.hotelID as string, memberNumber)\n .then((availableRooms) => {\n const lowest =\n availableRooms?.reduce((min, room) => {\n const price = room.getLowestPrice();\n // Skip null, undefined, and 0 prices. Return the lowest positive price.\n return price != null && price > 0 ? Math.min(min, price) : min;\n }, Infinity) ?? Infinity;\n\n const finalLowest = isFinite(lowest) ? lowest : 0;\n updatePrice(finalLowest, false);\n })\n .catch(() => {\n updatePrice(0, false);\n });\n }\n },\n\n changeHotel: (hotel: string | Hotel | null) => {\n if (hotel === null) {\n setSelectedHotelID(undefined);\n return true;\n }\n\n const targetHotel = getHotelFromID(typeof hotel === 'string' ? hotel : hotel.hotelID + '');\n\n if (targetHotel) {\n setSelectedHotelID(targetHotel.hotelID);\n return true;\n } else {\n // TODO: add centralized error logging\n console.log(`Unable to set selected hotel automatically. No Hotel found with ID: ${company.selectedHotel}`);\n return false;\n }\n },\n\n closeMemberSignupModal: () => {\n setIsSigningIn(false);\n setMemberOnlyModalPromotion(null);\n },\n openMemberSignupModal: (promotion?: IPromotion) => {\n setIsSigningIn(true);\n\n if (promotion) {\n setMemberOnlyModalPromotion(promotion);\n }\n },\n\n signUserIn,\n signUserOut,\n\n setCurrentCurrency,\n setCurrentLanguage,\n\n getHotel,\n externalMemberType,\n isExternalMemberHotel,\n memberNumber: memberNumber,\n selectedHotel,\n };\n\n return <CompanyContext.Provider value={workingContext}>{children}</CompanyContext.Provider>;\n};\n"]}
|
|
1
|
+
{"version":3,"file":"CompanyContextWrapper.js","sourceRoot":"/","sources":["src/contexts/CompanyContext/CompanyContextWrapper.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAA0G;AAC1G,6CAAsF;AACtF,2CAA2C;AAC3C,yCAAiE;AACjE,+CAAiG;AAEjG,kEAAm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AAkB;QAClB,qBAAqB;QACrB,YAAY,EAAE,YAAY;QAC1B,aAAa;KAChB,CAAC;IAEF,OAAO,8BAAC,yBAAc,CAAC,QAAQ,IAAC,KAAK,EAAE,cAAc,IAAG,QAAQ,CAA2B,CAAC;AAChG,CAAC,CAAC;AAhfW,QAAA,qBAAqB,yBAgfhC","sourcesContent":["import { BookingEngineContext, CompanyContext, CompanyContextType, SignInUser } from '@frontend/contexts';\nimport { InitialHotelDetailsEvent, SelectedHotelChangeEvent } from '@frontend/events';\nimport { useEvent } from '@frontend/hooks';\nimport { EIntegration, IHotelColorScheme } from '@roomstay/core';\nimport React, { ReactChild, useCallback, useContext, useEffect, useMemo, useState } from 'react';\n\nimport API from '@/api/BookingAPI';\nimport { MemberPortalWidget } from '@/engines/MemberPortalWidget/MemberPortalWidget';\nimport { MemberOnlyFenceSignUp } from '@/events/actions/MemberOnlyFence/MemberOnlyFenceSignUp';\nimport { HotelDTO } from '@/models/Api/HotelDTO';\nimport BasketRow from '@/models/BasketRow';\nimport type { ConfigCompany } from '@/models/Client/Hotel/Company';\nimport type { ConfigHotel, Hotel, InitialHotelDetailsEventPayload } from '@/models/Client/Hotel/Hotel';\nimport { HotelDataSource } from '@/models/Client/Hotel/HotelDataSource.types';\nimport { IPromotion } from '@/models/Promotion/IPromotion.type';\nimport Filter from '@/models/Room/Filters/Filter';\nimport StepHotel from '@/pages/steps/StepHotel/StepHotel';\nimport FilterProvider from '@/providers/FilterProvider';\nimport { Language } from '@/providers/LanguageProvider';\nimport RoomstayThemeEngine from '@/providers/RoomstayThemeEngine';\nimport StaticContextProvider from '@/providers/StaticContextProvider';\nimport * as currencyHelper from '@/util/CurrencyHelper';\nimport DataLayer from '@/util/DataLayer';\nimport StepManager from '@/util/StepManager';\nimport TimeHelper from '@/util/TimeHelper';\n\ninterface CompanyContextWrapperProps {\n children: ReactChild;\n configCompany: ConfigCompany;\n}\n\nexport const CompanyContextWrapper = ({ configCompany: company, children }: CompanyContextWrapperProps) => {\n const beContext = useContext(BookingEngineContext);\n\n const getSelectedHotel = () => {\n for (const hotel of hotels) {\n if (selectedHotelID + '' === hotel.hotelID + '') {\n return hotel;\n }\n }\n };\n\n const [companyId, setCompanyId] = useState(company.companyId);\n const [name, setName] = useState(company.name);\n const [companyShort, setCompanyShort] = useState(company.companyShort);\n const [logo, setLogo] = useState(company.logo);\n const [colors, setColors] = useState(company.colors);\n const [hotels, setHotels] = useState<Hotel[]>(company.hotels as Hotel[]);\n const [logoLink, setLogoLink] = useState(company.logoLink);\n const [privacyPolicyUrl, setPrivacyPolicyUrl] = useState(company.privacyPolicyUrl);\n\n const [selectedHotelID, setSelectedHotelID] = useState<string>();\n\n const selectedHotel = useMemo(() => {\n for (const companyHotel of hotels) {\n if (selectedHotelID + '' === companyHotel.hotelID + '') {\n return companyHotel;\n }\n }\n }, [hotels, selectedHotelID]);\n\n const [currentCurrency, setCurrentCurrency] = useState<string>(getSelectedHotel()?.defaultCurrency ?? 'AUD');\n const [currentLanguage, setCurrentLanguage] = useState<Language>(getSelectedHotel()?.defaultLanguage ?? Language.en_us);\n\n const [memberOnlyModalPromotion, setMemberOnlyModalPromotion] = useState<IPromotion | null>(null);\n\n const [signedInUser, setSignedInUser] = useState<SignInUser | null>(null);\n const [isSigningIn, setIsSigningIn] = useState(false);\n\n const [memberNumber, setMemberNumber] = useState<string>();\n const [isExternalMemberHotel, setIsExternalMemberHotel] = useState<boolean>(false);\n\n const externalMemberType = useMemo(() => {\n const integrations = selectedHotel?.integrations;\n\n // Because integrations is an array of strings technically both Big4 and Top10 theoretically come down, so we'll choose one\n if (integrations?.includes(EIntegration.Big4)) {\n return EIntegration.Big4;\n } else if (integrations?.includes(EIntegration.Top10)) {\n return EIntegration.Top10;\n } else if (integrations?.includes(EIntegration.RmsTop10)) {\n return EIntegration.RmsTop10;\n } else if (integrations?.includes(EIntegration.Gday)) {\n return EIntegration.Gday;\n } else if (integrations?.includes(EIntegration.Salesforce)) {\n return EIntegration.Salesforce;\n } else if (integrations?.includes(EIntegration.RAC)) {\n return EIntegration.RAC;\n }\n }, [selectedHotel]);\n\n useEffect(() => {\n const isExternalProvider =\n selectedHotel?.integrations?.some(\n (provider) =>\n provider === EIntegration.Big4 ||\n provider === EIntegration.Top10 ||\n provider === EIntegration.RmsTop10 ||\n provider === EIntegration.Gday ||\n provider === EIntegration.Salesforce ||\n provider === EIntegration.RAC\n ) || false;\n setIsExternalMemberHotel(isExternalProvider);\n\n raise(new SelectedHotelChangeEvent(selectedHotel));\n }, [selectedHotel]);\n\n const { raise } = useEvent();\n\n const getHotelFromArrayWithId = (id: string, arrayOfHotels: Hotel[] | ConfigHotel[]) => {\n for (const nextHotel of arrayOfHotels) {\n if (nextHotel.hotelID + '' === id + '') {\n return nextHotel;\n }\n }\n };\n const getHotelFromID = (id: string): Hotel => {\n return getHotelFromArrayWithId(id, hotels) as Hotel;\n };\n\n const updateHotel = (newHotel: Hotel, callback?: (hotel: Hotel) => Hotel) => {\n setHotels((oldHotels) => {\n let modified = false;\n const newHotelArray = oldHotels.map((mappingHotel) => {\n if (mappingHotel.hotelID + '' === newHotel.hotelID + '') {\n modified = true;\n\n const hotelDetails: InitialHotelDetailsEventPayload = {\n name: newHotel.name,\n hotelID: newHotel.hotelID,\n hotelUrl: newHotel.hotelUrl,\n currency: newHotel.defaultCurrency,\n language: newHotel.defaultLanguage,\n address: newHotel.address,\n };\n\n const event = new InitialHotelDetailsEvent(hotelDetails);\n raise(event);\n\n if (callback) {\n return { ...callback(mappingHotel) };\n }\n\n return { ...newHotel };\n }\n\n return { ...mappingHotel };\n });\n\n if (!modified) {\n newHotelArray.push(newHotel);\n if (callback) {\n // Fixed: Ensure the callback returns the hotel; otherwise, the UI may receive undefined.\n callback(newHotel);\n }\n }\n\n return newHotelArray;\n });\n };\n\n const signUserIn = async (user: SignInUser) => {\n raise(new MemberOnlyFenceSignUp(memberOnlyModalPromotion as IPromotion, user));\n\n workingContext.closeMemberSignupModal();\n\n await beContext.sessionProvider.updateSession({ user: user, memberId: user.memberNumber });\n\n setSignedInUser(user);\n setMemberNumber(user.memberNumber);\n\n if (user.saveState) {\n await beContext.storageProvider.setUser(user);\n }\n };\n\n const signUserOut = async () => {\n await beContext.sessionProvider.updateSession({ user: undefined, memberId: undefined });\n await beContext.storageProvider.setUser(undefined);\n setSignedInUser(null);\n setMemberNumber(undefined);\n };\n\n const getHotel = useCallback(\n (hotelId: string) =>\n new Promise<Hotel>(async (resolve, reject) => {\n const currentHotelVersion: Hotel | undefined = getHotelFromID(hotelId) as Hotel;\n const newHotel: Hotel = {\n ...currentHotelVersion,\n // Fixed: Specified Hotel not found\n // Ensure hotelID is set explicitly in case currentHotelVersion is undefined or missing it.\n hotelID: hotelId,\n };\n let details: HotelDTO;\n\n try {\n details = await API.Hotel.fetchData(currentLanguage, newHotel);\n } catch (ex) {\n reject(ex);\n }\n\n updateHotel(newHotel, (updatedHotel) => {\n updatedHotel.name = details.name;\n updatedHotel.address = details.address;\n\n updatedHotel.latitude = Number(details.latitude);\n updatedHotel.longitude = Number(details.longitude);\n updatedHotel.phone = details.phone;\n\n updatedHotel.checkInTime = TimeHelper.convert24To12hr(details.checkInTime);\n updatedHotel.checkOutTime = TimeHelper.convert24To12hr(details.checkOutTime);\n\n updatedHotel.paymentCardTypes = details.paymentCardTypes;\n updatedHotel.description = details.description;\n updatedHotel.locationDescription = details.locationDescription;\n updatedHotel.policies = details.policies;\n\n updatedHotel.hotelServices = details.hotelServices;\n updatedHotel.businessServices = details.businessServices;\n updatedHotel.rooms = details.rooms;\n\n updatedHotel.hasLoadedDetails = true;\n updatedHotel.dataSource = details.dataSource;\n\n updatedHotel.defaultCurrency = details.currencyCode;\n updatedHotel.cardProcessor = details.cardProcessor;\n updatedHotel.paymentMethods = details.paymentMethods;\n updatedHotel.planpay = details.planpay;\n updatedHotel.hotelUrl = details.hotelUrl || updatedHotel.hotelUrl || '';\n updatedHotel.heroImage = details.heroImage || updatedHotel.heroImage || '';\n updatedHotel.images = details.images || [];\n\n updatedHotel.email = details.email;\n updatedHotel.roomGroups = details.roomGroups;\n updatedHotel.rmsUseDepositQuote = details.rmsUseDepositQuote;\n updatedHotel.checkAreaAvailabilityOnRoomStep = details.checkAreaAvailabilityOnRoomStep;\n updatedHotel.enableCreditCardSurcharge = details.enableCreditCardSurcharge;\n updatedHotel.integrations = details.integrations;\n updatedHotel.availableCountries = details.availableCountries;\n updatedHotel.preventCancellation = details.preventCancellation;\n updatedHotel.enableRoomUpsells = details.enableRoomUpsells;\n updatedHotel.enableRateUpsells = details.enableRateUpsells;\n\n if (updatedHotel.dataSource === HotelDataSource.Roomstay) {\n if (details.logo) {\n updatedHotel.logo = details.logo;\n }\n\n if (details.colors) {\n updatedHotel.colors = details.colors as IHotelColorScheme;\n }\n\n if (details.distanceUnitType) {\n updatedHotel.distanceUnitType = details.distanceUnitType;\n }\n\n if (details.weekdayStartsOn) {\n updatedHotel.startsWeekOnDay = details.weekdayStartsOn;\n }\n\n if (details.crossSellHotelIds) {\n updatedHotel.crossSellHotelIds = details.crossSellHotelIds;\n }\n\n if (details.stateFieldConfiguration) {\n updatedHotel.stateFieldConfiguration = details.stateFieldConfiguration;\n }\n }\n\n if (currentHotelVersion?.maxAdults) {\n //using HotelSpec maxAdults from frontend\n updatedHotel.maxAdults = currentHotelVersion.maxAdults;\n }\n\n if (details.maxAdults !== undefined) {\n updatedHotel.maxAdults = details.maxAdults;\n }\n\n if (details.maxChildren !== undefined) {\n updatedHotel.maxChildren = details.maxChildren;\n }\n\n if (details.maxInfants !== undefined) {\n updatedHotel.maxInfants = details.maxInfants;\n }\n\n if (details.rooms) {\n //dymanic maxOccupancy from rooms database\n const roomArray = Object.values(details.rooms);\n\n if (roomArray.length) {\n updatedHotel.maxOccupancy = roomArray.reduce((previousMax, current) => {\n return Math.max(previousMax, current.maxOccupancy);\n }, 0);\n }\n }\n\n updatedHotel.childConfiguration = details.childConfiguration;\n\n /**\n * Prioritized perks from roomstay-clients than roomstay-admin\n */\n updatedHotel.perks = updatedHotel.perks?.length ? updatedHotel.perks : details.perks;\n updatedHotel.perkTitle = updatedHotel.perkTitle ?? details.perkTitle;\n\n updatedHotel.countryPrefix = details.countryPrefix ?? updatedHotel.countryPrefix ?? '';\n updatedHotel.quoteImageDesktop = details.quoteImageDesktop ?? updatedHotel.quoteImageDesktop ?? '';\n updatedHotel.quoteImageMobile = details.quoteImageMobile ?? updatedHotel.quoteImageMobile ?? '';\n updatedHotel.memberOnlyImage = details.memberOnlyImage ?? updatedHotel.memberOnlyImage ?? '';\n if (details.memberOnlyRenderRateLast !== undefined) {\n updatedHotel.memberOnlyRenderRateLast = details.memberOnlyRenderRateLast;\n }\n updatedHotel.captureChildAge = details.captureChildAge;\n\n updatedHotel.fees = details.fees;\n updatedHotel.addDepositFeeToBookingTotal = details.addDepositFeeToBookingTotal;\n\n updatedHotel.company = details.company;\n\n updatedHotel.itineraryNote = details.itineraryNote;\n\n updatedHotel.minAdultAge = details.minAdultAge;\n updatedHotel.maxAdultAge = details.maxAdultAge;\n updatedHotel.countInfantsInOccupancy = details.countInfantsInOccupancy;\n updatedHotel.preferProviderBookingId = details.preferProviderBookingId;\n updatedHotel.disableSavedPayments = details.disableSavedPayments;\n updatedHotel.showUnavailableRooms = details.showUnavailableRooms;\n updatedHotel.isRACMemberNoRequired = details.isRACMemberNoRequired;\n\n resolve(updatedHotel);\n\n return updatedHotel;\n });\n }),\n []\n );\n\n useEffect(() => {\n setCompanyId(company.companyId);\n setName(company.name);\n setCompanyShort(company.companyShort);\n setLogo(company.logo);\n setColors(company.colors);\n setLogoLink(company.logoLink);\n setPrivacyPolicyUrl(company.privacyPolicyUrl);\n\n const configHotels = company.hotels.map((hotel: ConfigHotel) => {\n return { ...hotel, hasLoadedDetails: false, hotelID: `${hotel.hotelID}` } as Hotel;\n });\n setHotels(configHotels);\n\n if (company.selectedHotel) {\n const hotelId = typeof company.selectedHotel === 'string' ? company.selectedHotel : company.selectedHotel.hotelID + '';\n const targetHotel: ConfigHotel | undefined = getHotelFromArrayWithId(hotelId, configHotels);\n if (targetHotel) {\n setSelectedHotelID(hotelId);\n } else {\n // TODO: add centralized error logging\n console.log(`Unable to set selected hotel automatically. No Hotel found with ID: ${company.selectedHotel}`);\n }\n } else {\n /*\n We need to check if for some reason HotelStep isn't set as the first step,\n to automatically select a hotel, so engine doesn't fall over\n\n Possible TODO: We might need to do this on a new Step level, instead of here, as dynamically checking if StepHotel\n is first is probably not a great idea...\n */\n\n // Don't select hotel for MemberPortalWidget with groupWidgetConfig\n const isMemberPortalWithGroup = beContext.engine instanceof MemberPortalWidget && beContext.engine.getConfig().groupWidgetConfig;\n\n if (StepManager.getFirstStep() !== StepHotel && !isMemberPortalWithGroup) {\n setSelectedHotelID(configHotels[0].hotelID);\n console.log(`No selected hotel found - defaulting to ${configHotels[0].name}`);\n } else {\n RoomstayThemeEngine.registerStyles(company.colors);\n }\n }\n }, [company]);\n\n const onSelectedHotelIDChanged = React.useCallback(async () => {\n if (selectedHotelID) {\n const selectedHotel = await getHotel(selectedHotelID);\n\n if (selectedHotel) {\n currencyHelper.loadExchangeRates(selectedHotel.defaultCurrency ?? 'AUD');\n\n StaticContextProvider.MemberOnlyRateCodes = selectedHotel.memberOnlyRates ?? [];\n\n DataLayer.instance.initialiseGTM(company, selectedHotel);\n\n // Prep session based storage\n const sessionProvider = beContext.engine.getSessionProvider();\n await sessionProvider.setHotelID(selectedHotelID);\n\n // Prep local storage (non-session based)\n beContext.storageProvider.setHotelId(selectedHotelID);\n\n // Reload current user?\n const user = await beContext.storageProvider.getUser();\n\n if (user) {\n await signUserIn(user);\n }\n\n setCurrentCurrency(selectedHotel.defaultCurrency);\n\n selectedHotel?.onLoad?.();\n }\n } else {\n DataLayer.instance.initialiseGTM(company);\n }\n }, [selectedHotelID]);\n\n useEffect(() => {\n onSelectedHotelIDChanged();\n }, [onSelectedHotelIDChanged]);\n\n useEffect(() => {\n const selectedHotel = getSelectedHotel();\n\n DataLayer.instance.setCurrencyCodes(currentCurrency, selectedHotel?.defaultCurrency ?? currentCurrency);\n }, [currentCurrency, selectedHotelID]);\n\n // TODO: Add Hotel Details fetch\n // TODO: re-do fetch on language change\n\n const workingContext: CompanyContextType = {\n currentLanguage,\n currentCurrency,\n\n memberOnlyModalPromotion,\n\n companyId,\n name,\n companyShort,\n logo,\n logoLink,\n privacyPolicyUrl,\n\n colors,\n hotels,\n\n signedInUser,\n isSigningIn,\n\n selectedHotelID: selectedHotelID as string,\n\n updateLowestPricePerNight: (hotel: string | Hotel, row: BasketRow) => {\n const targetHotel = getHotelFromID(typeof hotel === 'string' ? hotel : hotel.hotelID + '');\n\n if (targetHotel && row) {\n const updatePrice = (value: number, isLoading: boolean) => {\n updateHotel(targetHotel, (hotel) => ({\n ...hotel,\n lowestPrice: { value, isLoading },\n }));\n };\n\n const filters: Filter[] = Object.values(beContext.currentFilters).filter(Boolean) as Filter[];\n\n // Start loading with price = 0\n updatePrice(0, true);\n\n FilterProvider.getRoomList(row, filters, targetHotel.hotelID as string, memberNumber)\n .then((availableRooms) => {\n const lowest =\n availableRooms?.reduce((min, room) => {\n const price = room.getLowestPrice();\n // Skip null, undefined, and 0 prices. Return the lowest positive price.\n return price != null && price > 0 ? Math.min(min, price) : min;\n }, Infinity) ?? Infinity;\n\n const finalLowest = isFinite(lowest) ? lowest : 0;\n updatePrice(finalLowest, false);\n })\n .catch(() => {\n updatePrice(0, false);\n });\n }\n },\n\n changeHotel: (hotel: string | Hotel | null) => {\n if (hotel === null) {\n setSelectedHotelID(undefined);\n return true;\n }\n\n const targetHotel = getHotelFromID(typeof hotel === 'string' ? hotel : hotel.hotelID + '');\n\n if (targetHotel) {\n setSelectedHotelID(targetHotel.hotelID);\n return true;\n } else {\n // TODO: add centralized error logging\n console.log(`Unable to set selected hotel automatically. No Hotel found with ID: ${company.selectedHotel}`);\n return false;\n }\n },\n\n closeMemberSignupModal: () => {\n setIsSigningIn(false);\n setMemberOnlyModalPromotion(null);\n },\n openMemberSignupModal: (promotion?: IPromotion) => {\n setIsSigningIn(true);\n\n if (promotion) {\n setMemberOnlyModalPromotion(promotion);\n }\n },\n\n signUserIn,\n signUserOut,\n\n setCurrentCurrency,\n setCurrentLanguage,\n\n getHotel,\n externalMemberType,\n isExternalMemberHotel,\n memberNumber: memberNumber,\n selectedHotel,\n };\n\n return <CompanyContext.Provider value={workingContext}>{children}</CompanyContext.Provider>;\n};\n"]}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useAreaAvailability = void 0;
|
|
4
|
+
const contexts_1 = require("../contexts/index.js");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const index_1 = require("../index");
|
|
7
|
+
const useAreaAvailability = (room) => {
|
|
8
|
+
var _a;
|
|
9
|
+
const { hotel } = (0, index_1.useCurrentHotel)();
|
|
10
|
+
const basketContext = (0, react_1.useContext)(contexts_1.BasketContext);
|
|
11
|
+
const beContext = (0, react_1.useContext)(contexts_1.BookingEngineContext);
|
|
12
|
+
// By default, we assume the room is available.
|
|
13
|
+
const [isAvailable, setIsAvailable] = (0, react_1.useState)(true);
|
|
14
|
+
const selectedBasketRow = (_a = basketContext.selectedBasketRow) !== null && _a !== void 0 ? _a : basketContext.currentBasketRows[0];
|
|
15
|
+
(0, react_1.useEffect)(() => {
|
|
16
|
+
var _a;
|
|
17
|
+
let isCancelled = false;
|
|
18
|
+
setIsAvailable(true);
|
|
19
|
+
const roomCode = room === null || room === void 0 ? void 0 : room.code;
|
|
20
|
+
if ((hotel === null || hotel === void 0 ? void 0 : hotel.checkAreaAvailabilityOnRoomStep) && roomCode) {
|
|
21
|
+
// Find the room group that this room belongs to
|
|
22
|
+
const roomGroup = (_a = hotel.roomGroups) === null || _a === void 0 ? void 0 : _a.find((group) => group.id === (room === null || room === void 0 ? void 0 : room.roomGroupId));
|
|
23
|
+
// Get the filter IDs that belong to this room group
|
|
24
|
+
const roomGroupFilterIds = (roomGroup === null || roomGroup === void 0 ? void 0 : roomGroup.filters) ? Object.keys(roomGroup.filters) : [];
|
|
25
|
+
// Filter to only include filters that belong to this room's room group
|
|
26
|
+
const applicableFilters = Object.fromEntries(Object.entries(beContext.currentGroupedRoomFilters).filter(([id]) => {
|
|
27
|
+
return roomGroupFilterIds.includes(id);
|
|
28
|
+
}));
|
|
29
|
+
index_1.API.Availability.fetchAreaAvailability(selectedBasketRow, hotel.hotelID, applicableFilters).then((areaAvailability) => {
|
|
30
|
+
if (!isCancelled && areaAvailability[roomCode] === 0) {
|
|
31
|
+
setIsAvailable(false);
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
return () => {
|
|
36
|
+
isCancelled = true;
|
|
37
|
+
};
|
|
38
|
+
}, [selectedBasketRow, beContext.currentGroupedRoomFilters, hotel, room]);
|
|
39
|
+
return isAvailable;
|
|
40
|
+
};
|
|
41
|
+
exports.useAreaAvailability = useAreaAvailability;
|
|
42
|
+
//# sourceMappingURL=useAreaAvailability.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAreaAvailability.js","sourceRoot":"/","sources":["src/hooks/useAreaAvailability.ts"],"names":[],"mappings":";;;AAAA,iDAAyE;AACzE,iCAAwD;AAExD,mCAA+C;AAGxC,MAAM,mBAAmB,GAAG,CAAC,IAAW,EAAE,EAAE;;IAC/C,MAAM,EAAE,KAAK,EAAE,GAAG,IAAA,uBAAe,GAAE,CAAC;IACpC,MAAM,aAAa,GAAG,IAAA,kBAAU,EAAC,wBAAa,CAAC,CAAC;IAChD,MAAM,SAAS,GAAG,IAAA,kBAAU,EAAC,+BAAoB,CAAC,CAAC;IAEnD,+CAA+C;IAC/C,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,IAAA,gBAAQ,EAAU,IAAI,CAAC,CAAC;IAE9D,MAAM,iBAAiB,GAAG,MAAA,aAAa,CAAC,iBAAiB,mCAAI,aAAa,CAAC,iBAAiB,CA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C,CAAC,CAAC;QACP,CAAC;QAED,OAAO,GAAG,EAAE;YACR,WAAW,GAAG,IAAI,CAAC;QACvB,CAAC,CAAC;IACN,CAAC,EAAE,CAAC,iBAAiB,EAAE,SAAS,CAAC,yBAAyB,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC;IAE1E,OAAO,WAAW,CAAC;AACvB,CAAC,CAAC;AA3CW,QAAA,mBAAmB,uBA2C9B","sourcesContent":["import { BasketContext, BookingEngineContext } from '@frontend/contexts';\nimport { useContext, useEffect, useState } from 'react';\n\nimport { API, useCurrentHotel } from '@/index';\nimport { Room } from '@/models/Room/Room';\n\nexport const useAreaAvailability = (room?: Room) => {\n const { hotel } = useCurrentHotel();\n const basketContext = useContext(BasketContext);\n const beContext = useContext(BookingEngineContext);\n\n // By default, we assume the room is available.\n const [isAvailable, setIsAvailable] = useState<boolean>(true);\n\n const selectedBasketRow = basketContext.selectedBasketRow ?? basketContext.currentBasketRows[0];\n\n useEffect(() => {\n let isCancelled = false;\n setIsAvailable(true);\n\n const roomCode = room?.code;\n\n if (hotel?.checkAreaAvailabilityOnRoomStep && roomCode) {\n // Find the room group that this room belongs to\n const roomGroup = hotel.roomGroups?.find((group) => group.id === room?.roomGroupId);\n\n // Get the filter IDs that belong to this room group\n const roomGroupFilterIds = roomGroup?.filters ? Object.keys(roomGroup.filters) : [];\n\n // Filter to only include filters that belong to this room's room group\n const applicableFilters = Object.fromEntries(\n Object.entries(beContext.currentGroupedRoomFilters).filter(([id]) => {\n return roomGroupFilterIds.includes(id);\n })\n );\n\n API.Availability.fetchAreaAvailability(selectedBasketRow, hotel.hotelID, applicableFilters).then((areaAvailability) => {\n if (!isCancelled && areaAvailability[roomCode] === 0) {\n setIsAvailable(false);\n }\n });\n }\n\n return () => {\n isCancelled = true;\n };\n }, [selectedBasketRow, beContext.currentGroupedRoomFilters, hotel, room]);\n\n return isAvailable;\n};\n"]}
|
|
@@ -28,6 +28,7 @@ export type HotelRoomGroupsDTO = {
|
|
|
28
28
|
includeAllAbove: boolean;
|
|
29
29
|
requireInput: boolean;
|
|
30
30
|
options: IAuxiliaryFilter['options'];
|
|
31
|
+
requireSelection: boolean;
|
|
31
32
|
};
|
|
32
33
|
};
|
|
33
34
|
}[];
|
|
@@ -101,6 +102,7 @@ export type HotelDTO = {
|
|
|
101
102
|
integrations?: EIntegration[];
|
|
102
103
|
roomGroups: HotelRoomGroupsDTO;
|
|
103
104
|
rmsUseDepositQuote?: boolean;
|
|
105
|
+
checkAreaAvailabilityOnRoomStep?: boolean;
|
|
104
106
|
/** @deprecated Use the new Fees model instead */
|
|
105
107
|
enableCreditCardSurcharge?: boolean;
|
|
106
108
|
availableCountries?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HotelDTO.js","sourceRoot":"/","sources":["src/models/Api/HotelDTO.ts"],"names":[],"mappings":";;;AAMA,uDAAiH;
|
|
1
|
+
{"version":3,"file":"HotelDTO.js","sourceRoot":"/","sources":["src/models/Api/HotelDTO.ts"],"names":[],"mappings":";;;AAMA,uDAAiH;AA0JjH,IAAY,WAOX;AAPD,WAAY,WAAW;IACnB,4BAAa,CAAA;IACb,wCAAyB,CAAA;IACzB,0BAAW,CAAA;IACX,wCAAyB,CAAA;IACzB,uCAAwB,CAAA;IACxB,oCAAqB,CAAA;AACzB,CAAC,EAPW,WAAW,2BAAX,WAAW,QAOtB;AAEY,QAAA,0BAA0B,GAAsD;IACzF,CAAC,wBAAgB,CAAC,IAAI,CAAC,EAAE,WAAW,CAAC,IAAI;IACzC,CAAC,wBAAgB,CAAC,UAAU,CAAC,EAAE,WAAW,CAAC,UAAU;IACrD,CAAC,wBAAgB,CAAC,GAAG,CAAC,EAAE,WAAW,CAAC,GAAG;IACvC,CAAC,wBAAgB,CAAC,eAAe,CAAC,EAAE,WAAW,CAAC,eAAe;IAC/D,CAAC,wBAAgB,CAAC,UAAU,CAAC,EAAE,WAAW,CAAC,UAAU;IACrD,CAAC,wBAAgB,CAAC,QAAQ,CAAC,EAAE,WAAW,CAAC,QAAQ;CACpD,CAAC","sourcesContent":["import { EnvironmentName } from '@planpay/web/src/lib/shared-lib-duplicates';\nimport type { EBookingPaymentMethod, EHotelCardProcessor, EHotelStateFieldConfiguration, EIntegration, IAuxiliaryFilter } from '@roomstay/core';\nimport { DeepPartial } from 'react-hook-form';\n\nimport ColorProfile from '@/models/Client/Hotel/ColorProfile';\nimport { DistanceUnitType } from '@/models/Client/Hotel/DistanceUnitType.types';\nimport { AdminHotelConfig, ClientHotelConfig, ConfigHotel, EPaymentCardType } from '@/models/Client/Hotel/Hotel';\nimport HotelAddress from '@/models/Client/Hotel/HotelAddress';\nimport { HotelDataSource } from '@/models/Client/Hotel/HotelDataSource.types';\nimport { WeekdayStartsOn } from '@/models/Client/Hotel/WeekdayStartsOn.types';\n\nexport type HotelServiceDTO = {\n detail: string;\n included: boolean;\n name: string;\n onsite: boolean;\n};\n\nexport type HotelRoomsDTO = {\n [roomTypeCode: string]: HotelRoomDTO;\n};\n\nexport type HotelRoomGroupsDTO = {\n groupName: string;\n id: string;\n checkInTime?: string | null;\n checkOutTime?: string | null;\n filters: {\n [id: string]: {\n // Options on the AuxiliaryFilter itself:\n name: string;\n type: 'select';\n includeAllAbove: boolean;\n requireInput: boolean;\n options: IAuxiliaryFilter['options'];\n\n // Options on the RoomGroupAuxiliaryFilter:\n requireSelection: boolean;\n };\n };\n}[];\n\nexport type HotelRoomAmenitiesDTO = {\n type: string;\n description: string;\n};\n\nexport type HotelRoomDTO = {\n code: string;\n name: string;\n shortDescription: string;\n longDescription: string;\n images: string[];\n quantity: number;\n maxOccupancy: number;\n bedQuantity: number;\n showBedType?: boolean;\n standardNumBeds: number;\n maxRollaways: number;\n bedType: string;\n amenities: HotelRoomAmenitiesDTO[];\n features: HotelRoomAmenitiesDTO[];\n bedTypeOverride?: string;\n roomGroupId?: string;\n roomSize?: number;\n prePerkDisclaimer?: string;\n perks?: ConfigHotel['perks'];\n petFriendly?: boolean;\n};\n\nexport type HotelDTO = {\n id: number;\n name: string;\n chainId: number;\n chainName: string;\n\n address: HotelAddress;\n phone: string;\n\n latitude: string;\n longitude: string;\n\n utcOffset: string;\n timeZone: string;\n\n languageCode: string;\n currencyCode: string;\n\n checkInTime: string;\n checkOutTime: string;\n\n paymentCardTypes: EPaymentCardType[];\n\n description: string;\n locationDescription: string;\n policies: string;\n\n hotelServices: HotelServiceDTO[];\n businessServices: HotelServiceDTO[];\n\n rooms: { [roomTypeCode: string]: HotelRoomDTO };\n dataSource: HotelDataSource;\n\n // Following fields are only present if dataSource = 'roomstay'\n logo?: string;\n colors: DeepPartial<ColorProfile>;\n distanceUnitType?: DistanceUnitType;\n weekdayStartsOn?: WeekdayStartsOn;\n\n crossSellHotelIds?: string[];\n paymentMethods: EBookingPaymentMethod[];\n cardProcessor: EHotelCardProcessor;\n planpay?: {\n username: string;\n minDaysShowPlanpay: number;\n env: EnvironmentName;\n };\n\n email?: string;\n hotelUrl?: string;\n heroImage?: string;\n images?: string[];\n integrations?: EIntegration[];\n roomGroups: HotelRoomGroupsDTO;\n rmsUseDepositQuote?: boolean;\n checkAreaAvailabilityOnRoomStep?: boolean;\n /** @deprecated Use the new Fees model instead */\n enableCreditCardSurcharge?: boolean;\n availableCountries?: { name: string; value: string }[];\n preventCancellation?: boolean;\n maxAdults?: number;\n maxChildren?: number;\n maxInfants?: number;\n stateFieldConfiguration?: EHotelStateFieldConfiguration;\n itineraryNote: string;\n disableSavedPayments: boolean;\n enableRoomUpsells?: boolean;\n enableRateUpsells?: boolean;\n} & Pick<\n AdminHotelConfig,\n | 'childConfiguration'\n | 'perks'\n | 'perkTitle'\n | 'countryPrefix'\n | 'quoteImageDesktop'\n | 'quoteImageMobile'\n | 'memberOnlyImage'\n | 'captureChildAge'\n | 'company'\n | 'fees'\n | 'addDepositFeeToBookingTotal'\n | 'minAdultAge'\n | 'maxAdultAge'\n | 'countInfantsInOccupancy'\n | 'preferProviderBookingId'\n | 'showUnavailableRooms'\n | 'isRACMemberNoRequired'\n> &\n Pick<ClientHotelConfig, 'memberOnlyRenderRateLast'>;\n\nexport enum VGSCardName {\n Visa = 'visa',\n Mastercard = 'mastercard',\n JCB = 'jcb',\n DinersClub = 'dinersclub',\n AmericanExpress = 'amex',\n UnionPay = 'unionpay',\n}\n\nexport const SynxisToVGSCardNameMapping: { [synxisName in EPaymentCardType]: VGSCardName } = {\n [EPaymentCardType.Visa]: VGSCardName.Visa,\n [EPaymentCardType.Mastercard]: VGSCardName.Mastercard,\n [EPaymentCardType.JCB]: VGSCardName.JCB,\n [EPaymentCardType.AmericanExpress]: VGSCardName.AmericanExpress,\n [EPaymentCardType.DinersClub]: VGSCardName.DinersClub,\n [EPaymentCardType.UnionPay]: VGSCardName.UnionPay,\n};\n"]}
|
|
@@ -78,6 +78,7 @@ export interface AdminHotelConfig {
|
|
|
78
78
|
roomGroups: HotelRoomGroupsDTO;
|
|
79
79
|
cardProcessor: EHotelCardProcessor;
|
|
80
80
|
rmsUseDepositQuote?: boolean;
|
|
81
|
+
checkAreaAvailabilityOnRoomStep?: boolean;
|
|
81
82
|
bookingFlow: EBookingFlow;
|
|
82
83
|
/** @deprecated Use the new Fees model instead */
|
|
83
84
|
enableCreditCardSurcharge?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Hotel.js","sourceRoot":"/","sources":["src/models/Client/Hotel/Hotel.ts"],"names":[],"mappings":";;;AAmBA,IAAY,gBAOX;AAPD,WAAY,gBAAgB;IACxB,+BAAW,CAAA;IACX,qCAAiB,CAAA;IACjB,8BAAU,CAAA;IACV,0CAAsB,CAAA;IACtB,qCAAiB,CAAA;IACjB,mCAAe,CAAA;AACnB,CAAC,EAPW,gBAAgB,gCAAhB,gBAAgB,QAO3B","sourcesContent":["import { EnvironmentName } from '@planpay/web/src/lib/shared-lib-duplicates';\nimport { EBookingFlow, EBookingPaymentMethod, EHotelCardProcessor, EHotelStateFieldConfiguration, EIntegration, IHotelColorScheme } from '@roomstay/core';\nimport { Property } from 'csstype';\nimport type { ReactChild } from 'react';\n\nimport type { InternalMemberSignInInputs } from '@/components/members/SignInModal/InternalMemberSignInModal.types';\nimport type { HotelRoomGroupsDTO, HotelRoomsDTO, HotelServiceDTO } from '@/models/Api/HotelDTO';\nimport type { TransportDistances } from '@/models/Api/HotelOverrideDTO';\nimport type { HasDatalayerTags } from '@/models/Client/Hotel/Company';\nimport type { DistanceUnitType } from '@/models/Client/Hotel/DistanceUnitType.types';\nimport type HotelAddress from '@/models/Client/Hotel/HotelAddress';\nimport type { HotelDataSource } from '@/models/Client/Hotel/HotelDataSource.types';\nimport type { HotelPerk } from '@/models/Client/Hotel/HotelPerk';\nimport type { HotelRoomOverwrite } from '@/models/Client/Hotel/HotelRoomOverwrite';\nimport type { WeekdayStartsOn } from '@/models/Client/Hotel/WeekdayStartsOn.types';\nimport { HotelFee } from '@/models/Fee';\nimport type { Language } from '@/providers/LanguageProvider';\nimport { RoomSort } from '@/providers/RoomSortProvider';\n\nexport enum EPaymentCardType {\n Visa = 'VI',\n Mastercard = 'MC',\n JCB = 'JC',\n AmericanExpress = 'AX',\n DinersClub = 'DN',\n UnionPay = 'UP',\n}\n\nexport interface IVGSVaultNames {\n standard: string;\n members: string;\n}\n\n/**\n * This config comes from admin -- TODO: Move to Roomstay Core\n */\nexport interface AdminHotelConfig {\n hotelID: string;\n name: string;\n address?: HotelAddress;\n latitude?: number;\n longitude?: number;\n phone?: string;\n email?: string;\n checkInTime?: string;\n checkOutTime?: string;\n paymentCardTypes?: EPaymentCardType[];\n description?: string;\n locationDescription?: string;\n policies?: string;\n hotelServices: HotelServiceDTO[];\n businessServices: HotelServiceDTO[];\n rooms: HotelRoomsDTO;\n hasLoadedDetails?: boolean;\n dataSource: HotelDataSource;\n defaultCurrency: string;\n paymentMethods: EBookingPaymentMethod[];\n planpay?: {\n username: string;\n minDaysShowPlanpay: number;\n env: EnvironmentName;\n };\n hotelUrl: string;\n heroImage: string;\n memberOnlyModalImage?: string;\n memberOnlyModalImageSize: Property.ObjectFit;\n images?: string[];\n logo: string | ReactChild;\n colors: IHotelColorScheme;\n distanceUnitType: DistanceUnitType;\n startsWeekOnDay?: WeekdayStartsOn;\n crossSellHotelIds?: string[];\n maxOccupancy?: number;\n minAdultAge?: number;\n maxAdultAge?: number;\n maxAdults?: number;\n maxChildren?: number;\n maxInfants?: number;\n countInfantsInOccupancy?: boolean;\n hideByLine?: boolean;\n transportDistances?: TransportDistances;\n roomGroups: HotelRoomGroupsDTO;\n cardProcessor: EHotelCardProcessor;\n\n rmsUseDepositQuote?: boolean;\n bookingFlow: EBookingFlow;\n\n /** @deprecated Use the new Fees model instead */\n enableCreditCardSurcharge?: boolean;\n availableCountries?: { name: string; value: string }[];\n\n childConfiguration?: {\n supportChildren?: boolean;\n supportInfants: boolean;\n childRange: { min: number; max: number };\n infantRange: { min: number; max: number };\n };\n preventCancellation?: boolean;\n\n perks?: HotelPerk[];\n perkTitle?: string;\n\n stateFieldConfiguration?: EHotelStateFieldConfiguration;\n\n countryPrefix?: string;\n quoteImageDesktop?: string;\n quoteImageMobile?: string;\n memberOnlyImage?: string;\n captureChildAge?: boolean;\n itineraryNote: string;\n\n fees?: HotelFee[];\n addDepositFeeToBookingTotal?: boolean;\n\n company: {\n url?: string;\n logo?: string;\n };\n\n facebookUrl: string;\n instagramUrl: string;\n linkedinUrl: string;\n preferProviderBookingId: boolean;\n disableSavedPayments?: boolean;\n showUnavailableRooms?: boolean;\n isRACMemberNoRequired?: boolean;\n enableRoomUpsells?: boolean;\n enableRateUpsells?: boolean;\n countryCode: string | null;\n}\n\n/**\n * This config comes from hard static local file\n */\nexport interface ClientHotelConfig {\n providerHotelID: string;\n shortName?: string;\n defaultDatepickerType?: 'Month' | 'Week';\n // TODO: need to do magic to see if we need to append / prepend stuff, for now we assume that it's only used while on the site.\n checkoutUrl?: string;\n defaultLanguage: Language;\n privacyPolicyUrl: string;\n bookNowPayLaterUrl?: string;\n bestRateNoBSUrl?: string;\n\n memberOnlyRates?: string[];\n memberOnlyPromoCode?: string;\n memberOnlyRenderRateLast?: boolean;\n memberOnlySignupInputs?: InternalMemberSignInInputs;\n googleMapsImage?: string;\n /**\n * Whether to show the Breakfast / Lunch / Dinner included\n */\n showMealPill?: boolean;\n perks?: HotelPerk[];\n perkTitle?: string;\n /**\n * Hide perks on room row\n */\n perksHideOnRoomRow?: boolean;\n /**\n * Hide perks on room detail modal\n */\n perksHideOnRoomDetail?: boolean;\n perksShowDisclaimer?: boolean;\n /** @deprecated Use the vgs.vaultNames.standard property now */\n vgsVaultName?: string;\n vgs?: {\n vaultNames: IVGSVaultNames;\n };\n showAddonLoader: boolean;\n overwrites?: { [code: string]: Partial<HotelRoomOverwrite> };\n forwardFindReservationToSynxis?: boolean;\n additionalOptions?: { [name: string]: any };\n googleReCaptcha?: {\n loadForMembers?: boolean;\n siteKey?: string;\n };\n /**\n * Show description on RoomDetails\n */\n showDescriptionOnRoomDetails?: boolean;\n /**\n * Customize the Member modal colours. Specifically replacing the green (success) with the primary color of hotel (accent)\n */\n memberOnlyModalUsePrimaryColor?: boolean;\n /**\n * Callback to trigger specific events on load of a hotel.\n *\n * This is where you can specify custom fields, language overrides, feature toggles etc.\n */\n onLoad?: () => void;\n /**\n * Order available rooms\n */\n currentRoomSort?: RoomSort;\n /**\n * Order available rates\n */\n currentRoomRateSort?: RoomSort | undefined;\n maxAdults?: number; //fixed from frontend\n mobileDefaultRatesClosed?: boolean;\n}\n\nexport interface ConfigHotel extends ClientHotelConfig, AdminHotelConfig, HasDatalayerTags {}\n\nexport type Hotel = ConfigHotel & {\n lowestPrice?: {\n value: number;\n isLoading: boolean;\n };\n integrations?: EIntegration[];\n\n // TODO: Should be a better way to use this configuration.\n isRACMemberNoRequired?: boolean;\n};\n\n/**\n * Used for DetailsHotel event\n */\nexport type InitialHotelDetailsEventPayload = {\n name: string;\n hotelID: number | string;\n hotelUrl: string;\n currency: string;\n language: Language;\n address?: HotelAddress;\n};\n"]}
|
|
1
|
+
{"version":3,"file":"Hotel.js","sourceRoot":"/","sources":["src/models/Client/Hotel/Hotel.ts"],"names":[],"mappings":";;;AAmBA,IAAY,gBAOX;AAPD,WAAY,gBAAgB;IACxB,+BAAW,CAAA;IACX,qCAAiB,CAAA;IACjB,8BAAU,CAAA;IACV,0CAAsB,CAAA;IACtB,qCAAiB,CAAA;IACjB,mCAAe,CAAA;AACnB,CAAC,EAPW,gBAAgB,gCAAhB,gBAAgB,QAO3B","sourcesContent":["import { EnvironmentName } from '@planpay/web/src/lib/shared-lib-duplicates';\nimport { EBookingFlow, EBookingPaymentMethod, EHotelCardProcessor, EHotelStateFieldConfiguration, EIntegration, IHotelColorScheme } from '@roomstay/core';\nimport { Property } from 'csstype';\nimport type { ReactChild } from 'react';\n\nimport type { InternalMemberSignInInputs } from '@/components/members/SignInModal/InternalMemberSignInModal.types';\nimport type { HotelRoomGroupsDTO, HotelRoomsDTO, HotelServiceDTO } from '@/models/Api/HotelDTO';\nimport type { TransportDistances } from '@/models/Api/HotelOverrideDTO';\nimport type { HasDatalayerTags } from '@/models/Client/Hotel/Company';\nimport type { DistanceUnitType } from '@/models/Client/Hotel/DistanceUnitType.types';\nimport type HotelAddress from '@/models/Client/Hotel/HotelAddress';\nimport type { HotelDataSource } from '@/models/Client/Hotel/HotelDataSource.types';\nimport type { HotelPerk } from '@/models/Client/Hotel/HotelPerk';\nimport type { HotelRoomOverwrite } from '@/models/Client/Hotel/HotelRoomOverwrite';\nimport type { WeekdayStartsOn } from '@/models/Client/Hotel/WeekdayStartsOn.types';\nimport { HotelFee } from '@/models/Fee';\nimport type { Language } from '@/providers/LanguageProvider';\nimport { RoomSort } from '@/providers/RoomSortProvider';\n\nexport enum EPaymentCardType {\n Visa = 'VI',\n Mastercard = 'MC',\n JCB = 'JC',\n AmericanExpress = 'AX',\n DinersClub = 'DN',\n UnionPay = 'UP',\n}\n\nexport interface IVGSVaultNames {\n standard: string;\n members: string;\n}\n\n/**\n * This config comes from admin -- TODO: Move to Roomstay Core\n */\nexport interface AdminHotelConfig {\n hotelID: string;\n name: string;\n address?: HotelAddress;\n latitude?: number;\n longitude?: number;\n phone?: string;\n email?: string;\n checkInTime?: string;\n checkOutTime?: string;\n paymentCardTypes?: EPaymentCardType[];\n description?: string;\n locationDescription?: string;\n policies?: string;\n hotelServices: HotelServiceDTO[];\n businessServices: HotelServiceDTO[];\n rooms: HotelRoomsDTO;\n hasLoadedDetails?: boolean;\n dataSource: HotelDataSource;\n defaultCurrency: string;\n paymentMethods: EBookingPaymentMethod[];\n planpay?: {\n username: string;\n minDaysShowPlanpay: number;\n env: EnvironmentName;\n };\n hotelUrl: string;\n heroImage: string;\n memberOnlyModalImage?: string;\n memberOnlyModalImageSize: Property.ObjectFit;\n images?: string[];\n logo: string | ReactChild;\n colors: IHotelColorScheme;\n distanceUnitType: DistanceUnitType;\n startsWeekOnDay?: WeekdayStartsOn;\n crossSellHotelIds?: string[];\n maxOccupancy?: number;\n minAdultAge?: number;\n maxAdultAge?: number;\n maxAdults?: number;\n maxChildren?: number;\n maxInfants?: number;\n countInfantsInOccupancy?: boolean;\n hideByLine?: boolean;\n transportDistances?: TransportDistances;\n roomGroups: HotelRoomGroupsDTO;\n cardProcessor: EHotelCardProcessor;\n\n rmsUseDepositQuote?: boolean;\n checkAreaAvailabilityOnRoomStep?: boolean;\n bookingFlow: EBookingFlow;\n\n /** @deprecated Use the new Fees model instead */\n enableCreditCardSurcharge?: boolean;\n availableCountries?: { name: string; value: string }[];\n\n childConfiguration?: {\n supportChildren?: boolean;\n supportInfants: boolean;\n childRange: { min: number; max: number };\n infantRange: { min: number; max: number };\n };\n preventCancellation?: boolean;\n\n perks?: HotelPerk[];\n perkTitle?: string;\n\n stateFieldConfiguration?: EHotelStateFieldConfiguration;\n\n countryPrefix?: string;\n quoteImageDesktop?: string;\n quoteImageMobile?: string;\n memberOnlyImage?: string;\n captureChildAge?: boolean;\n itineraryNote: string;\n\n fees?: HotelFee[];\n addDepositFeeToBookingTotal?: boolean;\n\n company: {\n url?: string;\n logo?: string;\n };\n\n facebookUrl: string;\n instagramUrl: string;\n linkedinUrl: string;\n preferProviderBookingId: boolean;\n disableSavedPayments?: boolean;\n showUnavailableRooms?: boolean;\n isRACMemberNoRequired?: boolean;\n enableRoomUpsells?: boolean;\n enableRateUpsells?: boolean;\n countryCode: string | null;\n}\n\n/**\n * This config comes from hard static local file\n */\nexport interface ClientHotelConfig {\n providerHotelID: string;\n shortName?: string;\n defaultDatepickerType?: 'Month' | 'Week';\n // TODO: need to do magic to see if we need to append / prepend stuff, for now we assume that it's only used while on the site.\n checkoutUrl?: string;\n defaultLanguage: Language;\n privacyPolicyUrl: string;\n bookNowPayLaterUrl?: string;\n bestRateNoBSUrl?: string;\n\n memberOnlyRates?: string[];\n memberOnlyPromoCode?: string;\n memberOnlyRenderRateLast?: boolean;\n memberOnlySignupInputs?: InternalMemberSignInInputs;\n googleMapsImage?: string;\n /**\n * Whether to show the Breakfast / Lunch / Dinner included\n */\n showMealPill?: boolean;\n perks?: HotelPerk[];\n perkTitle?: string;\n /**\n * Hide perks on room row\n */\n perksHideOnRoomRow?: boolean;\n /**\n * Hide perks on room detail modal\n */\n perksHideOnRoomDetail?: boolean;\n perksShowDisclaimer?: boolean;\n /** @deprecated Use the vgs.vaultNames.standard property now */\n vgsVaultName?: string;\n vgs?: {\n vaultNames: IVGSVaultNames;\n };\n showAddonLoader: boolean;\n overwrites?: { [code: string]: Partial<HotelRoomOverwrite> };\n forwardFindReservationToSynxis?: boolean;\n additionalOptions?: { [name: string]: any };\n googleReCaptcha?: {\n loadForMembers?: boolean;\n siteKey?: string;\n };\n /**\n * Show description on RoomDetails\n */\n showDescriptionOnRoomDetails?: boolean;\n /**\n * Customize the Member modal colours. Specifically replacing the green (success) with the primary color of hotel (accent)\n */\n memberOnlyModalUsePrimaryColor?: boolean;\n /**\n * Callback to trigger specific events on load of a hotel.\n *\n * This is where you can specify custom fields, language overrides, feature toggles etc.\n */\n onLoad?: () => void;\n /**\n * Order available rooms\n */\n currentRoomSort?: RoomSort;\n /**\n * Order available rates\n */\n currentRoomRateSort?: RoomSort | undefined;\n maxAdults?: number; //fixed from frontend\n mobileDefaultRatesClosed?: boolean;\n}\n\nexport interface ConfigHotel extends ClientHotelConfig, AdminHotelConfig, HasDatalayerTags {}\n\nexport type Hotel = ConfigHotel & {\n lowestPrice?: {\n value: number;\n isLoading: boolean;\n };\n integrations?: EIntegration[];\n\n // TODO: Should be a better way to use this configuration.\n isRACMemberNoRequired?: boolean;\n};\n\n/**\n * Used for DetailsHotel event\n */\nexport type InitialHotelDetailsEventPayload = {\n name: string;\n hotelID: number | string;\n hotelUrl: string;\n currency: string;\n language: Language;\n address?: HotelAddress;\n};\n"]}
|
|
@@ -290,6 +290,7 @@ export declare const Translation: {
|
|
|
290
290
|
RatesNotFoundLine2: string;
|
|
291
291
|
YouBookedThisRoomRecently: string;
|
|
292
292
|
FreeNight: string;
|
|
293
|
+
SelectDwellingOptionsFirst: string;
|
|
293
294
|
CrossSellBlock: {
|
|
294
295
|
AvailabilityNearBy1: string;
|
|
295
296
|
AvailabilityNearBy2: string;
|
|
@@ -293,6 +293,7 @@ exports.Translation = {
|
|
|
293
293
|
RatesNotFoundLine2: 'Step.Room.RatesNotFoundLine2',
|
|
294
294
|
YouBookedThisRoomRecently: 'Step.Room.YouBookedThisRoomRecently',
|
|
295
295
|
FreeNight: 'Step.Room.FreeNight',
|
|
296
|
+
SelectDwellingOptionsFirst: 'Step.Room.SelectDwellingOptionsFirst',
|
|
296
297
|
CrossSellBlock: {
|
|
297
298
|
AvailabilityNearBy1: 'Step.Room.CrossSellBlock.AvailabilityNearBy1',
|
|
298
299
|
AvailabilityNearBy2: 'Step.Room.CrossSellBlock.AvailabilityNearBy2',
|