@roomstay/frontend 2.6.62 → 2.6.64

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.
Files changed (103) hide show
  1. package/dist/537.bundle.js +1 -1
  2. package/dist/839.bundle.js +1 -1
  3. package/dist/950.bundle.js +1 -1
  4. package/dist/978.bundle.js +1 -1
  5. package/dist/main.bundle.js +1 -1
  6. package/dist/src/api/BaseAPI.js +5 -10
  7. package/dist/src/api/BaseAPI.js.map +1 -1
  8. package/dist/src/api/ReservationAPI.d.ts +23 -3
  9. package/dist/src/api/ReservationAPI.js +75 -31
  10. package/dist/src/api/ReservationAPI.js.map +1 -1
  11. package/dist/src/components/User/Forms/ForgotPasswordForm.js +11 -5
  12. package/dist/src/components/User/Forms/ForgotPasswordForm.js.map +1 -1
  13. package/dist/src/components/User/Forms/SignInForm.js +5 -2
  14. package/dist/src/components/User/Forms/SignInForm.js.map +1 -1
  15. package/dist/src/components/User/Forms/SignUpForm.d.ts +5 -0
  16. package/dist/src/components/User/Forms/SignUpForm.js +27 -10
  17. package/dist/src/components/User/Forms/SignUpForm.js.map +1 -1
  18. package/dist/src/components/generic/date/DatePicker.js +1 -1
  19. package/dist/src/components/generic/date/DatePicker.js.map +1 -1
  20. package/dist/src/components/members/InlineSignUpSection.d.ts +7 -0
  21. package/dist/src/components/members/InlineSignUpSection.js +122 -0
  22. package/dist/src/components/members/InlineSignUpSection.js.map +1 -0
  23. package/dist/src/components/members/SignInModal/ExternalMemberModal.js +4 -4
  24. package/dist/src/components/members/SignInModal/ExternalMemberModal.js.map +1 -1
  25. package/dist/src/components/members/SignInModal/InternalMemberSignInModal.js +78 -33
  26. package/dist/src/components/members/SignInModal/InternalMemberSignInModal.js.map +1 -1
  27. package/dist/src/components/members/SignInModal/MemberSignInModal.js +11 -1
  28. package/dist/src/components/members/SignInModal/MemberSignInModal.js.map +1 -1
  29. package/dist/src/components/reservation/ReservationItem.js +1 -1
  30. package/dist/src/components/reservation/ReservationItem.js.map +1 -1
  31. package/dist/src/components/steps/addons/AddonCard.js +14 -14
  32. package/dist/src/components/steps/addons/AddonCard.js.map +1 -1
  33. package/dist/src/components/steps/confirmation/RoomContactDetails.js +12 -12
  34. package/dist/src/components/steps/confirmation/RoomContactDetails.js.map +1 -1
  35. package/dist/src/components/steps/room/AvailableUpgradesModal.js +1 -1
  36. package/dist/src/components/steps/room/AvailableUpgradesModal.js.map +1 -1
  37. package/dist/src/components/steps/room/LargeRoomCard.js +7 -0
  38. package/dist/src/components/steps/room/LargeRoomCard.js.map +1 -1
  39. package/dist/src/components/steps/room/roomDetails/RoomDetails.js +1 -1
  40. package/dist/src/components/steps/room/roomDetails/RoomDetails.js.map +1 -1
  41. package/dist/src/components/steps/room/roomDetails/RoomDetailsBedsBlock.js +12 -7
  42. package/dist/src/components/steps/room/roomDetails/RoomDetailsBedsBlock.js.map +1 -1
  43. package/dist/src/components/summary/BESummaryAddonRow.js +1 -1
  44. package/dist/src/components/summary/BESummaryAddonRow.js.map +1 -1
  45. package/dist/src/contexts/BasketContext/BasketContextType.d.ts +2 -5
  46. package/dist/src/contexts/BasketContext/BasketContextType.js.map +1 -1
  47. package/dist/src/contexts/BasketContext/BasketContextWrapper.js +48 -22
  48. package/dist/src/contexts/BasketContext/BasketContextWrapper.js.map +1 -1
  49. package/dist/src/contexts/CompanyContext/CompanyContextType.type.d.ts +1 -1
  50. package/dist/src/contexts/CompanyContext/CompanyContextType.type.js.map +1 -1
  51. package/dist/src/contexts/CompanyContext/CompanyContextWrapper.js +4 -0
  52. package/dist/src/contexts/CompanyContext/CompanyContextWrapper.js.map +1 -1
  53. package/dist/src/contexts/ConfirmationStepContext/ConfirmationStepContextWrapper.js +18 -18
  54. package/dist/src/contexts/ConfirmationStepContext/ConfirmationStepContextWrapper.js.map +1 -1
  55. package/dist/src/contexts/FullPageEngineContext/FullPageEngineContextTypes.d.ts +5 -4
  56. package/dist/src/contexts/FullPageEngineContext/FullPageEngineContextTypes.js.map +1 -1
  57. package/dist/src/contexts/FullPageEngineContext/FullPageEngineContextWrapper.js +35 -14
  58. package/dist/src/contexts/FullPageEngineContext/FullPageEngineContextWrapper.js.map +1 -1
  59. package/dist/src/contexts/Members/RoomstayMemberContext/RoomstayMemberContextProvider.js.map +1 -1
  60. package/dist/src/hooks/useSignedInMember.d.ts +1 -1
  61. package/dist/src/models/Addon/Addon.d.ts +6 -64
  62. package/dist/src/models/Addon/Addon.js +14 -28
  63. package/dist/src/models/Addon/Addon.js.map +1 -1
  64. package/dist/src/models/Api/HotelDTO.d.ts +1 -0
  65. package/dist/src/models/Api/HotelDTO.js.map +1 -1
  66. package/dist/src/models/AppQueryParameters.d.ts +2 -1
  67. package/dist/src/models/AppQueryParameters.js +1 -0
  68. package/dist/src/models/AppQueryParameters.js.map +1 -1
  69. package/dist/src/models/BasketAddonRow.js +3 -2
  70. package/dist/src/models/BasketAddonRow.js.map +1 -1
  71. package/dist/src/models/BasketRow.d.ts +1 -0
  72. package/dist/src/models/BasketRow.js.map +1 -1
  73. package/dist/src/models/Client/Hotel/Hotel.d.ts +4 -2
  74. package/dist/src/models/Client/Hotel/Hotel.js.map +1 -1
  75. package/dist/src/models/RoomstaySession.d.ts +1 -0
  76. package/dist/src/models/RoomstaySession.js.map +1 -1
  77. package/dist/src/models/UserProfile.d.ts +20 -20
  78. package/dist/src/models/UserProfile.js.map +1 -1
  79. package/dist/src/pages/account/Reservations/AccountReservationSinglePage.js +2 -2
  80. package/dist/src/pages/account/Reservations/AccountReservationSinglePage.js.map +1 -1
  81. package/dist/src/pages/steps/StepThanks/StepThanksComponent.js +6 -4
  82. package/dist/src/pages/steps/StepThanks/StepThanksComponent.js.map +1 -1
  83. package/dist/src/providers/CurrencyProvider.js +1 -1
  84. package/dist/src/providers/CurrencyProvider.js.map +1 -1
  85. package/dist/src/providers/feature/MemberPortalFeature.d.ts +7 -1
  86. package/dist/src/providers/feature/MemberPortalFeature.js +11 -0
  87. package/dist/src/providers/feature/MemberPortalFeature.js.map +1 -1
  88. package/dist/src/translations/Translation.d.ts +1 -0
  89. package/dist/src/translations/Translation.js +1 -0
  90. package/dist/src/translations/Translation.js.map +1 -1
  91. package/dist/src/translations/languages/en-gb.js +1 -0
  92. package/dist/src/translations/languages/en-gb.js.map +1 -1
  93. package/dist/src/util/Analytics/GoogleAnalytics4.d.ts +1 -1
  94. package/dist/src/util/Analytics/UniversalAnalytics.d.ts +1 -1
  95. package/dist/src/util/CurrencyHelper.js +1 -1
  96. package/dist/src/util/CurrencyHelper.js.map +1 -1
  97. package/dist/src/util/EventsHelper.js +1 -1
  98. package/dist/src/util/EventsHelper.js.map +1 -1
  99. package/dist/src/util/TotalCalculator.js +2 -2
  100. package/dist/src/util/TotalCalculator.js.map +1 -1
  101. package/dist/test.bundle.js +1 -1
  102. package/dist/vendors.bundle.js +1 -1
  103. package/package.json +3 -3
@@ -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,GAAhB,wBAAgB,KAAhB,wBAAgB,QAO3B","sourcesContent":["import { EnvironmentName } from '@planpay/web/src/lib/shared-lib-duplicates';\nimport { 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\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 requireDeposit?: boolean;\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}\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 currentRoomSort?: RoomSort; //override default room sort\n maxAdults?: number; //fixed from frontend\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\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,GAAhB,wBAAgB,KAAhB,wBAAgB,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 requireDeposit?: 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}\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 currentRoomSort?: RoomSort; //override default room sort\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\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"]}
@@ -18,6 +18,7 @@ export type RoomstaySession = {
18
18
  source: string;
19
19
  user?: SignInUser;
20
20
  memberId?: string;
21
+ pencilId?: string;
21
22
  basketRows: BasketRow[];
22
23
  reservationRequest?: {
23
24
  userProfiles: UserProfile[];
@@ -1 +1 @@
1
- {"version":3,"file":"RoomstaySession.js","sourceRoot":"/","sources":["src/models/RoomstaySession.ts"],"names":[],"mappings":";;;AAkEa,QAAA,sBAAsB,GAAG,YAAY,CAAC","sourcesContent":["import { SignInUser } from '@frontend/contexts';\nimport { IBookingPayment } from '@roomstay/core';\nimport dayjs from 'dayjs';\n\nimport type BasketRow from '@/models/BasketRow';\nimport type { IRoom } from '@/models/Room/Room';\nimport type { IRoomRate } from '@/models/Room/RoomRate';\nimport UserProfile from '@/models/UserProfile';\n\nimport ReservationsDTO from './Api/ReservationsDTO';\n\n/**\n * Booking engine state object, that is stored, can be loaded and unloaded\n */\nexport type RoomstaySession = {\n id: number;\n step: string;\n startDate: dayjs.Dayjs | null;\n endDate: dayjs.Dayjs | null;\n hotelID: number | string;\n source: string;\n user?: SignInUser;\n memberId?: string;\n\n basketRows: BasketRow[];\n\n reservationRequest?: {\n userProfiles: UserProfile[];\n payment: IBookingPayment;\n comments: string;\n };\n reservation?: ReservationsDTO;\n};\n\nexport type SerializedRoomstaySession = {\n id: number;\n step: string;\n startDate: string;\n endDate: string;\n hotelID: number | string;\n source: string;\n user?: string;\n memberId?: string;\n\n basketRows: SerializedRoomstaySessionBasketRow[];\n\n reservation?: ReservationsDTO;\n reservationRequest?: RoomstaySession['reservationRequest'];\n};\n\nexport type SerializedRoomstaySessionBasketRow = {\n uniqId: string;\n startDate: string;\n endDate: string;\n\n adults: number;\n children: number;\n infants: number;\n\n promoCode: string;\n promoCodeStatus: string;\n\n room: IRoom;\n rate: IRoomRate;\n};\n\nexport const SERIALIZED_DATE_FORMAT = 'YYYY/MM/DD';\n"]}
1
+ {"version":3,"file":"RoomstaySession.js","sourceRoot":"/","sources":["src/models/RoomstaySession.ts"],"names":[],"mappings":";;;AAmEa,QAAA,sBAAsB,GAAG,YAAY,CAAC","sourcesContent":["import { SignInUser } from '@frontend/contexts';\nimport { IBookingPayment } from '@roomstay/core';\nimport dayjs from 'dayjs';\n\nimport type BasketRow from '@/models/BasketRow';\nimport type { IRoom } from '@/models/Room/Room';\nimport type { IRoomRate } from '@/models/Room/RoomRate';\nimport UserProfile from '@/models/UserProfile';\n\nimport ReservationsDTO from './Api/ReservationsDTO';\n\n/**\n * Booking engine state object, that is stored, can be loaded and unloaded\n */\nexport type RoomstaySession = {\n id: number;\n step: string;\n startDate: dayjs.Dayjs | null;\n endDate: dayjs.Dayjs | null;\n hotelID: number | string;\n source: string;\n user?: SignInUser;\n memberId?: string;\n pencilId?: string;\n\n basketRows: BasketRow[];\n\n reservationRequest?: {\n userProfiles: UserProfile[];\n payment: IBookingPayment;\n comments: string;\n };\n reservation?: ReservationsDTO;\n};\n\nexport type SerializedRoomstaySession = {\n id: number;\n step: string;\n startDate: string;\n endDate: string;\n hotelID: number | string;\n source: string;\n user?: string;\n memberId?: string;\n\n basketRows: SerializedRoomstaySessionBasketRow[];\n\n reservation?: ReservationsDTO;\n reservationRequest?: RoomstaySession['reservationRequest'];\n};\n\nexport type SerializedRoomstaySessionBasketRow = {\n uniqId: string;\n startDate: string;\n endDate: string;\n\n adults: number;\n children: number;\n infants: number;\n\n promoCode: string;\n promoCodeStatus: string;\n\n room: IRoom;\n rate: IRoomRate;\n};\n\nexport const SERIALIZED_DATE_FORMAT = 'YYYY/MM/DD';\n"]}
@@ -1,25 +1,25 @@
1
1
  type UserProfile = {
2
- Title?: string;
3
- FirstName: string;
4
- MiddleName?: string;
5
- LastName: string;
6
- NameSuffix?: string;
7
- Phone: string;
8
- Email: string;
9
- Address: {
10
- Line1?: string;
11
- Line2?: string;
12
- Line3?: string;
13
- City: string;
14
- PostalCode: string;
15
- State?: string;
16
- Country: string;
17
- CountryId?: number | string;
18
- CountryCode?: string;
2
+ title?: string;
3
+ firstName: string;
4
+ middleName?: string;
5
+ lastName: string;
6
+ nameSuffix?: string;
7
+ phone: string;
8
+ email: string;
9
+ address: {
10
+ line1?: string;
11
+ line2?: string;
12
+ line3?: string;
13
+ city: string;
14
+ postalCode: string;
15
+ state?: string;
16
+ country: string;
17
+ countryId?: number | string;
18
+ countryCode?: string;
19
19
  };
20
- MarketingOptIn: boolean;
21
- ReservationId?: string;
22
- AuxInputs?: {
20
+ marketingOptIn: boolean;
21
+ reservationId?: string;
22
+ auxInputs?: {
23
23
  [key: string]: string | number;
24
24
  };
25
25
  };
@@ -1 +1 @@
1
- {"version":3,"file":"UserProfile.js","sourceRoot":"/","sources":["src/models/UserProfile.ts"],"names":[],"mappings":"","sourcesContent":["type UserProfile = {\n Title?: string;\n FirstName: string;\n MiddleName?: string;\n LastName: string;\n NameSuffix?: string;\n Phone: string;\n Email: string;\n Address: {\n Line1?: string;\n Line2?: string;\n Line3?: string;\n City: string;\n PostalCode: string;\n State?: string;\n Country: string;\n CountryId?: number | string;\n CountryCode?: string;\n };\n MarketingOptIn: boolean;\n ReservationId?: string;\n AuxInputs?: { [key: string]: string | number };\n};\n\nexport default UserProfile;\n"]}
1
+ {"version":3,"file":"UserProfile.js","sourceRoot":"/","sources":["src/models/UserProfile.ts"],"names":[],"mappings":"","sourcesContent":["type UserProfile = {\n title?: string;\n firstName: string;\n middleName?: string;\n lastName: string;\n nameSuffix?: string;\n phone: string;\n email: string;\n address: {\n line1?: string;\n line2?: string;\n line3?: string;\n city: string;\n postalCode: string;\n state?: string;\n country: string;\n countryId?: number | string;\n countryCode?: string;\n };\n marketingOptIn: boolean;\n reservationId?: string;\n auxInputs?: { [key: string]: string | number };\n};\n\nexport default UserProfile;\n"]}
@@ -102,7 +102,7 @@ const CodeNumberInformation = (props) => {
102
102
  const cancelled = [];
103
103
  const confirmed = [];
104
104
  for (const item of itineraries) {
105
- if (item.status === core_1.IBookingStatus.Cancelled) {
105
+ if (item.status === core_1.EBookingStatus.Cancelled) {
106
106
  cancelled.push(item);
107
107
  }
108
108
  else {
@@ -168,7 +168,7 @@ const AccountReservationSinglePage = () => {
168
168
  });
169
169
  }
170
170
  }, [booking, getHotel]);
171
- const allCancelled = (0, react_1.useMemo)(() => itineraries.every((row) => row.status === core_1.IBookingStatus.Cancelled), [itineraries]);
171
+ const allCancelled = (0, react_1.useMemo)(() => itineraries.every((row) => row.status === core_1.EBookingStatus.Cancelled), [itineraries]);
172
172
  const allCancellable = (0, react_1.useMemo)(() => itineraries.every((row) => row.isCancellable), [itineraries]);
173
173
  if (!booking) {
174
174
  return react_1.default.createElement(react_1.default.Fragment, null, t(Translation_1.Translation.Misc.Loading));
@@ -1 +1 @@
1
- {"version":3,"file":"AccountReservationSinglePage.js","sourceRoot":"/","sources":["src/pages/account/Reservations/AccountReservationSinglePage.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAmJ;AACnJ,yCAAwG;AACxG,kDAA0B;AAC1B,+CAAkF;AAClF,iDAA+C;AAC/C,uDAAmD;AACnD,0DAAuD;AAEvD,kEAAmC;AACnC,6EAAqD;AACrD,8DAA2D;AAC3D,6EAAqD;AACrD,6EAAqD;AACrD,yDAA0D;AAC1D,sFAA8D;AAC9D,+EAAuD;AACvD,sFAAsF;AACtF,kEAAwE;AACxE,qFAA6D;AAC7D,kEAA2D;AAC3D,8EAA6E;AAC7E,+FAAuE;AACvE,mCAA0C;AAC1C,+DAAqD;AAErD,oGAA4E;AAC5E,wCAAoE;AACpE,mEAA2C;AAC3C,uEAA+C;AAE/C,oDAAiD;AAEjD,MAAM,kBAAkB,GAAG,CAAC,WAA+D,EAAE,EAAE;;IAC3F,MAAM,SAAS,GAA+B,EAAE,CAAC;IAEjD,KAAK,MAAM,SAAS,IAAI,WAAW,EAAE;QACjC,SAAS,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAA,SAAS,CAAC,SAAS,CAAC,QAAQ,CAAC,mCAAI,CAAC,CAAC,GAAG,CAAC,CAAC;KAC5E;IAED,OAAO,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC;SACxB,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACV,MAAM,UAAU,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;QACnC,IAAI,UAAU,IAAI,CAAC;YAAE,OAAO,GAAG,IAAI,EAAE,CAAC;IAC1C,CAAC,CAAC;SACD,IAAI,CAAC,KAAK,CAAC,CAAC;AACrB,CAAC,CAAC;AAUF,MAAM,sBAAsB,GAAG,CAA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AS,EAAC,sBAAsB,IAC5D,CAAC,CAAC,yBAAW,CAAC,IAAI,CAAC,eAAe,CAAC,CACjC;wBACP,8BAAC,cAAI,IAAC,IAAI,EAAE,eAAQ,CAAC,KAAK;4BACtB,wCAAM,uBAAuB,EAAE,EAAE,MAAM,EAAE,SAAS,CAAC,8BAA8B,IAAI,EAAE,EAAE,GAAS,CAC/F,CACR,CACN,CAAC,CAAC,CAAC,IAAI,CACN;oBACN,8BAAC,cAAI,IAAC,IAAI,EAAE,eAAQ,CAAC,KAAK,EAAE,IAAI,QAAC,SAAS,EAAC,sBAAsB,IAC5D,CAAC,CAAC,yBAAW,CAAC,IAAI,CAAC,kBAAkB,CAAC,CACpC;oBACP,8BAAC,cAAI,IAAC,IAAI,EAAE,eAAQ,CAAC,KAAK;wBACtB,wCAAM,uBAAuB,EAAE,EAAE,MAAM,EAAE,SAAS,CAAC,iCAAiC,IAAI,EAAE,EAAE,GAAS,CAClG,CACL,CACT,CAAC,CACA,CACJ,CACJ;QACN,8BAAC,sBAAsB,IACnB,OAAO,EAAE,wBAAwB,EACjC,KAAK,EAAE,sBAA4E,EACnF,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,CAAC,CAAC,sBAAsB,GACnC,CACA,CACT,CAAC;AACN,CAAC,CAAC;AAjQW,QAAA,4BAA4B,gCAiQvC","sourcesContent":["import { BookingEngineContext, CompanyContext, IRoomstayMemberBookingItemWithRefAndHotelDetails, RoomstayMemberContext } from '@frontend/contexts';\nimport { calculateTotalForMemberBooking, IBookingStatus, IRoomstayMemberBooking } from '@roomstay/core';\nimport dayjs from 'dayjs';\nimport React, { Fragment, useContext, useEffect, useMemo, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { Link, useParams } from 'react-router-dom';\nimport { Translation } from 'translations/Translation';\n\nimport API from '@/api/BookingAPI';\nimport BEButton from '@/components/generic/BEButton';\nimport { Card } from '@/components/generic/Card/Card/Card';\nimport Currency from '@/components/generic/Currency';\nimport Headline from '@/components/generic/Headline';\nimport { IconType } from '@/components/generic/Icon/Icon';\nimport IconText from '@/components/generic/IconText/IconText';\nimport LineBreak from '@/components/generic/LineBreak';\nimport SimpleModal, { SimpleModalSize } from '@/components/generic/modal/SimpleModal';\nimport Pill, { PillType, PillVariant } from '@/components/generic/Pill';\nimport PrintOnly from '@/components/generic/print/PrintOnly';\nimport Text, { TextType } from '@/components/generic/Text';\nimport { ReservationAction } from '@/components/reservation/ReservationItem';\nimport ReservationList from '@/components/reservation/ReservationList';\nimport { useCurrentHotel } from '@/hooks';\nimport { useMember } from '@/hooks/LoggedInUserHook';\nimport { Hotel } from '@/models/Client/Hotel/Hotel';\nimport ModifyBookingFeature from '@/providers/feature/ModifyBookingFeature';\nimport { Color, getAccentOverrideStyleContent } from '@/util/Color';\nimport ScreenSize from '@/util/ScreenSize';\nimport StringHelper from '@/util/StringHelper';\n\nimport { AccountRoutes } from '../AccountRoutes';\n\nconst getRoomNamesString = (itineraries: IRoomstayMemberBookingItemWithRefAndHotelDetails[]) => {\n const roomNames: { [name: string]: number } = {};\n\n for (const itinerary of itineraries) {\n roomNames[itinerary.roomName] = (roomNames[itinerary.roomName] ?? 0) + 1;\n }\n\n return Object.keys(roomNames)\n .map((name) => {\n const numOfRooms = roomNames[name];\n if (numOfRooms <= 1) return `${name}`;\n })\n .join(' + ');\n};\n\ntype CancelReservationModalProps = {\n items: IRoomstayMemberBookingItemWithRefAndHotelDetails[];\n booking: IRoomstayMemberBooking;\n\n visible: boolean;\n onClose: () => void;\n};\n\nconst CancelReservationModal = (props: CancelReservationModalProps) => {\n const { items, booking, visible, onClose } = props;\n const { fetchRoomstayMember } = useContext(RoomstayMemberContext);\n const { t } = useTranslation();\n\n const [isLoading, setIsLoading] = useState(false);\n\n const onCancelClick = () => {\n const cancellations = [];\n\n setIsLoading(true);\n for (const item of items) {\n cancellations.push(API.Reservation.cancelReservation(item.id, item.profile.email as string, booking.hotelId));\n }\n\n Promise.all(cancellations).then(() => {\n fetchRoomstayMember?.().then(() => {\n setIsLoading(false);\n onClose();\n });\n });\n };\n\n const footers = (\n <div className=\"d-flex u-pad align-items-center justify-content-center\">\n <div className=\"u-marg-right\">\n <BEButton isText onClick={onClose}>\n {t(Translation.Misc.Abort)}\n </BEButton>\n </div>\n <BEButton filled primary onClick={onCancelClick} isLoading={isLoading}>\n {t(Translation.Misc.YesImSure)}\n </BEButton>\n </div>\n );\n\n return (\n <SimpleModal\n title={t(Translation.Misc.CancellingReservation)}\n open={visible}\n size={SimpleModalSize.ExtraSmall}\n desktopFooter={footers}\n mobileFooter={footers}\n onClose={onClose}\n >\n <div className=\"u-pad\">\n <Text>{t(Translation.Misc.ThisWillCancel)}</Text>\n {/*TODO: Update wording to include all reservations*/}\n </div>\n </SimpleModal>\n );\n};\n\ntype CodeNumberInformationType = {\n itineraries: IRoomstayMemberBookingItemWithRefAndHotelDetails[];\n booking: IRoomstayMemberBooking;\n};\n\nconst CodeNumberInformation = (props: CodeNumberInformationType) => {\n const { itineraries, booking } = props;\n const { t } = useTranslation();\n\n const [cancelled, confirmed] = useMemo(() => {\n const cancelled = [];\n const confirmed = [];\n\n for (const item of itineraries) {\n if (item.status === IBookingStatus.Cancelled) {\n cancelled.push(item);\n } else {\n confirmed.push(item);\n }\n }\n\n return [cancelled, confirmed];\n }, itineraries);\n\n return (\n <Card className=\"w-100\" title={t(Translation.Reservation.CodeNumberInformation)}>\n {[\n { label: 'Cancelled', value: cancelled, type: PillType.Danger },\n { label: 'Confirmed', value: confirmed, type: PillType.Success },\n ].map((item, index) => {\n if (item.value.length > 0) {\n return (\n <Fragment key={index}>\n <Text className=\"u-marg-right--light\" inline type={TextType.Small}>\n {item.label}\n </Text>\n {item.value.map((row, rowIndex) => {\n return (\n <Fragment key={rowIndex}>\n <Text className=\"u-marg-right\" inline type={TextType.Small}>\n <Pill type={item.type}>#{row.id}</Pill>\n </Text>\n </Fragment>\n );\n })}\n <br />\n </Fragment>\n );\n }\n })}\n <div className=\"u-marg-top\">\n <Text className=\"u-marg-right--light\" inline type={TextType.Small}>\n {t(Translation.UserPortal.ReservationSingleScreen.Itinerary)}\n </Text>\n <Pill variant={PillVariant.Outlined} type={PillType.Grey}>\n #{booking.itineraryId}\n </Pill>\n </div>\n </Card>\n );\n};\n\nconst displayTime = (timeString: string) => dayjs().set('hours', +timeString.slice(0, 2)).set('minute', +timeString.slice(2)).format('h:mm A');\n\nexport const AccountReservationSinglePage = () => {\n const { t } = useTranslation();\n const { hotel } = useCurrentHotel();\n\n const beContext = useContext(BookingEngineContext);\n const { getHotel } = useContext(CompanyContext);\n const ccx = useContext(CompanyContext);\n\n const { getItinerary } = useMember();\n const [showingCancellationFor, setShowingCancellationFor] = useState<IRoomstayMemberBookingItemWithRefAndHotelDetails[] | null>(null);\n\n const [bookingHotel, setBookingHotel] = useState<Hotel>();\n\n const isMobile = beContext.screenSize <= ScreenSize.Medium;\n\n const params = useParams<{ resId: string }>();\n\n const [booking, itineraries]: [IRoomstayMemberBooking, IRoomstayMemberBookingItemWithRefAndHotelDetails[]] = useMemo(() => {\n if (!params.resId) {\n throw new Error('Missing reservation ID parameter.');\n }\n\n const itineraries: IRoomstayMemberBookingItemWithRefAndHotelDetails[] = [];\n\n const booking = getItinerary(params.resId);\n\n if (booking?.itinerary) {\n for (const itinerary of Object.values(booking.itinerary)) {\n itineraries.push({\n ...itinerary,\n bookingId: booking.itineraryId,\n hotel: booking.hotel,\n hotelId: booking.hotelId,\n });\n }\n }\n\n return [booking as IRoomstayMemberBooking, itineraries];\n }, [params, getItinerary]);\n\n useEffect(() => {\n if (booking && booking.hotelId) {\n getHotel(booking.hotelId).then((hotel) => {\n setBookingHotel(hotel);\n });\n }\n }, [booking, getHotel]);\n\n const allCancelled = useMemo(() => itineraries.every((row) => row.status === IBookingStatus.Cancelled), [itineraries]);\n\n const allCancellable = useMemo(() => itineraries.every((row) => row.isCancellable), [itineraries]);\n\n if (!booking) {\n return <>{t(Translation.Misc.Loading)}</>;\n }\n\n const { line1, line2, postalCode, country } = bookingHotel?.address ?? {};\n\n const onActionClick = (action: ReservationAction, item: IRoomstayMemberBookingItemWithRefAndHotelDetails) => {\n switch (action) {\n case ReservationAction.Cancel:\n setShowingCancellationFor([item]);\n break;\n }\n };\n\n const onCloseCancellationModal = () => {\n setShowingCancellationFor(null);\n };\n\n const onPrintClicked = () => {\n window.print();\n };\n\n const hotelImageElement =\n hotel?.logo && typeof hotel.logo !== 'string' ? hotel.logo : <img src={typeof hotel?.logo === 'string' ? hotel.logo : ccx.logo} alt=\"Hotel Logo\" className=\"u-block\" />;\n\n return (\n <div id={`reservation-body-${booking.itineraryId}`}>\n {!!booking?.hotel?.colors && <style>{`#reservation-body-${booking.itineraryId} {${getAccentOverrideStyleContent(booking.hotel.colors)}}`}</style>}\n <div className=\"u-marg-top--heavy@m u-marg-top@m- u-marg-bottom--light u-print-none\">\n <Link to={AccountRoutes.Reservations.path}>\n <BEButton isText icon={IconType.ArrowLeft} size=\"small\">\n {t(Translation.Reservation.BackToYourReservations)}\n </BEButton>\n </Link>\n </div>\n <div className=\"u-flex-align-stretch@m- u-flex u-flex-align-flex-end u-marg-bottom u-pad-top@m u-flex-direction-column@m- u-print-none\">\n <div>\n <Text className=\"u-marg-bottom--light\">{StringHelper.pluralWithCount(itineraries.length, 'Room', t)}</Text>\n <Headline size=\"extra-large\" className=\"u-marg-bottom--light\">\n {getRoomNamesString(itineraries)}\n </Headline>\n <Text type={TextType.Body}>\n {bookingHotel?.name} • {[line1, line2, postalCode, country].filter((value) => !!value).join(' ')}\n </Text>\n </div>\n <div className=\"u-flex u-flex-gap u-flex-direction-column@m- u-flex-gap--light@m- u-marg-top--heavy@m-\">\n <BEButton wide={isMobile} rounded={isMobile} textColor={Color.Navy} isText={!isMobile} icon={IconType.Share} iconPosition=\"left\">\n {t(Translation.Reservation.Share)}\n </BEButton>\n <BEButton\n wide={isMobile}\n mobileWidth\n rounded={isMobile}\n textColor={Color.Navy}\n className=\"\"\n isText={!isMobile}\n icon={IconType.Print}\n iconPosition=\"left\"\n onClick={onPrintClicked}\n >\n {t(Translation.Reservation.Print)}\n </BEButton>\n {!allCancelled && (\n <>\n {ModifyBookingFeature.isActive() ? (\n <BEButton wide={isMobile} mobileWidth rounded={isMobile} textColor={Color.Navy} isText={!isMobile} disabled={!allCancellable}>\n {StringHelper.plural(itineraries.length, t(Translation.Reservation.ModifyReservation), t)}\n </BEButton>\n ) : null}\n <BEButton\n danger\n wide={isMobile}\n mobileWidth\n rounded={isMobile}\n textColor={Color.Alert}\n isText={!isMobile}\n onClick={() => setShowingCancellationFor(itineraries)}\n disabled={!allCancellable}\n >\n {StringHelper.plural(itineraries.length, t(Translation.Reservation.CancelReservation), t)}\n </BEButton>\n </>\n )}\n </div>\n </div>\n\n <span className=\"u-print-none\">\n <LineBreak smallMargins fullBleed />\n </span>\n\n <PrintOnly>\n <div className=\"c-header d-inline-block\">\n <div className=\"c-header__logo u-flex u-flex-align-center\">{hotelImageElement}</div>\n </div>\n </PrintOnly>\n\n <div className=\"u-marg-bottom--massive u-marg-bottom--none@m- u-print-marg-none u-marg-top--heavy\">\n <ReservationList\n actions={[ReservationAction.Cancel, ReservationAction.Modify, ReservationAction.BookAgain]}\n reservationItems={itineraries}\n onActionClick={onActionClick}\n showCancelledNotifications\n />\n </div>\n <LineBreak noMargins={isMobile} />\n <div className=\"u-flex u-marg-top--heavy@m-\">\n <Headline size=\"large\" bold>\n {t(Translation.Reservation.Total)}\n </Headline>\n <div className=\"u-flex align-items-end flex-column\">\n <Headline lineThrough size=\"large\" bold>\n <Currency>{calculateTotalForMemberBooking(booking)}</Currency>\n </Headline>\n <Text type={TextType.Small} color={Color.DarkGrey}>\n {t(Translation.Reservation.PriceNote)}\n </Text>\n </div>\n </div>\n\n <div className=\"row u-marg-top--massive@m u-marg-top--heavy@m-\">\n <div className=\"col-md-4 u-flex u-print-col-md-4\">\n <Card className=\"w-100\" title={t(Translation.Navigation.Menu.PaymentInformation)}>\n <IconText icon={IconType.Person}>{itineraries?.[0]?.profile?.firstName + ' ' + itineraries?.[0]?.profile?.lastName}</IconText>\n <IconText icon={IconType.Email}>{itineraries?.[0]?.profile?.email}</IconText>\n <IconText icon={IconType.CreditCard} TextProps={{ type: TextType.Small }}>\n •••• •••• •••• 1111 <span style={{ color: Color.DarkGrey }}>(Visa)</span>\n </IconText>\n </Card>\n </div>\n <div className=\"col-md-4 u-flex u-print-col-md-4\">\n <Card className=\"w-100\" title={t(Translation.Reservation.HotelInformation)}>\n <IconText icon={IconType.Map}>\n {line1}\n <br />\n {line2} {postalCode}, {country}\n </IconText>\n <IconText icon={IconType.Phone}>{bookingHotel?.phone}</IconText>\n </Card>\n </div>\n <div className=\"col-md-4 u-flex u-print-col-md-4\">\n <CodeNumberInformation itineraries={itineraries} booking={booking} />\n </div>\n </div>\n <div className=\"u-marg-top--massive@m u-marg-top@m- u-background--snow u-w-fluid u-pad-top--massive@m u-pad-top--heavy@m- u-pad-bottom--heavy @m- u-pad-bottom--massive@m\">\n <div className=\"container\">\n <Text bold> {t(Translation.Reservation.Policies)}</Text>\n <div className=\"u-marg-top--medium\">\n <div className=\"u-w-100 row\">\n <div className=\"u-flex u-flex-direction-column@m- u-flex-gap--medium@m- col-6 col-md-3\">\n <Text type={TextType.Small}>\n <strong>{t(Translation.Reservation.CheckIn)}</strong>\n <br />\n {t(Translation.Reservation.After)} {displayTime(booking.hotel.checkInTime)}\n </Text>\n <Text type={TextType.Small}>\n <strong>{t(Translation.Reservation.CheckOut)}</strong>\n <br />\n {t(Translation.Reservation.Before)} {displayTime(booking.hotel.checkOutTime)}\n </Text>\n </div>\n </div>\n </div>\n <div className=\"u-marg-bottom\">\n {itineraries.map((itinerary, index) => (\n <div key={index} className=\"u-marg-top--heavy\">\n <div className=\"u-marg-bottom\">\n <Text key={index} type={TextType.Small}>\n <strong>\n {t(Translation.Misc.Room)} {index + 1}\n </strong>\n &nbsp;\n {itinerary.roomName} - {itinerary.rateName}\n </Text>\n </div>\n <div className=\"u-marg-bottom\">\n {itinerary.guaranteePolicyLongDescription ? (\n <>\n <Text type={TextType.Small} bold className=\"u-marg-bottom--light\">\n {t(Translation.Misc.GuaranteePolicy)}\n </Text>\n <Text type={TextType.Small}>\n <span dangerouslySetInnerHTML={{ __html: itinerary.guaranteePolicyLongDescription || '' }}></span>\n </Text>\n </>\n ) : null}\n </div>\n <Text type={TextType.Small} bold className=\"u-marg-bottom--light\">\n {t(Translation.Misc.CancellationPolicy)}\n </Text>\n <Text type={TextType.Small}>\n <span dangerouslySetInnerHTML={{ __html: itinerary.cancellationPolicyLongDescription || '' }}></span>\n </Text>\n </div>\n ))}\n </div>\n </div>\n </div>\n <CancelReservationModal\n onClose={onCloseCancellationModal}\n items={showingCancellationFor as IRoomstayMemberBookingItemWithRefAndHotelDetails[]}\n booking={booking}\n visible={!!showingCancellationFor}\n />\n </div>\n );\n};\n"]}
1
+ {"version":3,"file":"AccountReservationSinglePage.js","sourceRoot":"/","sources":["src/pages/account/Reservations/AccountReservationSinglePage.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAmJ;AACnJ,yCAAwG;AACxG,kDAA0B;AAC1B,+CAAkF;AAClF,iDAA+C;AAC/C,uDAAmD;AACnD,0DAAuD;AAEvD,kEAAmC;AACnC,6EAAqD;AACrD,8DAA2D;AAC3D,6EAAqD;AACrD,6EAAqD;AACrD,yDAA0D;AAC1D,sFAA8D;AAC9D,+EAAuD;AACvD,sFAAsF;AACtF,kEAAwE;AACxE,qFAA6D;AAC7D,kEAA2D;AAC3D,8EAA6E;AAC7E,+FAAuE;AACvE,mCAA0C;AAC1C,+DAAqD;AAErD,oGAA4E;AAC5E,wCAAoE;AACpE,mEAA2C;AAC3C,uEAA+C;AAE/C,oDAAiD;AAEjD,MAAM,kBAAkB,GAAG,CAAC,WAA+D,EAAE,EAAE;;IAC3F,MAAM,SAAS,GAA+B,EAAE,CAAC;IAEjD,KAAK,MAAM,SAAS,IAAI,WAAW,EAAE;QACjC,S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AC,CAAC;AAjQW,QAAA,4BAA4B,gCAiQvC","sourcesContent":["import { BookingEngineContext, CompanyContext, IRoomstayMemberBookingItemWithRefAndHotelDetails, RoomstayMemberContext } from '@frontend/contexts';\nimport { calculateTotalForMemberBooking, EBookingStatus, IRoomstayMemberBooking } from '@roomstay/core';\nimport dayjs from 'dayjs';\nimport React, { Fragment, useContext, useEffect, useMemo, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { Link, useParams } from 'react-router-dom';\nimport { Translation } from 'translations/Translation';\n\nimport API from '@/api/BookingAPI';\nimport BEButton from '@/components/generic/BEButton';\nimport { Card } from '@/components/generic/Card/Card/Card';\nimport Currency from '@/components/generic/Currency';\nimport Headline from '@/components/generic/Headline';\nimport { IconType } from '@/components/generic/Icon/Icon';\nimport IconText from '@/components/generic/IconText/IconText';\nimport LineBreak from '@/components/generic/LineBreak';\nimport SimpleModal, { SimpleModalSize } from '@/components/generic/modal/SimpleModal';\nimport Pill, { PillType, PillVariant } from '@/components/generic/Pill';\nimport PrintOnly from '@/components/generic/print/PrintOnly';\nimport Text, { TextType } from '@/components/generic/Text';\nimport { ReservationAction } from '@/components/reservation/ReservationItem';\nimport ReservationList from '@/components/reservation/ReservationList';\nimport { useCurrentHotel } from '@/hooks';\nimport { useMember } from '@/hooks/LoggedInUserHook';\nimport { Hotel } from '@/models/Client/Hotel/Hotel';\nimport ModifyBookingFeature from '@/providers/feature/ModifyBookingFeature';\nimport { Color, getAccentOverrideStyleContent } from '@/util/Color';\nimport ScreenSize from '@/util/ScreenSize';\nimport StringHelper from '@/util/StringHelper';\n\nimport { AccountRoutes } from '../AccountRoutes';\n\nconst getRoomNamesString = (itineraries: IRoomstayMemberBookingItemWithRefAndHotelDetails[]) => {\n const roomNames: { [name: string]: number } = {};\n\n for (const itinerary of itineraries) {\n roomNames[itinerary.roomName] = (roomNames[itinerary.roomName] ?? 0) + 1;\n }\n\n return Object.keys(roomNames)\n .map((name) => {\n const numOfRooms = roomNames[name];\n if (numOfRooms <= 1) return `${name}`;\n })\n .join(' + ');\n};\n\ntype CancelReservationModalProps = {\n items: IRoomstayMemberBookingItemWithRefAndHotelDetails[];\n booking: IRoomstayMemberBooking;\n\n visible: boolean;\n onClose: () => void;\n};\n\nconst CancelReservationModal = (props: CancelReservationModalProps) => {\n const { items, booking, visible, onClose } = props;\n const { fetchRoomstayMember } = useContext(RoomstayMemberContext);\n const { t } = useTranslation();\n\n const [isLoading, setIsLoading] = useState(false);\n\n const onCancelClick = () => {\n const cancellations = [];\n\n setIsLoading(true);\n for (const item of items) {\n cancellations.push(API.Reservation.cancelReservation(item.id, item.profile.email as string, booking.hotelId));\n }\n\n Promise.all(cancellations).then(() => {\n fetchRoomstayMember?.().then(() => {\n setIsLoading(false);\n onClose();\n });\n });\n };\n\n const footers = (\n <div className=\"d-flex u-pad align-items-center justify-content-center\">\n <div className=\"u-marg-right\">\n <BEButton isText onClick={onClose}>\n {t(Translation.Misc.Abort)}\n </BEButton>\n </div>\n <BEButton filled primary onClick={onCancelClick} isLoading={isLoading}>\n {t(Translation.Misc.YesImSure)}\n </BEButton>\n </div>\n );\n\n return (\n <SimpleModal\n title={t(Translation.Misc.CancellingReservation)}\n open={visible}\n size={SimpleModalSize.ExtraSmall}\n desktopFooter={footers}\n mobileFooter={footers}\n onClose={onClose}\n >\n <div className=\"u-pad\">\n <Text>{t(Translation.Misc.ThisWillCancel)}</Text>\n {/*TODO: Update wording to include all reservations*/}\n </div>\n </SimpleModal>\n );\n};\n\ntype CodeNumberInformationType = {\n itineraries: IRoomstayMemberBookingItemWithRefAndHotelDetails[];\n booking: IRoomstayMemberBooking;\n};\n\nconst CodeNumberInformation = (props: CodeNumberInformationType) => {\n const { itineraries, booking } = props;\n const { t } = useTranslation();\n\n const [cancelled, confirmed] = useMemo(() => {\n const cancelled = [];\n const confirmed = [];\n\n for (const item of itineraries) {\n if (item.status === EBookingStatus.Cancelled) {\n cancelled.push(item);\n } else {\n confirmed.push(item);\n }\n }\n\n return [cancelled, confirmed];\n }, itineraries);\n\n return (\n <Card className=\"w-100\" title={t(Translation.Reservation.CodeNumberInformation)}>\n {[\n { label: 'Cancelled', value: cancelled, type: PillType.Danger },\n { label: 'Confirmed', value: confirmed, type: PillType.Success },\n ].map((item, index) => {\n if (item.value.length > 0) {\n return (\n <Fragment key={index}>\n <Text className=\"u-marg-right--light\" inline type={TextType.Small}>\n {item.label}\n </Text>\n {item.value.map((row, rowIndex) => {\n return (\n <Fragment key={rowIndex}>\n <Text className=\"u-marg-right\" inline type={TextType.Small}>\n <Pill type={item.type}>#{row.id}</Pill>\n </Text>\n </Fragment>\n );\n })}\n <br />\n </Fragment>\n );\n }\n })}\n <div className=\"u-marg-top\">\n <Text className=\"u-marg-right--light\" inline type={TextType.Small}>\n {t(Translation.UserPortal.ReservationSingleScreen.Itinerary)}\n </Text>\n <Pill variant={PillVariant.Outlined} type={PillType.Grey}>\n #{booking.itineraryId}\n </Pill>\n </div>\n </Card>\n );\n};\n\nconst displayTime = (timeString: string) => dayjs().set('hours', +timeString.slice(0, 2)).set('minute', +timeString.slice(2)).format('h:mm A');\n\nexport const AccountReservationSinglePage = () => {\n const { t } = useTranslation();\n const { hotel } = useCurrentHotel();\n\n const beContext = useContext(BookingEngineContext);\n const { getHotel } = useContext(CompanyContext);\n const ccx = useContext(CompanyContext);\n\n const { getItinerary } = useMember();\n const [showingCancellationFor, setShowingCancellationFor] = useState<IRoomstayMemberBookingItemWithRefAndHotelDetails[] | null>(null);\n\n const [bookingHotel, setBookingHotel] = useState<Hotel>();\n\n const isMobile = beContext.screenSize <= ScreenSize.Medium;\n\n const params = useParams<{ resId: string }>();\n\n const [booking, itineraries]: [IRoomstayMemberBooking, IRoomstayMemberBookingItemWithRefAndHotelDetails[]] = useMemo(() => {\n if (!params.resId) {\n throw new Error('Missing reservation ID parameter.');\n }\n\n const itineraries: IRoomstayMemberBookingItemWithRefAndHotelDetails[] = [];\n\n const booking = getItinerary(params.resId);\n\n if (booking?.itinerary) {\n for (const itinerary of Object.values(booking.itinerary)) {\n itineraries.push({\n ...itinerary,\n bookingId: booking.itineraryId,\n hotel: booking.hotel,\n hotelId: booking.hotelId,\n });\n }\n }\n\n return [booking as IRoomstayMemberBooking, itineraries];\n }, [params, getItinerary]);\n\n useEffect(() => {\n if (booking && booking.hotelId) {\n getHotel(booking.hotelId).then((hotel) => {\n setBookingHotel(hotel);\n });\n }\n }, [booking, getHotel]);\n\n const allCancelled = useMemo(() => itineraries.every((row) => row.status === EBookingStatus.Cancelled), [itineraries]);\n\n const allCancellable = useMemo(() => itineraries.every((row) => row.isCancellable), [itineraries]);\n\n if (!booking) {\n return <>{t(Translation.Misc.Loading)}</>;\n }\n\n const { line1, line2, postalCode, country } = bookingHotel?.address ?? {};\n\n const onActionClick = (action: ReservationAction, item: IRoomstayMemberBookingItemWithRefAndHotelDetails) => {\n switch (action) {\n case ReservationAction.Cancel:\n setShowingCancellationFor([item]);\n break;\n }\n };\n\n const onCloseCancellationModal = () => {\n setShowingCancellationFor(null);\n };\n\n const onPrintClicked = () => {\n window.print();\n };\n\n const hotelImageElement =\n hotel?.logo && typeof hotel.logo !== 'string' ? hotel.logo : <img src={typeof hotel?.logo === 'string' ? hotel.logo : ccx.logo} alt=\"Hotel Logo\" className=\"u-block\" />;\n\n return (\n <div id={`reservation-body-${booking.itineraryId}`}>\n {!!booking?.hotel?.colors && <style>{`#reservation-body-${booking.itineraryId} {${getAccentOverrideStyleContent(booking.hotel.colors)}}`}</style>}\n <div className=\"u-marg-top--heavy@m u-marg-top@m- u-marg-bottom--light u-print-none\">\n <Link to={AccountRoutes.Reservations.path}>\n <BEButton isText icon={IconType.ArrowLeft} size=\"small\">\n {t(Translation.Reservation.BackToYourReservations)}\n </BEButton>\n </Link>\n </div>\n <div className=\"u-flex-align-stretch@m- u-flex u-flex-align-flex-end u-marg-bottom u-pad-top@m u-flex-direction-column@m- u-print-none\">\n <div>\n <Text className=\"u-marg-bottom--light\">{StringHelper.pluralWithCount(itineraries.length, 'Room', t)}</Text>\n <Headline size=\"extra-large\" className=\"u-marg-bottom--light\">\n {getRoomNamesString(itineraries)}\n </Headline>\n <Text type={TextType.Body}>\n {bookingHotel?.name} • {[line1, line2, postalCode, country].filter((value) => !!value).join(' ')}\n </Text>\n </div>\n <div className=\"u-flex u-flex-gap u-flex-direction-column@m- u-flex-gap--light@m- u-marg-top--heavy@m-\">\n <BEButton wide={isMobile} rounded={isMobile} textColor={Color.Navy} isText={!isMobile} icon={IconType.Share} iconPosition=\"left\">\n {t(Translation.Reservation.Share)}\n </BEButton>\n <BEButton\n wide={isMobile}\n mobileWidth\n rounded={isMobile}\n textColor={Color.Navy}\n className=\"\"\n isText={!isMobile}\n icon={IconType.Print}\n iconPosition=\"left\"\n onClick={onPrintClicked}\n >\n {t(Translation.Reservation.Print)}\n </BEButton>\n {!allCancelled && (\n <>\n {ModifyBookingFeature.isActive() ? (\n <BEButton wide={isMobile} mobileWidth rounded={isMobile} textColor={Color.Navy} isText={!isMobile} disabled={!allCancellable}>\n {StringHelper.plural(itineraries.length, t(Translation.Reservation.ModifyReservation), t)}\n </BEButton>\n ) : null}\n <BEButton\n danger\n wide={isMobile}\n mobileWidth\n rounded={isMobile}\n textColor={Color.Alert}\n isText={!isMobile}\n onClick={() => setShowingCancellationFor(itineraries)}\n disabled={!allCancellable}\n >\n {StringHelper.plural(itineraries.length, t(Translation.Reservation.CancelReservation), t)}\n </BEButton>\n </>\n )}\n </div>\n </div>\n\n <span className=\"u-print-none\">\n <LineBreak smallMargins fullBleed />\n </span>\n\n <PrintOnly>\n <div className=\"c-header d-inline-block\">\n <div className=\"c-header__logo u-flex u-flex-align-center\">{hotelImageElement}</div>\n </div>\n </PrintOnly>\n\n <div className=\"u-marg-bottom--massive u-marg-bottom--none@m- u-print-marg-none u-marg-top--heavy\">\n <ReservationList\n actions={[ReservationAction.Cancel, ReservationAction.Modify, ReservationAction.BookAgain]}\n reservationItems={itineraries}\n onActionClick={onActionClick}\n showCancelledNotifications\n />\n </div>\n <LineBreak noMargins={isMobile} />\n <div className=\"u-flex u-marg-top--heavy@m-\">\n <Headline size=\"large\" bold>\n {t(Translation.Reservation.Total)}\n </Headline>\n <div className=\"u-flex align-items-end flex-column\">\n <Headline lineThrough size=\"large\" bold>\n <Currency>{calculateTotalForMemberBooking(booking)}</Currency>\n </Headline>\n <Text type={TextType.Small} color={Color.DarkGrey}>\n {t(Translation.Reservation.PriceNote)}\n </Text>\n </div>\n </div>\n\n <div className=\"row u-marg-top--massive@m u-marg-top--heavy@m-\">\n <div className=\"col-md-4 u-flex u-print-col-md-4\">\n <Card className=\"w-100\" title={t(Translation.Navigation.Menu.PaymentInformation)}>\n <IconText icon={IconType.Person}>{itineraries?.[0]?.profile?.firstName + ' ' + itineraries?.[0]?.profile?.lastName}</IconText>\n <IconText icon={IconType.Email}>{itineraries?.[0]?.profile?.email}</IconText>\n <IconText icon={IconType.CreditCard} TextProps={{ type: TextType.Small }}>\n •••• •••• •••• 1111 <span style={{ color: Color.DarkGrey }}>(Visa)</span>\n </IconText>\n </Card>\n </div>\n <div className=\"col-md-4 u-flex u-print-col-md-4\">\n <Card className=\"w-100\" title={t(Translation.Reservation.HotelInformation)}>\n <IconText icon={IconType.Map}>\n {line1}\n <br />\n {line2} {postalCode}, {country}\n </IconText>\n <IconText icon={IconType.Phone}>{bookingHotel?.phone}</IconText>\n </Card>\n </div>\n <div className=\"col-md-4 u-flex u-print-col-md-4\">\n <CodeNumberInformation itineraries={itineraries} booking={booking} />\n </div>\n </div>\n <div className=\"u-marg-top--massive@m u-marg-top@m- u-background--snow u-w-fluid u-pad-top--massive@m u-pad-top--heavy@m- u-pad-bottom--heavy @m- u-pad-bottom--massive@m\">\n <div className=\"container\">\n <Text bold> {t(Translation.Reservation.Policies)}</Text>\n <div className=\"u-marg-top--medium\">\n <div className=\"u-w-100 row\">\n <div className=\"u-flex u-flex-direction-column@m- u-flex-gap--medium@m- col-6 col-md-3\">\n <Text type={TextType.Small}>\n <strong>{t(Translation.Reservation.CheckIn)}</strong>\n <br />\n {t(Translation.Reservation.After)} {displayTime(booking.hotel.checkInTime)}\n </Text>\n <Text type={TextType.Small}>\n <strong>{t(Translation.Reservation.CheckOut)}</strong>\n <br />\n {t(Translation.Reservation.Before)} {displayTime(booking.hotel.checkOutTime)}\n </Text>\n </div>\n </div>\n </div>\n <div className=\"u-marg-bottom\">\n {itineraries.map((itinerary, index) => (\n <div key={index} className=\"u-marg-top--heavy\">\n <div className=\"u-marg-bottom\">\n <Text key={index} type={TextType.Small}>\n <strong>\n {t(Translation.Misc.Room)} {index + 1}\n </strong>\n &nbsp;\n {itinerary.roomName} - {itinerary.rateName}\n </Text>\n </div>\n <div className=\"u-marg-bottom\">\n {itinerary.guaranteePolicyLongDescription ? (\n <>\n <Text type={TextType.Small} bold className=\"u-marg-bottom--light\">\n {t(Translation.Misc.GuaranteePolicy)}\n </Text>\n <Text type={TextType.Small}>\n <span dangerouslySetInnerHTML={{ __html: itinerary.guaranteePolicyLongDescription || '' }}></span>\n </Text>\n </>\n ) : null}\n </div>\n <Text type={TextType.Small} bold className=\"u-marg-bottom--light\">\n {t(Translation.Misc.CancellationPolicy)}\n </Text>\n <Text type={TextType.Small}>\n <span dangerouslySetInnerHTML={{ __html: itinerary.cancellationPolicyLongDescription || '' }}></span>\n </Text>\n </div>\n ))}\n </div>\n </div>\n </div>\n <CancelReservationModal\n onClose={onCloseCancellationModal}\n items={showingCancellationFor as IRoomstayMemberBookingItemWithRefAndHotelDetails[]}\n booking={booking}\n visible={!!showingCancellationFor}\n />\n </div>\n );\n};\n"]}
@@ -39,6 +39,7 @@ const Headline_1 = __importDefault(require("../../../components/generic/Headline
39
39
  const Icon_1 = __importStar(require("../../../components/generic/Icon/Icon"));
40
40
  const LineBreak_1 = __importDefault(require("../../../components/generic/LineBreak"));
41
41
  const Text_1 = __importStar(require("../../../components/generic/Text"));
42
+ const InlineSignUpSection_1 = require("../../../components/members/InlineSignUpSection");
42
43
  const CommonAddonSummary_1 = require("../../../components/steps/common/CommonAddonSummary/CommonAddonSummary");
43
44
  const ItemisedFeesSummary_1 = require("../../../components/steps/common/ItemisedFeesSummary/ItemisedFeesSummary");
44
45
  const events_1 = require("../../../events");
@@ -47,7 +48,7 @@ const Color_1 = require("../../../util/Color");
47
48
  const TextAlignment_1 = require("../../../util/TextAlignment");
48
49
  const TotalCalculator_1 = require("../../../util/TotalCalculator");
49
50
  function StepThanksComponent() {
50
- var _a, _b, _c;
51
+ var _a, _b, _c, _d, _e;
51
52
  const basketContext = (0, react_1.useContext)(contexts_1.BasketContext);
52
53
  const { hotel } = (0, hooks_1.useCurrentHotel)();
53
54
  const ccx = (0, react_1.useContext)(contexts_1.CompanyContext);
@@ -103,8 +104,9 @@ function StepThanksComponent() {
103
104
  react_1.default.createElement("div", { className: "u-marg-bottom--massive" },
104
105
  react_1.default.createElement(react_router_dom_1.Link, { to: "/" },
105
106
  react_1.default.createElement(BEButton_1.default, null, t(Translation_1.Translation.Step.Thanks.GoBackHome)))),
107
+ ((_c = (_b = checkoutData === null || checkoutData === void 0 ? void 0 : checkoutData.reservations) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.guest) && react_1.default.createElement(InlineSignUpSection_1.InlineSignUpSection, { reservation: checkoutData.reservations[0], hotelId: (hotel === null || hotel === void 0 ? void 0 : hotel.hotelID) || '' }),
106
108
  react_1.default.createElement(react_1.default.Fragment, null,
107
- react_1.default.createElement("div", { className: "u-marg-top w-100" }, (_b = checkoutData === null || checkoutData === void 0 ? void 0 : checkoutData.reservations) === null || _b === void 0 ? void 0 : _b.map((obj) => {
109
+ react_1.default.createElement("div", { className: "u-marg-top w-100" }, (_d = checkoutData === null || checkoutData === void 0 ? void 0 : checkoutData.reservations) === null || _d === void 0 ? void 0 : _d.map((obj) => {
108
110
  if (obj.addons) {
109
111
  const nights = Object.keys(obj.nights);
110
112
  obj.addons.forEach((addon) => {
@@ -136,8 +138,8 @@ function StepThanksComponent() {
136
138
  react_1.default.createElement(Text_1.default, { type: Text_1.TextType.Small, align: TextAlignment_1.TextAlign.Right }, t(Translation_1.Translation.Misc.Total)),
137
139
  react_1.default.createElement(Headline_1.default, { bold: true, size: "large", align: TextAlignment_1.TextAlign.Right },
138
140
  react_1.default.createElement(Currency_1.default, null, total)),
139
- react_1.default.createElement(Text_1.default, { type: Text_1.TextType.Small, align: TextAlignment_1.TextAlign.Right, color: Color_1.Color.DarkGrey }, t(Translation_1.Translation.Step.Thanks.IncludingTaxes)))))), (_c = checkoutData === null || checkoutData === void 0 ? void 0 : checkoutData.reservations) === null || _c === void 0 ? void 0 :
140
- _c.map((obj, index) => {
141
+ react_1.default.createElement(Text_1.default, { type: Text_1.TextType.Small, align: TextAlignment_1.TextAlign.Right, color: Color_1.Color.DarkGrey }, t(Translation_1.Translation.Step.Thanks.IncludingTaxes)))))), (_e = checkoutData === null || checkoutData === void 0 ? void 0 : checkoutData.reservations) === null || _e === void 0 ? void 0 :
142
+ _e.map((obj, index) => {
141
143
  const nightKeys = Object.keys(obj.nights);
142
144
  const firstNight = (0, dayjs_1.default)(nightKeys[0]);
143
145
  const lastNight = (0, dayjs_1.default)(nightKeys[nightKeys.length - 1]).add(1, 'day');
@@ -1 +1 @@
1
- {"version":3,"file":"StepThanksComponent.js","sourceRoot":"/","sources":["src/pages/steps/StepThanks/StepThanksComponent.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAmE;AACnE,2CAA4D;AAC5D,kDAA0B;AAC1B,+CAA4E;AAC5E,iDAA+C;AAC/C,uDAAwC;AACxC,0DAAuD;AAEvD,6EAAqD;AACrD,6EAAqD;AACrD,6EAAqD;AACrD,uEAAgE;AAChE,+EAAuD;AACvD,kEAA2D;AAC3D,wGAAqG;AACrG,2GAAwG;AACxG,qCAA+C;AAI/C,4FAAoE;AACpE,wCAAqC;AACrC,wDAAiD;AACjD,4DAAsE;AAEtE,SAAwB,mBAAmB;;IACvC,MAAM,aAAa,GA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{ useCurrentHotel, useEvent } from '@frontend/hooks';\nimport dayjs from 'dayjs';\nimport React, { useCallback, useContext, useEffect, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { Link } from 'react-router-dom';\nimport { Translation } from 'translations/Translation';\n\nimport BEButton from '@/components/generic/BEButton';\nimport Currency from '@/components/generic/Currency';\nimport Headline from '@/components/generic/Headline';\nimport Icon, { IconType } from '@/components/generic/Icon/Icon';\nimport LineBreak from '@/components/generic/LineBreak';\nimport Text, { TextType } from '@/components/generic/Text';\nimport { CommonAddonSummary } from '@/components/steps/common/CommonAddonSummary/CommonAddonSummary';\nimport { ItemisedFeesSummary } from '@/components/steps/common/ItemisedFeesSummary/ItemisedFeesSummary';\nimport { StepThanksViewEvent } from '@/events';\nimport { IEventReservation } from '@/models/Api/IEventReservation';\nimport { ReservationAddonDTO, ReservationDTO } from '@/models/Api/ReservationsDTO';\nimport { SimpleItemisedFee } from '@/models/Fee';\nimport ReservationRow from '@/pages/findReservation/ReservationRow';\nimport { Color } from '@/util/Color';\nimport { TextAlign } from '@/util/TextAlignment';\nimport { calculateTotalForReservation } from '@/util/TotalCalculator';\n\nexport default function StepThanksComponent() {\n const basketContext = useContext(BasketContext);\n\n const { hotel } = useCurrentHotel();\n const ccx = useContext(CompanyContext);\n const { raise } = useEvent();\n\n const [itemisedFees, setItemisedFees] = useState<SimpleItemisedFee[]>([]);\n\n const checkoutData = basketContext.reservationData;\n\n const isFromRoomstay = checkoutData?.itineraryNumber?.startsWith('RS');\n\n const { t } = useTranslation();\n\n const total = useCallback(() => {\n if (checkoutData?.reservations) {\n const reservations: IEventReservation[] = checkoutData?.reservations?.map((obj: ReservationDTO) => {\n const nightKeys = Object.keys(obj.nights);\n const dateFormat = 'YYYY-MM-DDTHH:mm:ss';\n\n return {\n reservationId: obj.reservationNumber,\n checkInTime: dayjs(nightKeys[0]).format(dateFormat),\n checkOutTime: dayjs(nightKeys[nightKeys.length - 1])\n .add(1, 'day')\n .format(dateFormat),\n totalPrice: obj.total.afterTax,\n priceCurrency: ccx.currentCurrency,\n };\n });\n const event = new StepThanksViewEvent(reservations, basketContext.currentBasketRows, hotel);\n raise(event);\n\n return calculateTotalForReservation(checkoutData, !isFromRoomstay);\n }\n\n return 0;\n }, [checkoutData]);\n\n useEffect(() => {\n setItemisedFees(checkoutData.feesSummary || []);\n }, [checkoutData]);\n\n const addons: ReservationAddonDTO[] = [];\n const comments: string[] = [];\n\n useEffect(() => {\n return () => {\n basketContext.finish();\n };\n }, []);\n\n return (\n <div className=\"container u-marg-top--heavy\">\n <div className=\"row justify-content-center\">\n <div className=\"col-lg-8 col-md-12 u-flex align-items-center u-flex-direction-column\">\n <div className=\"u-marg-bottom\">\n <Icon icon={IconType.Check} size=\"48px\" color={Color.White} backgroundColor={Color.Accent} borderRadius=\"round\" noPadding />\n </div>\n <div className=\"u-marg-bottom\" style={{ maxWidth: '530px' }}>\n <Headline size=\"large\" align={TextAlign.Center}>\n {t(Translation.Step.Thanks.ThankYouHeadline, { hotel: hotel?.name })}\n </Headline>\n </div>\n <div className=\"u-marg-bottom--heavy\">\n <Text color={Color.DarkGrey}>\n {t(Translation.Step.Thanks.InvoiceNumber)} {checkoutData.itineraryNumber}\n </Text>\n </div>\n <div className=\"u-marg-bottom--massive\">\n <Link to=\"/\">\n <BEButton>{t(Translation.Step.Thanks.GoBackHome)}</BEButton>\n </Link>\n </div>\n <>\n <div className=\"u-marg-top w-100\">\n {checkoutData?.reservations?.map((obj: ReservationDTO) => {\n if (obj.addons) {\n const nights = Object.keys(obj.nights);\n obj.addons.forEach((addon) => {\n if (isFromRoomstay) {\n addons.push({ ...addon, nights: nights.length });\n } else {\n addons.push(addon);\n }\n });\n }\n\n if (obj.comments) {\n obj.comments.map((comment: string) => {\n comments.push(comment);\n });\n }\n\n return <ReservationRow reservation={obj} key={obj.reservationNumber} />;\n })}\n </div>\n <LineBreak />\n\n <div className=\"w-100\">\n <CommonAddonSummary addons={addons} />\n {comments.length >= 1 && (\n <div className=\"u-marg-bottom--heavy\">\n <div className=\"u-marg-bottom\">\n <Text type={TextType.Label} color={Color.Grey}>\n {t(Translation.Step.Confirmation.Comments)}\n </Text>\n </div>\n {comments.map((comment, index) => (\n <Text\n style={{\n whiteSpace: 'pre',\n }}\n key={index}\n type={TextType.Small}\n >\n {comment}\n </Text>\n ))}\n </div>\n )}\n\n <ItemisedFeesSummary fees={itemisedFees} />\n\n <Text type={TextType.Small} align={TextAlign.Right}>\n {t(Translation.Misc.Total)}\n </Text>\n <Headline bold size=\"large\" align={TextAlign.Right}>\n <Currency>{total}</Currency>\n </Headline>\n <Text type={TextType.Small} align={TextAlign.Right} color={Color.DarkGrey}>\n {t(Translation.Step.Thanks.IncludingTaxes)}\n </Text>\n </div>\n </>\n </div>\n </div>\n {checkoutData?.reservations?.map((obj: ReservationDTO, index) => {\n const nightKeys = Object.keys(obj.nights);\n\n const firstNight = dayjs(nightKeys[0]);\n const lastNight = dayjs(nightKeys[nightKeys.length - 1]).add(1, 'day');\n\n return (\n <script key={index} type=\"application/ld+json\">\n {JSON.stringify({\n '@context': 'http://schema.org',\n '@type': 'LodgingReservation',\n reservationId: obj.reservationNumber,\n reservationStatus: 'http://schema.org/ReservationConfirmed',\n checkinTime: firstNight.format('YYYY-MM-DDTHH:mm:ss'),\n checkoutTime: lastNight.format('YYYY-MM-DDTHH:mm:ss'),\n totalPrice: obj.total.afterTax,\n basePrice: obj.total.beforeTax,\n priceCurrency: ccx.currentCurrency,\n })}\n </script>\n );\n })}\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"StepThanksComponent.js","sourceRoot":"/","sources":["src/pages/steps/StepThanks/StepThanksComponent.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAmE;AACnE,2CAA4D;AAC5D,kDAA0B;AAC1B,+CAA4E;AAC5E,iDAA+C;AAC/C,uDAAwC;AACxC,0DAAuD;AAEvD,6EAAqD;AACrD,6EAAqD;AACrD,6EAAqD;AACrD,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oBAAoB;gBAC7B,aAAa,EAAE,GAAG,CAAC,iBAAiB;gBACpC,iBAAiB,EAAE,wCAAwC;gBAC3D,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC,qBAAqB,CAAC;gBACrD,YAAY,EAAE,SAAS,CAAC,MAAM,CAAC,qBAAqB,CAAC;gBACrD,UAAU,EAAE,GAAG,CAAC,KAAK,CAAC,QAAQ;gBAC9B,SAAS,EAAE,GAAG,CAAC,KAAK,CAAC,SAAS;gBAC9B,aAAa,EAAE,GAAG,CAAC,eAAe;aACrC,CAAC,CACG,CACZ,CAAC;QACN,CAAC,CAAC,CACA,CACT,CAAC;AACN,CAAC;AAtKD,sCAsKC","sourcesContent":["import { BasketContext, CompanyContext } from '@frontend/contexts';\nimport { useCurrentHotel, useEvent } from '@frontend/hooks';\nimport dayjs from 'dayjs';\nimport React, { useCallback, useContext, useEffect, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { Link } from 'react-router-dom';\nimport { Translation } from 'translations/Translation';\n\nimport BEButton from '@/components/generic/BEButton';\nimport Currency from '@/components/generic/Currency';\nimport Headline from '@/components/generic/Headline';\nimport Icon, { IconType } from '@/components/generic/Icon/Icon';\nimport LineBreak from '@/components/generic/LineBreak';\nimport Text, { TextType } from '@/components/generic/Text';\nimport { InlineSignUpSection } from '@/components/members/InlineSignUpSection';\nimport { CommonAddonSummary } from '@/components/steps/common/CommonAddonSummary/CommonAddonSummary';\nimport { ItemisedFeesSummary } from '@/components/steps/common/ItemisedFeesSummary/ItemisedFeesSummary';\nimport { StepThanksViewEvent } from '@/events';\nimport { IEventReservation } from '@/models/Api/IEventReservation';\nimport { ReservationAddonDTO, ReservationDTO } from '@/models/Api/ReservationsDTO';\nimport { SimpleItemisedFee } from '@/models/Fee';\nimport ReservationRow from '@/pages/findReservation/ReservationRow';\nimport { Color } from '@/util/Color';\nimport { TextAlign } from '@/util/TextAlignment';\nimport { calculateTotalForReservation } from '@/util/TotalCalculator';\n\nexport default function StepThanksComponent() {\n const basketContext = useContext(BasketContext);\n\n const { hotel } = useCurrentHotel();\n const ccx = useContext(CompanyContext);\n const { raise } = useEvent();\n\n const [itemisedFees, setItemisedFees] = useState<SimpleItemisedFee[]>([]);\n\n const checkoutData = basketContext.reservationData;\n\n const isFromRoomstay = checkoutData?.itineraryNumber?.startsWith('RS');\n\n const { t } = useTranslation();\n\n const total = useCallback(() => {\n if (checkoutData?.reservations) {\n const reservations: IEventReservation[] = checkoutData?.reservations?.map((obj: ReservationDTO) => {\n const nightKeys = Object.keys(obj.nights);\n const dateFormat = 'YYYY-MM-DDTHH:mm:ss';\n\n return {\n reservationId: obj.reservationNumber,\n checkInTime: dayjs(nightKeys[0]).format(dateFormat),\n checkOutTime: dayjs(nightKeys[nightKeys.length - 1])\n .add(1, 'day')\n .format(dateFormat),\n totalPrice: obj.total.afterTax,\n priceCurrency: ccx.currentCurrency,\n };\n });\n const event = new StepThanksViewEvent(reservations, basketContext.currentBasketRows, hotel);\n raise(event);\n\n return calculateTotalForReservation(checkoutData, !isFromRoomstay);\n }\n\n return 0;\n }, [checkoutData]);\n\n useEffect(() => {\n setItemisedFees(checkoutData.feesSummary || []);\n }, [checkoutData]);\n\n const addons: ReservationAddonDTO[] = [];\n const comments: string[] = [];\n\n useEffect(() => {\n return () => {\n basketContext.finish();\n };\n }, []);\n\n return (\n <div className=\"container u-marg-top--heavy\">\n <div className=\"row justify-content-center\">\n <div className=\"col-lg-8 col-md-12 u-flex align-items-center u-flex-direction-column\">\n <div className=\"u-marg-bottom\">\n <Icon icon={IconType.Check} size=\"48px\" color={Color.White} backgroundColor={Color.Accent} borderRadius=\"round\" noPadding />\n </div>\n <div className=\"u-marg-bottom\" style={{ maxWidth: '530px' }}>\n <Headline size=\"large\" align={TextAlign.Center}>\n {t(Translation.Step.Thanks.ThankYouHeadline, { hotel: hotel?.name })}\n </Headline>\n </div>\n <div className=\"u-marg-bottom--heavy\">\n <Text color={Color.DarkGrey}>\n {t(Translation.Step.Thanks.InvoiceNumber)} {checkoutData.itineraryNumber}\n </Text>\n </div>\n\n <div className=\"u-marg-bottom--massive\">\n <Link to=\"/\">\n <BEButton>{t(Translation.Step.Thanks.GoBackHome)}</BEButton>\n </Link>\n </div>\n\n {checkoutData?.reservations?.[0]?.guest && <InlineSignUpSection reservation={checkoutData.reservations[0]} hotelId={hotel?.hotelID || ''} />}\n\n <>\n <div className=\"u-marg-top w-100\">\n {checkoutData?.reservations?.map((obj: ReservationDTO) => {\n if (obj.addons) {\n const nights = Object.keys(obj.nights);\n obj.addons.forEach((addon) => {\n if (isFromRoomstay) {\n addons.push({ ...addon, nights: nights.length });\n } else {\n addons.push(addon);\n }\n });\n }\n\n if (obj.comments) {\n obj.comments.map((comment: string) => {\n comments.push(comment);\n });\n }\n\n return <ReservationRow reservation={obj} key={obj.reservationNumber} />;\n })}\n </div>\n <LineBreak />\n\n <div className=\"w-100\">\n <CommonAddonSummary addons={addons} />\n {comments.length >= 1 && (\n <div className=\"u-marg-bottom--heavy\">\n <div className=\"u-marg-bottom\">\n <Text type={TextType.Label} color={Color.Grey}>\n {t(Translation.Step.Confirmation.Comments)}\n </Text>\n </div>\n {comments.map((comment, index) => (\n <Text\n style={{\n whiteSpace: 'pre',\n }}\n key={index}\n type={TextType.Small}\n >\n {comment}\n </Text>\n ))}\n </div>\n )}\n\n <ItemisedFeesSummary fees={itemisedFees} />\n\n <Text type={TextType.Small} align={TextAlign.Right}>\n {t(Translation.Misc.Total)}\n </Text>\n <Headline bold size=\"large\" align={TextAlign.Right}>\n <Currency>{total}</Currency>\n </Headline>\n <Text type={TextType.Small} align={TextAlign.Right} color={Color.DarkGrey}>\n {t(Translation.Step.Thanks.IncludingTaxes)}\n </Text>\n </div>\n </>\n </div>\n </div>\n {checkoutData?.reservations?.map((obj: ReservationDTO, index) => {\n const nightKeys = Object.keys(obj.nights);\n\n const firstNight = dayjs(nightKeys[0]);\n const lastNight = dayjs(nightKeys[nightKeys.length - 1]).add(1, 'day');\n\n return (\n <script key={index} type=\"application/ld+json\">\n {JSON.stringify({\n '@context': 'http://schema.org',\n '@type': 'LodgingReservation',\n reservationId: obj.reservationNumber,\n reservationStatus: 'http://schema.org/ReservationConfirmed',\n checkinTime: firstNight.format('YYYY-MM-DDTHH:mm:ss'),\n checkoutTime: lastNight.format('YYYY-MM-DDTHH:mm:ss'),\n totalPrice: obj.total.afterTax,\n basePrice: obj.total.beforeTax,\n priceCurrency: ccx.currentCurrency,\n })}\n </script>\n );\n })}\n </div>\n );\n}\n"]}
@@ -114,6 +114,7 @@ CurrencyProvider.currencies = {
114
114
  // ILS: new Currency("₪", "New Israeli Shekels"),
115
115
  // KRW: new Currency("₩", "South Korean Won"),
116
116
  // PLN: new Currency("zł", "Polish Złoty"),
117
+ FJD: new Currency_1.Currency('FJ$', 'Fiji Dollar', '$'),
117
118
  /*
118
119
  * The following currencies are currently excluded as the exchange rate API doesn't return them
119
120
  AED: new Currency("د.إ", "UAE Dirham"),
@@ -149,7 +150,6 @@ DZD: new Currency("د.ج", "Algerian Dinar"),
149
150
  EGP: new Currency("£", "Egyptian Pound"),
150
151
  ERN: new Currency("Nfk", "Nakfa"),
151
152
  ETB: new Currency("", "Ethiopian Birr"),
152
- FJD: new Currency("$", "Fiji Dollar"),
153
153
  FKP: new Currency("£", "Falkland Islands Pound"),
154
154
  GEL: new Currency("ლ", "Lari"),
155
155
  GHS: new Currency("₵", "Cedi"),
@@ -1 +1 @@
1
- {"version":3,"file":"CurrencyProvider.js","sourceRoot":"/","sources":["src/providers/CurrencyProvider.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,kEAAmC;AACnC,2HAAwH;AACxH,gDAA6C;AAE7C,MAAqB,gBAAgB;IA+J1B,MAAM,CAAC,YAAY,CAAC,KAAa,EAAE,oBAA6B,EAAE,EAAU,EAAE,IAAY;QAC7F,MAAM,MAAM,GAAG,gBAAgB,CAAC,aAAa,CAAC,KAAK,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;QAC/D,OAAO,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AC7C,0CAA0C;IAC1C,GAAG,EAAE,IAAI,mBAAQ,CAAC,GAAG,EAAE,cAAc,CAAC;IACtC,+CAA+C;IAC/C,GAAG,EAAE,IAAI,mBAAQ,CAAC,KAAK,EAAE,qBAAqB,EAAE,GAAG,CAAC;IACpD,gDAAgD;IAChD,GAAG,EAAE,IAAI,mBAAQ,CAAC,GAAG,EAAE,YAAY,CAAC;IACpC,kDAAkD;IAClD,GAAG,EAAE,IAAI,mBAAQ,CAAC,IAAI,EAAE,mBAAmB,EAAE,GAAG,CAAC;IACjD,GAAG,EAAE,IAAI,mBAAQ,CAAC,IAAI,EAAE,oBAAoB,EAAE,GAAG,CAAC;IAClD,iDAAiD;IACjD,8CAA8C;IAC9C,2CAA2C;IAC3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyHD;CACF,CAAC","sourcesContent":["import API from '@/api/BookingAPI';\nimport { FullPageBookingEngineElementEvents } from '@/engines/FullPageBookingEngine/FullPageBookingEngineElementEvents';\nimport { Currency } from '@/models/Currency';\n\nexport default class CurrencyProvider {\n public static labelOverrides: { [code: string]: { short: string; long: string } } = {};\n private static currencies: { [code: string]: Currency } = {\n CAD: new Currency('CA$', 'Canadian Dollars', '$'),\n HKD: new Currency('HK$', 'Hong Kong Dollars', '$'),\n // ISK: new Currency(\"Kr\", \"Iceland Kronur\"),\n // PHP: new Currency(\"₱\", \"Philippine Pesos\"),\n // DKK: new Currency(\"kr\", \"Danish Kroner\"),\n // HUF: new Currency(\"Ft\", \"Hungarian Forint\"),\n // CZK: new Currency(\"Kč\", \"Czech Koruna\"),\n GBP: new Currency('£', 'British Pounds'),\n // RON: new Currency(\"L\", \"Romania New Lei\"),\n // SEK: new Currency(\"kr\", \"Swedish Kronor\"),\n IDR: new Currency('Rp', 'Indonesian Rupiahs'),\n INR: new Currency('₹', 'Indian Rupees'),\n // BRL: new Currency(\"R$\", \"Brazilian Reals\"),\n // RUB: new Currency(\"р.\", \"Russian Rubles\"),\n // HRK: new Currency(\"Kn\", \"Croatian Kuna\"),\n JPY: new Currency('¥', 'Japanese Yen'),\n // THB: new Currency(\"฿\", \"Thai Baht\"),\n // CHF: new Currency(\"₣\", \"Swiss Francs\"),\n EUR: new Currency('€', 'Euros'),\n // BGN: new Currency(\"Лв\", \"Bulgarian Leva\"),\n // TRY: new Currency(\"₺\", \"Turkish Lira\"),\n CNY: new Currency('¥', 'Chinese Yuan'),\n // NOK: new Currency(\"kr\", \"Norwegian Kroner\"),\n NZD: new Currency('NZ$', 'New Zealand Dollars', '$'),\n // ZAR: new Currency(\"R\", \"South African Rand\"),\n USD: new Currency('$', 'US Dollars'),\n // MXN: new Currency(\"MX$\", \"Mexican Pesos\", \"$\"),\n SGD: new Currency('S$', 'Singapore Dollars', '$'),\n AUD: new Currency('A$', 'Australian Dollars', '$'),\n // ILS: new Currency(\"₪\", \"New Israeli Shekels\"),\n // KRW: new Currency(\"₩\", \"South Korean Won\"),\n // PLN: new Currency(\"zł\", \"Polish Złoty\"),\n /*\n * The following currencies are currently excluded as the exchange rate API doesn't return them\n AED: new Currency(\"د.إ\", \"UAE Dirham\"),\n AFN: new Currency(\"Af\", \"Afghani\"),\n ALL: new Currency(\"L\", \"Lek\"),\n AMD: new Currency(\"Դ\", \"Armenian Dram\"),\n AOA: new Currency(\"Kz\", \"Kwanza\"),\n ARS: new Currency(\"$\", \"Argentine Peso\"),\n AWG: new Currency(\"ƒ\", \"Aruban Guilder/Florin\"),\n AZN: new Currency(\"ман\", \"Azerbaijanian Manat\"),\n BAM: new Currency(\"КМ\", \"Konvertibilna Marka\"),\n BBD: new Currency(\"$\", \"Barbados Dollar\"),\n BDT: new Currency(\"৳\", \"Taka\"),\n BHD: new Currency(\"ب.د\", \"Bahraini Dinar\"),\n BIF: new Currency(\"₣\", \"Burundi Franc\"),\n BMD: new Currency(\"$\", \"Bermudian Dollar\"),\n BND: new Currency(\"$\", \"Brunei Dollar\"),\n BOB: new Currency(\"Bs.\", \"Boliviano\"),\n BSD: new Currency(\"$\", \"Bahamian Dollar\"),\n BTN: new Currency(\"\", \"Ngultrum\"),\n BWP: new Currency(\"P\", \"Pula\"),\n BYN: new Currency(\"Br\", \"Belarusian Ruble\"),\n BZD: new Currency(\"$\", \"Belize Dollar\"),\n CDF: new Currency(\"₣\", \"Congolese Franc\"),\n CLP: new Currency(\"$\", \"Chilean Peso\"),\n COP: new Currency(\"$\", \"Colombian Peso\"),\n CRC: new Currency(\"₡\", \"Costa Rican Colon\"),\n CUP: new Currency(\"$\", \"Cuban Peso\"),\n CVE: new Currency(\"$\", \"Cape Verde Escudo\"),\n DJF: new Currency(\"₣\", \"Djibouti Franc\"),\n DOP: new Currency(\"$\", \"Dominican Peso\"),\n DZD: new Currency(\"د.ج\", \"Algerian Dinar\"),\n EGP: new Currency(\"£\", \"Egyptian Pound\"),\n ERN: new Currency(\"Nfk\", \"Nakfa\"),\n ETB: new Currency(\"\", \"Ethiopian Birr\"),\n FJD: new Currency(\"$\", \"Fiji Dollar\"),\n FKP: new Currency(\"£\", \"Falkland Islands Pound\"),\n GEL: new Currency(\"ლ\", \"Lari\"),\n GHS: new Currency(\"₵\", \"Cedi\"),\n GIP: new Currency(\"£\", \"Gibraltar Pound\"),\n GMD: new Currency(\"D\", \"Dalasi\"),\n GNF: new Currency(\"₣\", \"Guinea Franc\"),\n GTQ: new Currency(\"Q\", \"Quetzal\"),\n GYD: new Currency(\"$\", \"Guyana Dollar\"),\n HNL: new Currency(\"L\", \"Lempira\"),\n HTG: new Currency(\"G\", \"Gourde\"),\n IQD: new Currency(\"ع.د\", \"Iraqi Dinar\"),\n IRR: new Currency(\"﷼\", \"Iranian Rial\"),\n JMD: new Currency(\"$\", \"Jamaican Dollar\"),\n JOD: new Currency(\"د.ا\", \"Jordanian Dinar\"),\n KES: new Currency(\"Sh\", \"Kenyan Shilling\"),\n KGS: new Currency(\"\", \"Som\"),\n KHR: new Currency(\"៛\", \"Riel\"),\n KPW: new Currency(\"₩\", \"North Korean Won\"),\n KWD: new Currency(\"د.ك\", \"Kuwaiti Dinar\"),\n KYD: new Currency(\"$\", \"Cayman Islands Dollar\"),\n KZT: new Currency(\"〒\", \"Tenge\"),\n LAK: new Currency(\"₭\", \"Kip\"),\n LBP: new Currency(\"ل.ل\", \"Lebanese Pound\"),\n LKR: new Currency(\"Rs\", \"Sri Lanka Rupee\"),\n LRD: new Currency(\"$\", \"Liberian Dollar\"),\n LSL: new Currency(\"L\", \"Loti\"),\n LYD: new Currency(\"ل.د\", \"Libyan Dinar\"),\n MAD: new Currency(\"د.م.\", \"Moroccan Dirham\"),\n MDL: new Currency(\"L\", \"Moldovan Leu\"),\n MGA: new Currency(\"\", \"Malagasy Ariary\"),\n MKD: new Currency(\"ден\", \"Denar\"),\n MMK: new Currency(\"K\", \"Kyat\"),\n MNT: new Currency(\"₮\", \"Tugrik\"),\n MOP: new Currency(\"P\", \"Pataca\"),\n MRU: new Currency(\"UM\", \"Ouguiya\"),\n MUR: new Currency(\"₨\", \"Mauritius Rupee\"),\n MVR: new Currency(\"ރ.\", \"Rufiyaa\"),\n MWK: new Currency(\"MK\", \"Kwacha\"),\n MYR: new Currency(\"RM\", \"Malaysian Ringgit\"),\n MZN: new Currency(\"MTn\", \"Metical\"),\n NAD: new Currency(\"$\", \"Namibia Dollar\"),\n NGN: new Currency(\"₦\", \"Naira\"),\n NIO: new Currency(\"C$\", \"Cordoba Oro\"),\n NPR: new Currency(\"₨\", \"Nepalese Rupee\"),\n OMR: new Currency(\"ر.ع.\", \"Rial Omani\"),\n PAB: new Currency(\"B/.\", \"Balboa\"),\n PEN: new Currency(\"S/.\", \"Nuevo Sol\"),\n PGK: new Currency(\"K\", \"Kina\"),\n PKR: new Currency(\"₨\", \"Pakistan Rupee\"),\n PYG: new Currency(\"₲\", \"Guarani\"),\n QAR: new Currency(\"ر.ق\", \"Qatari Rial\"),\n RSD: new Currency(\"din\", \"Serbian Dinar\"),\n RWF: new Currency(\"₣\", \"Rwanda Franc\"),\n SAR: new Currency(\"ر.س\", \"Saudi Riyal\"),\n SBD: new Currency(\"$\", \"Solomon Islands Dollar\"),\n SCR: new Currency(\"₨\", \"Seychelles Rupee\"),\n SDG: new Currency(\"£\", \"Sudanese Pound\"),\n SHP: new Currency(\"£\", \"Saint Helena Pound\"),\n SLL: new Currency(\"Le\", \"Leone\"),\n SOS: new Currency(\"Sh\", \"Somali Shilling\"),\n SRD: new Currency(\"$\", \"Suriname Dollar\"),\n STN: new Currency(\"Db\", \"Dobra\"),\n SYP: new Currency(\"ل.س\", \"Syrian Pound\"),\n SZL: new Currency(\"L\", \"Lilangeni\"),\n TJS: new Currency(\"ЅМ\", \"Somoni\"),\n TMT: new Currency(\"m\", \"Manat\"),\n TND: new Currency(\"د.ت\", \"Tunisian Dinar\"),\n TOP: new Currency(\"T$\", \"Pa’anga\"),\n TTD: new Currency(\"$\", \"Trinidad and Tobago Dollar\"),\n TWD: new Currency(\"$\", \"Taiwan Dollar\"),\n TZS: new Currency(\"Sh\", \"Tanzanian Shilling\"),\n UAH: new Currency(\"₴\", \"Hryvnia\"),\n UGX: new Currency(\"Sh\", \"Uganda Shilling\"),\n UYU: new Currency(\"$\", \"Peso Uruguayo\"),\n UZS: new Currency(\"\", \"Uzbekistan Sum\"),\n VEF: new Currency(\"Bs F\", \"Bolivar Fuerte\"),\n VND: new Currency(\"₫\", \"Dong\"),\n VUV: new Currency(\"Vt\", \"Vatu\"),\n WST: new Currency(\"T\", \"Tala\"),\n XAF: new Currency(\"₣\", \"CFA Franc BCEAO\"),\n XCD: new Currency(\"$\", \"East Caribbean Dollar\"),\n XPF: new Currency(\"₣\", \"CFP Franc\"),\n YER: new Currency(\"﷼\", \"Yemeni Rial\"),\n ZMW: new Currency(\"ZK\", \"Zambian Kwacha\"),\n ZWL: new Currency(\"$\", \"Zimbabwe Dollar\"),\n */\n };\n\n public static convertPrice(price: number, includeDecimalPlaces: boolean, to: string, from: string): number {\n const amount = CurrencyProvider._convertPrice(price, to, from);\n return includeDecimalPlaces ? CurrencyProvider.preciseRound(amount, 2) : Math.round(amount);\n }\n\n static async loadExchangeRates(currencyCode: string) {\n const currency = CurrencyProvider.currencies[currencyCode];\n if (!currency) {\n throw new Error(currencyCode + ' is not a supported currency code');\n }\n if (currency.rates) {\n return;\n }\n\n await API.ExchangeRate.fetchData(currencyCode).then((rates) => {\n currency.rates = rates;\n });\n\n FullPageBookingEngineElementEvents.reload(); // HMM\n }\n\n static getRatesForCurrencyCode(code: string) {\n return CurrencyProvider.currencies[code]?.rates;\n }\n\n static getCurrencyItems() {\n const currencies: { text: string; value: string }[] = Object.keys(CurrencyProvider.currencies).map((code) => ({\n text: code + ' - ' + CurrencyProvider.currencies[code].name,\n value: code,\n }));\n\n return currencies.sort((a, b) => a.value.localeCompare(b.value));\n }\n\n static getSymbol(currencyCode: string) {\n if (CurrencyProvider.labelOverrides[currencyCode]?.long) {\n return CurrencyProvider.labelOverrides[currencyCode]?.long;\n }\n\n return CurrencyProvider.currencies[currencyCode]?.symbol ?? '';\n }\n\n static getShortSymbol(currencyCode: string) {\n if (CurrencyProvider.labelOverrides[currencyCode]?.short) {\n return CurrencyProvider.labelOverrides[currencyCode]?.short;\n }\n\n return CurrencyProvider.currencies[currencyCode]?.shortSymbol ?? '';\n }\n\n private static preciseRound(num: number, decimals: number): number {\n const factor = Math.pow(10, decimals);\n const sign = num < 0 ? -1 : num > 0 ? 1 : 0;\n return Math.round(num * factor + (decimals > 0 ? 1 : 0) * (sign * (10 / Math.pow(100, decimals)))) / factor;\n }\n\n private static _convertPrice(price: number, to: string, from: string) {\n if (typeof price !== 'number') {\n price = parseFloat(price);\n }\n\n if (to === from) {\n return price;\n }\n\n if (!CurrencyProvider.currencies[from]?.rates) {\n this.loadExchangeRates(from);\n }\n\n return price * (CurrencyProvider.currencies[from]?.rates?.[to] ?? 1);\n }\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C,6CAA6C;IAC7C,GAAG,EAAE,IAAI,mBAAQ,CAAC,IAAI,EAAE,oBAAoB,CAAC;IAC7C,GAAG,EAAE,IAAI,mBAAQ,CAAC,GAAG,EAAE,eAAe,CAAC;IACvC,8CAA8C;IAC9C,6CAA6C;IAC7C,4CAA4C;IAC5C,GAAG,EAAE,IAAI,mBAAQ,CAAC,GAAG,EAAE,cAAc,CAAC;IACtC,uCAAuC;IACvC,0CAA0C;IAC1C,GAAG,EAAE,IAAI,mBAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;IAC/B,6CAA6C;IAC7C,0CAA0C;IAC1C,GAAG,EAAE,IAAI,mBAAQ,CAAC,GAAG,EAAE,cAAc,CAAC;IACtC,+CAA+C;IAC/C,GAAG,EAAE,IAAI,mBAAQ,CAAC,KAAK,EAAE,qBAAqB,EAAE,GAAG,CAAC;IACpD,gDAAgD;IAChD,GAAG,EAAE,IAAI,mBAAQ,CAAC,GAAG,EAAE,YAAY,CAAC;IACpC,kDAAkD;IAClD,GAAG,EAAE,IAAI,mBAAQ,CAAC,IAAI,EAAE,mBAAmB,EAAE,GAAG,CAAC;IACjD,GAAG,EAAE,IAAI,mBAAQ,CAAC,IAAI,EAAE,oBAAoB,EAAE,GAAG,CAAC;IAClD,iDAAiD;IACjD,8CAA8C;IAC9C,2CAA2C;IAC3C,GAAG,EAAE,IAAI,mBAAQ,CAAC,KAAK,EAAE,aAAa,EAAE,GAAG,CAAC;IAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwHD;CACF,CAAC","sourcesContent":["import API from '@/api/BookingAPI';\nimport { FullPageBookingEngineElementEvents } from '@/engines/FullPageBookingEngine/FullPageBookingEngineElementEvents';\nimport { Currency } from '@/models/Currency';\n\nexport default class CurrencyProvider {\n public static labelOverrides: { [code: string]: { short: string; long: string } } = {};\n private static currencies: { [code: string]: Currency } = {\n CAD: new Currency('CA$', 'Canadian Dollars', '$'),\n HKD: new Currency('HK$', 'Hong Kong Dollars', '$'),\n // ISK: new Currency(\"Kr\", \"Iceland Kronur\"),\n // PHP: new Currency(\"₱\", \"Philippine Pesos\"),\n // DKK: new Currency(\"kr\", \"Danish Kroner\"),\n // HUF: new Currency(\"Ft\", \"Hungarian Forint\"),\n // CZK: new Currency(\"Kč\", \"Czech Koruna\"),\n GBP: new Currency('£', 'British Pounds'),\n // RON: new Currency(\"L\", \"Romania New Lei\"),\n // SEK: new Currency(\"kr\", \"Swedish Kronor\"),\n IDR: new Currency('Rp', 'Indonesian Rupiahs'),\n INR: new Currency('₹', 'Indian Rupees'),\n // BRL: new Currency(\"R$\", \"Brazilian Reals\"),\n // RUB: new Currency(\"р.\", \"Russian Rubles\"),\n // HRK: new Currency(\"Kn\", \"Croatian Kuna\"),\n JPY: new Currency('¥', 'Japanese Yen'),\n // THB: new Currency(\"฿\", \"Thai Baht\"),\n // CHF: new Currency(\"₣\", \"Swiss Francs\"),\n EUR: new Currency('€', 'Euros'),\n // BGN: new Currency(\"Лв\", \"Bulgarian Leva\"),\n // TRY: new Currency(\"₺\", \"Turkish Lira\"),\n CNY: new Currency('¥', 'Chinese Yuan'),\n // NOK: new Currency(\"kr\", \"Norwegian Kroner\"),\n NZD: new Currency('NZ$', 'New Zealand Dollars', '$'),\n // ZAR: new Currency(\"R\", \"South African Rand\"),\n USD: new Currency('$', 'US Dollars'),\n // MXN: new Currency(\"MX$\", \"Mexican Pesos\", \"$\"),\n SGD: new Currency('S$', 'Singapore Dollars', '$'),\n AUD: new Currency('A$', 'Australian Dollars', '$'),\n // ILS: new Currency(\"₪\", \"New Israeli Shekels\"),\n // KRW: new Currency(\"₩\", \"South Korean Won\"),\n // PLN: new Currency(\"zł\", \"Polish Złoty\"),\n FJD: new Currency('FJ$', 'Fiji Dollar', '$'),\n\n /*\n * The following currencies are currently excluded as the exchange rate API doesn't return them\n AED: new Currency(\"د.إ\", \"UAE Dirham\"),\n AFN: new Currency(\"Af\", \"Afghani\"),\n ALL: new Currency(\"L\", \"Lek\"),\n AMD: new Currency(\"Դ\", \"Armenian Dram\"),\n AOA: new Currency(\"Kz\", \"Kwanza\"),\n ARS: new Currency(\"$\", \"Argentine Peso\"),\n AWG: new Currency(\"ƒ\", \"Aruban Guilder/Florin\"),\n AZN: new Currency(\"ман\", \"Azerbaijanian Manat\"),\n BAM: new Currency(\"КМ\", \"Konvertibilna Marka\"),\n BBD: new Currency(\"$\", \"Barbados Dollar\"),\n BDT: new Currency(\"৳\", \"Taka\"),\n BHD: new Currency(\"ب.د\", \"Bahraini Dinar\"),\n BIF: new Currency(\"₣\", \"Burundi Franc\"),\n BMD: new Currency(\"$\", \"Bermudian Dollar\"),\n BND: new Currency(\"$\", \"Brunei Dollar\"),\n BOB: new Currency(\"Bs.\", \"Boliviano\"),\n BSD: new Currency(\"$\", \"Bahamian Dollar\"),\n BTN: new Currency(\"\", \"Ngultrum\"),\n BWP: new Currency(\"P\", \"Pula\"),\n BYN: new Currency(\"Br\", \"Belarusian Ruble\"),\n BZD: new Currency(\"$\", \"Belize Dollar\"),\n CDF: new Currency(\"₣\", \"Congolese Franc\"),\n CLP: new Currency(\"$\", \"Chilean Peso\"),\n COP: new Currency(\"$\", \"Colombian Peso\"),\n CRC: new Currency(\"₡\", \"Costa Rican Colon\"),\n CUP: new Currency(\"$\", \"Cuban Peso\"),\n CVE: new Currency(\"$\", \"Cape Verde Escudo\"),\n DJF: new Currency(\"₣\", \"Djibouti Franc\"),\n DOP: new Currency(\"$\", \"Dominican Peso\"),\n DZD: new Currency(\"د.ج\", \"Algerian Dinar\"),\n EGP: new Currency(\"£\", \"Egyptian Pound\"),\n ERN: new Currency(\"Nfk\", \"Nakfa\"),\n ETB: new Currency(\"\", \"Ethiopian Birr\"),\n FKP: new Currency(\"£\", \"Falkland Islands Pound\"),\n GEL: new Currency(\"ლ\", \"Lari\"),\n GHS: new Currency(\"₵\", \"Cedi\"),\n GIP: new Currency(\"£\", \"Gibraltar Pound\"),\n GMD: new Currency(\"D\", \"Dalasi\"),\n GNF: new Currency(\"₣\", \"Guinea Franc\"),\n GTQ: new Currency(\"Q\", \"Quetzal\"),\n GYD: new Currency(\"$\", \"Guyana Dollar\"),\n HNL: new Currency(\"L\", \"Lempira\"),\n HTG: new Currency(\"G\", \"Gourde\"),\n IQD: new Currency(\"ع.د\", \"Iraqi Dinar\"),\n IRR: new Currency(\"﷼\", \"Iranian Rial\"),\n JMD: new Currency(\"$\", \"Jamaican Dollar\"),\n JOD: new Currency(\"د.ا\", \"Jordanian Dinar\"),\n KES: new Currency(\"Sh\", \"Kenyan Shilling\"),\n KGS: new Currency(\"\", \"Som\"),\n KHR: new Currency(\"៛\", \"Riel\"),\n KPW: new Currency(\"₩\", \"North Korean Won\"),\n KWD: new Currency(\"د.ك\", \"Kuwaiti Dinar\"),\n KYD: new Currency(\"$\", \"Cayman Islands Dollar\"),\n KZT: new Currency(\"〒\", \"Tenge\"),\n LAK: new Currency(\"₭\", \"Kip\"),\n LBP: new Currency(\"ل.ل\", \"Lebanese Pound\"),\n LKR: new Currency(\"Rs\", \"Sri Lanka Rupee\"),\n LRD: new Currency(\"$\", \"Liberian Dollar\"),\n LSL: new Currency(\"L\", \"Loti\"),\n LYD: new Currency(\"ل.د\", \"Libyan Dinar\"),\n MAD: new Currency(\"د.م.\", \"Moroccan Dirham\"),\n MDL: new Currency(\"L\", \"Moldovan Leu\"),\n MGA: new Currency(\"\", \"Malagasy Ariary\"),\n MKD: new Currency(\"ден\", \"Denar\"),\n MMK: new Currency(\"K\", \"Kyat\"),\n MNT: new Currency(\"₮\", \"Tugrik\"),\n MOP: new Currency(\"P\", \"Pataca\"),\n MRU: new Currency(\"UM\", \"Ouguiya\"),\n MUR: new Currency(\"₨\", \"Mauritius Rupee\"),\n MVR: new Currency(\"ރ.\", \"Rufiyaa\"),\n MWK: new Currency(\"MK\", \"Kwacha\"),\n MYR: new Currency(\"RM\", \"Malaysian Ringgit\"),\n MZN: new Currency(\"MTn\", \"Metical\"),\n NAD: new Currency(\"$\", \"Namibia Dollar\"),\n NGN: new Currency(\"₦\", \"Naira\"),\n NIO: new Currency(\"C$\", \"Cordoba Oro\"),\n NPR: new Currency(\"₨\", \"Nepalese Rupee\"),\n OMR: new Currency(\"ر.ع.\", \"Rial Omani\"),\n PAB: new Currency(\"B/.\", \"Balboa\"),\n PEN: new Currency(\"S/.\", \"Nuevo Sol\"),\n PGK: new Currency(\"K\", \"Kina\"),\n PKR: new Currency(\"₨\", \"Pakistan Rupee\"),\n PYG: new Currency(\"₲\", \"Guarani\"),\n QAR: new Currency(\"ر.ق\", \"Qatari Rial\"),\n RSD: new Currency(\"din\", \"Serbian Dinar\"),\n RWF: new Currency(\"₣\", \"Rwanda Franc\"),\n SAR: new Currency(\"ر.س\", \"Saudi Riyal\"),\n SBD: new Currency(\"$\", \"Solomon Islands Dollar\"),\n SCR: new Currency(\"₨\", \"Seychelles Rupee\"),\n SDG: new Currency(\"£\", \"Sudanese Pound\"),\n SHP: new Currency(\"£\", \"Saint Helena Pound\"),\n SLL: new Currency(\"Le\", \"Leone\"),\n SOS: new Currency(\"Sh\", \"Somali Shilling\"),\n SRD: new Currency(\"$\", \"Suriname Dollar\"),\n STN: new Currency(\"Db\", \"Dobra\"),\n SYP: new Currency(\"ل.س\", \"Syrian Pound\"),\n SZL: new Currency(\"L\", \"Lilangeni\"),\n TJS: new Currency(\"ЅМ\", \"Somoni\"),\n TMT: new Currency(\"m\", \"Manat\"),\n TND: new Currency(\"د.ت\", \"Tunisian Dinar\"),\n TOP: new Currency(\"T$\", \"Pa’anga\"),\n TTD: new Currency(\"$\", \"Trinidad and Tobago Dollar\"),\n TWD: new Currency(\"$\", \"Taiwan Dollar\"),\n TZS: new Currency(\"Sh\", \"Tanzanian Shilling\"),\n UAH: new Currency(\"₴\", \"Hryvnia\"),\n UGX: new Currency(\"Sh\", \"Uganda Shilling\"),\n UYU: new Currency(\"$\", \"Peso Uruguayo\"),\n UZS: new Currency(\"\", \"Uzbekistan Sum\"),\n VEF: new Currency(\"Bs F\", \"Bolivar Fuerte\"),\n VND: new Currency(\"₫\", \"Dong\"),\n VUV: new Currency(\"Vt\", \"Vatu\"),\n WST: new Currency(\"T\", \"Tala\"),\n XAF: new Currency(\"₣\", \"CFA Franc BCEAO\"),\n XCD: new Currency(\"$\", \"East Caribbean Dollar\"),\n XPF: new Currency(\"₣\", \"CFP Franc\"),\n YER: new Currency(\"﷼\", \"Yemeni Rial\"),\n ZMW: new Currency(\"ZK\", \"Zambian Kwacha\"),\n ZWL: new Currency(\"$\", \"Zimbabwe Dollar\"),\n */\n };\n\n public static convertPrice(price: number, includeDecimalPlaces: boolean, to: string, from: string): number {\n const amount = CurrencyProvider._convertPrice(price, to, from);\n return includeDecimalPlaces ? CurrencyProvider.preciseRound(amount, 2) : Math.round(amount);\n }\n\n static async loadExchangeRates(currencyCode: string) {\n const currency = CurrencyProvider.currencies[currencyCode];\n if (!currency) {\n throw new Error(currencyCode + ' is not a supported currency code');\n }\n if (currency.rates) {\n return;\n }\n\n await API.ExchangeRate.fetchData(currencyCode).then((rates) => {\n currency.rates = rates;\n });\n\n FullPageBookingEngineElementEvents.reload(); // HMM\n }\n\n static getRatesForCurrencyCode(code: string) {\n return CurrencyProvider.currencies[code]?.rates;\n }\n\n static getCurrencyItems() {\n const currencies: { text: string; value: string }[] = Object.keys(CurrencyProvider.currencies).map((code) => ({\n text: code + ' - ' + CurrencyProvider.currencies[code].name,\n value: code,\n }));\n\n return currencies.sort((a, b) => a.value.localeCompare(b.value));\n }\n\n static getSymbol(currencyCode: string) {\n if (CurrencyProvider.labelOverrides[currencyCode]?.long) {\n return CurrencyProvider.labelOverrides[currencyCode]?.long;\n }\n\n return CurrencyProvider.currencies[currencyCode]?.symbol ?? '';\n }\n\n static getShortSymbol(currencyCode: string) {\n if (CurrencyProvider.labelOverrides[currencyCode]?.short) {\n return CurrencyProvider.labelOverrides[currencyCode]?.short;\n }\n\n return CurrencyProvider.currencies[currencyCode]?.shortSymbol ?? '';\n }\n\n private static preciseRound(num: number, decimals: number): number {\n const factor = Math.pow(10, decimals);\n const sign = num < 0 ? -1 : num > 0 ? 1 : 0;\n return Math.round(num * factor + (decimals > 0 ? 1 : 0) * (sign * (10 / Math.pow(100, decimals)))) / factor;\n }\n\n private static _convertPrice(price: number, to: string, from: string) {\n if (typeof price !== 'number') {\n price = parseFloat(price);\n }\n\n if (to === from) {\n return price;\n }\n\n if (!CurrencyProvider.currencies[from]?.rates) {\n this.loadExchangeRates(from);\n }\n\n return price * (CurrencyProvider.currencies[from]?.rates?.[to] ?? 1);\n }\n}\n"]}
@@ -1,6 +1,12 @@
1
1
  import { Feature } from './Feature';
2
- declare class MemberPortalFeature extends Feature {
2
+ interface MemberPortalOptions {
3
+ useMemberPortalForMemberPricing?: boolean;
4
+ }
5
+ declare class MemberPortalFeature extends Feature<MemberPortalOptions> {
6
+ private useMemberPortalForMemberPricing;
3
7
  constructor();
8
+ shouldUseMemberPortalForMemberPricing(): boolean;
9
+ protected onLoad(options?: MemberPortalOptions): void;
4
10
  }
5
11
  declare const _default: MemberPortalFeature;
6
12
  export default _default;
@@ -4,6 +4,17 @@ const Feature_1 = require("./Feature");
4
4
  class MemberPortalFeature extends Feature_1.Feature {
5
5
  constructor() {
6
6
  super('MemberPortalFeature');
7
+ // If this option is enabled, we'll force users to sign up to the member portal before showing member prices.
8
+ // This will require them to set a password and verify their email before proceeding to checkout.
9
+ this.useMemberPortalForMemberPricing = false;
10
+ }
11
+ shouldUseMemberPortalForMemberPricing() {
12
+ return this.useMemberPortalForMemberPricing;
13
+ }
14
+ onLoad(options) {
15
+ if ((options === null || options === void 0 ? void 0 : options.useMemberPortalForMemberPricing) !== undefined) {
16
+ this.useMemberPortalForMemberPricing = options.useMemberPortalForMemberPricing;
17
+ }
7
18
  }
8
19
  }
9
20
  exports.default = new MemberPortalFeature();
@@ -1 +1 @@
1
- {"version":3,"file":"MemberPortalFeature.js","sourceRoot":"/","sources":["src/providers/feature/MemberPortalFeature.ts"],"names":[],"mappings":";;AAAA,yDAAsD;AAEtD,MAAM,mBAAoB,SAAQ,iBAAO;IACrC;QACI,KAAK,CAAC,qBAAqB,CAAC,CAAC;IACjC,CAAC;CACJ;AAED,kBAAe,IAAI,mBAAmB,EAAE,CAAC","sourcesContent":["import { Feature } from '@/providers/feature/Feature';\n\nclass MemberPortalFeature extends Feature {\n constructor() {\n super('MemberPortalFeature');\n }\n}\n\nexport default new MemberPortalFeature();\n"]}
1
+ {"version":3,"file":"MemberPortalFeature.js","sourceRoot":"/","sources":["src/providers/feature/MemberPortalFeature.ts"],"names":[],"mappings":";;AAAA,yDAAsD;AAMtD,MAAM,mBAAoB,SAAQ,iBAA4B;IAK1D;QACI,KAAK,CAAC,qBAAqB,CAAC,CAAC;QALjC,6GAA6G;QAC7G,iGAAiG;QACzF,oCAA+B,GAAG,KAAK,CAAC;IAIhD,CAAC;IAEM,qCAAqC;QACxC,OAAO,IAAI,CAAC,+BAA+B,CAAC;IAChD,CAAC;IAES,MAAM,CAAC,OAA6B;QAC1C,IAAI,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,+BAA+B,MAAK,SAAS,EAAE;YACxD,IAAI,CAAC,+BAA+B,GAAG,OAAO,CAAC,+BAA+B,CAAC;SAClF;IACL,CAAC;CACJ;AAED,kBAAe,IAAI,mBAAmB,EAAE,CAAC","sourcesContent":["import { Feature } from '@/providers/feature/Feature';\n\ninterface MemberPortalOptions {\n useMemberPortalForMemberPricing?: boolean;\n}\n\nclass MemberPortalFeature extends Feature<MemberPortalOptions> {\n // If this option is enabled, we'll force users to sign up to the member portal before showing member prices.\n // This will require them to set a password and verify their email before proceeding to checkout.\n private useMemberPortalForMemberPricing = false;\n\n constructor() {\n super('MemberPortalFeature');\n }\n\n public shouldUseMemberPortalForMemberPricing(): boolean {\n return this.useMemberPortalForMemberPricing;\n }\n\n protected onLoad(options?: MemberPortalOptions): void {\n if (options?.useMemberPortalForMemberPricing !== undefined) {\n this.useMemberPortalForMemberPricing = options.useMemberPortalForMemberPricing;\n }\n }\n}\n\nexport default new MemberPortalFeature();\n"]}
@@ -268,6 +268,7 @@ export declare const Translation: {
268
268
  MoreDetails: string;
269
269
  ExcludingTaxes: string;
270
270
  Sleeps: string;
271
+ PetFriendly: string;
271
272
  RateTypeFilterLabel: string;
272
273
  ChooseRoomBelow: string;
273
274
  EditThisRoom: string;
@@ -271,6 +271,7 @@ exports.Translation = {
271
271
  MoreDetails: 'Step.Room.MoreDetails',
272
272
  ExcludingTaxes: 'Step.Room.ExcludingTaxes',
273
273
  Sleeps: 'Step.Room.Sleeps',
274
+ PetFriendly: 'Step.Room.PetFriendly',
274
275
  RateTypeFilterLabel: 'Step.Room.RateTypeFilterLabel',
275
276
  ChooseRoomBelow: 'Step.Room.ChooseRoomBelow',
276
277
  EditThisRoom: 'Step.Room.EditThisRoom',