@roomstay/frontend 2.6.1 → 2.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/201.bundle.js +1 -1
- package/dist/457.bundle.js +1 -0
- package/dist/468.bundle.js +1 -1
- package/dist/main.bundle.js +1 -1
- package/dist/src/components/generic/BookingWizard/BookingWizard.js +2 -2
- package/dist/src/components/generic/BookingWizard/BookingWizard.js.map +1 -1
- package/dist/src/components/generic/BookingWizard/BookingWizardContent.d.ts +1 -0
- package/dist/src/components/generic/BookingWizard/BookingWizardContent.js +6 -7
- package/dist/src/components/generic/BookingWizard/BookingWizardContent.js.map +1 -1
- package/dist/src/components/generic/BookingWizard/BookingWizardGuestSelector/BookingWizardGuestSelector.d.ts +1 -0
- package/dist/src/components/generic/BookingWizard/BookingWizardGuestSelector/BookingWizardGuestSelector.js +5 -5
- package/dist/src/components/generic/BookingWizard/BookingWizardGuestSelector/BookingWizardGuestSelector.js.map +1 -1
- package/dist/src/components/generic/BookingWizard/BookingWizardPromoCode/BookingWizardPromoCode.d.ts +1 -0
- package/dist/src/components/generic/BookingWizard/BookingWizardPromoCode/BookingWizardPromoCode.js +6 -2
- package/dist/src/components/generic/BookingWizard/BookingWizardPromoCode/BookingWizardPromoCode.js.map +1 -1
- package/dist/src/components/generic/Icon/Icon.d.ts +3 -1
- package/dist/src/components/generic/Icon/Icon.js +2 -0
- package/dist/src/components/generic/Icon/Icon.js.map +1 -1
- package/dist/src/components/generic/NumberIncrement.d.ts +1 -0
- package/dist/src/components/generic/NumberIncrement.js +7 -7
- package/dist/src/components/generic/NumberIncrement.js.map +1 -1
- package/dist/src/components/generic/PageTitle/index.d.ts +4 -0
- package/dist/src/components/generic/PageTitle/index.js +20 -0
- package/dist/src/components/generic/PageTitle/index.js.map +1 -0
- package/dist/src/components/generic/date/DatePicker.js +2 -0
- package/dist/src/components/generic/date/DatePicker.js.map +1 -1
- package/dist/src/components/generic/date/DatePickerDay.js +3 -2
- package/dist/src/components/generic/date/DatePickerDay.js.map +1 -1
- package/dist/src/components/generic/loader/LargeLoader.js +20 -58
- package/dist/src/components/generic/loader/LargeLoader.js.map +1 -1
- package/dist/src/components/graphics/EmptyGraphic.d.ts +7 -0
- package/dist/src/components/graphics/EmptyGraphic.js +92 -0
- package/dist/src/components/graphics/EmptyGraphic.js.map +1 -0
- package/dist/src/components/graphics/HomeEmptyCard.js +67 -30
- package/dist/src/components/graphics/HomeEmptyCard.js.map +1 -1
- package/dist/src/components/graphics/TravelerNotfound.js.map +1 -0
- package/dist/src/components/navigation/Header.js +3 -4
- package/dist/src/components/navigation/Header.js.map +1 -1
- package/dist/src/components/reservation/EmptyReservation.js +2 -2
- package/dist/src/components/reservation/EmptyReservation.js.map +1 -1
- package/dist/src/components/steps/addons/AddonsNotFound.js +1 -1
- package/dist/src/components/steps/addons/AddonsNotFound.js.map +1 -1
- package/dist/src/components/steps/room/MemberSignInModal/ExternalMemberModal.js +1 -1
- package/dist/src/components/steps/room/MemberSignInModal/ExternalMemberModal.js.map +1 -1
- package/dist/src/components/steps/room/NoRoomsFoundBlock.js +2 -2
- package/dist/src/components/steps/room/NoRoomsFoundBlock.js.map +1 -1
- package/dist/src/components/steps/room/RatesNotFound.js +2 -2
- package/dist/src/components/steps/room/RatesNotFound.js.map +1 -1
- package/dist/src/contexts/ConfirmationStepContext/ConfirmationStepContextWrapper.js +1 -1
- package/dist/src/contexts/ConfirmationStepContext/ConfirmationStepContextWrapper.js.map +1 -1
- package/dist/src/contexts/HotelOverridesContext.js +4 -0
- package/dist/src/contexts/HotelOverridesContext.js.map +1 -1
- package/dist/src/engines/BookingWizardEngine/BookingWizardEngine.d.ts +2 -0
- package/dist/src/engines/BookingWizardEngine/BookingWizardEngine.js.map +1 -1
- package/dist/src/engines/BookingWizardEngine/BookingWizardEngineElement.js +1 -0
- package/dist/src/engines/BookingWizardEngine/BookingWizardEngineElement.js.map +1 -1
- package/dist/src/models/Api/HotelOverrideDTO.d.ts +11 -0
- package/dist/src/models/Api/HotelOverrideDTO.js.map +1 -1
- package/dist/src/pages/account/AccountHome/AccountHomePage.js +7 -13
- package/dist/src/pages/account/AccountHome/AccountHomePage.js.map +1 -1
- package/dist/src/pages/account/Details/AccountDetailsNoCardsPage.js +1 -1
- package/dist/src/pages/account/Details/AccountDetailsNoCardsPage.js.map +1 -1
- package/dist/src/pages/findReservation/FindReservation.js +2 -0
- package/dist/src/pages/findReservation/FindReservation.js.map +1 -1
- package/dist/src/pages/findReservation/FindReservationResults.js +43 -40
- package/dist/src/pages/findReservation/FindReservationResults.js.map +1 -1
- package/dist/src/pages/hotel/HotelInfo.js +2 -0
- package/dist/src/pages/hotel/HotelInfo.js.map +1 -1
- package/dist/src/pages/steps/StepAddon/StepAddonComponent.js +2 -0
- package/dist/src/pages/steps/StepAddon/StepAddonComponent.js.map +1 -1
- package/dist/src/pages/steps/StepConfirmation/StepConfirmationComponent.js +2 -0
- package/dist/src/pages/steps/StepConfirmation/StepConfirmationComponent.js.map +1 -1
- package/dist/src/pages/steps/StepDate/StepDateComponent.js +0 -2
- package/dist/src/pages/steps/StepDate/StepDateComponent.js.map +1 -1
- package/dist/src/routes/NaturallyProgressedStepRoute.js +11 -0
- package/dist/src/routes/NaturallyProgressedStepRoute.js.map +1 -1
- package/dist/src/translations/Translation.d.ts +2 -0
- package/dist/src/translations/Translation.js +2 -0
- package/dist/src/translations/Translation.js.map +1 -1
- package/dist/src/translations/languages/en-gb.js +8 -6
- package/dist/src/translations/languages/en-gb.js.map +1 -1
- package/dist/src/util/Validation.js +1 -1
- package/dist/src/util/Validation.js.map +1 -1
- package/dist/test.bundle.js +1 -1
- package/dist/vendors.bundle.js +1 -1
- package/package.json +4 -2
- package/dist/572.bundle.js +0 -1
- package/dist/src/components/generic/TravelerNotfound.js.map +0 -1
- package/dist/src/components/graphics/HomeEmptyReservation.d.ts +0 -7
- package/dist/src/components/graphics/HomeEmptyReservation.js +0 -136
- package/dist/src/components/graphics/HomeEmptyReservation.js.map +0 -1
- /package/dist/src/components/{generic → graphics}/TravelerNotfound.d.ts +0 -0
- /package/dist/src/components/{generic → graphics}/TravelerNotfound.js +0 -0
|
@@ -41,6 +41,7 @@ const Currency_1 = __importDefault(require("../../components/generic/Currency"))
|
|
|
41
41
|
const Headline_1 = __importDefault(require("../../components/generic/Headline"));
|
|
42
42
|
const LineBreak_1 = __importDefault(require("../../components/generic/LineBreak"));
|
|
43
43
|
const LargeLoader_1 = __importDefault(require("../../components/generic/loader/LargeLoader"));
|
|
44
|
+
const PageTitle_1 = require("../../components/generic/PageTitle");
|
|
44
45
|
const Text_1 = __importStar(require("../../components/generic/Text"));
|
|
45
46
|
const CommonAddonSummary_1 = require("../../components/steps/common/CommonAddonSummary/CommonAddonSummary");
|
|
46
47
|
const events_1 = require("../../events");
|
|
@@ -116,47 +117,49 @@ function FindReservationResults() {
|
|
|
116
117
|
const event = new events_1.FindReservationResultsViewEvent(reservations);
|
|
117
118
|
raise(event);
|
|
118
119
|
}, [data]);
|
|
119
|
-
return (react_1.default.createElement("div", { className: "container u-pad--heavy-plus u-pad-left u-pad-right" },
|
|
120
|
-
react_1.default.createElement(
|
|
121
|
-
|
|
122
|
-
react_1.default.createElement(Headline_1.default, { size: "extra-large" }, t(Translation_1.Translation.FindReservation.YourItinerary)),
|
|
123
|
-
react_1.default.createElement(Headline_1.default, { color: Color_1.Color.DarkGrey },
|
|
124
|
-
"#", bookingInformation === null || bookingInformation === void 0 ? void 0 :
|
|
125
|
-
bookingInformation.itineraryNumber),
|
|
126
|
-
react_1.default.createElement("div", { className: "row u-marg-top--heavy" },
|
|
127
|
-
react_1.default.createElement(AutoAutoHeight_1.default, { open: !!cancellationMessage },
|
|
128
|
-
react_1.default.createElement(Alert_1.default, null, cancellationMessage)), (_b = bookingInformation === null || bookingInformation === void 0 ? void 0 : bookingInformation.reservations) === null || _b === void 0 ? void 0 :
|
|
129
|
-
_b.map((obj) => {
|
|
130
|
-
if (obj.addons) {
|
|
131
|
-
const nights = Object.keys(obj.nights);
|
|
132
|
-
obj.addons.forEach((addon) => {
|
|
133
|
-
if (isFromRoomstay) {
|
|
134
|
-
addons.push(Object.assign(Object.assign({}, addon), { nights: nights.length }));
|
|
135
|
-
}
|
|
136
|
-
else {
|
|
137
|
-
addons.push(addon);
|
|
138
|
-
}
|
|
139
|
-
});
|
|
140
|
-
}
|
|
141
|
-
if (obj.comments) {
|
|
142
|
-
obj.comments.map((comment) => {
|
|
143
|
-
comments.push(comment);
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
return (react_1.default.createElement("div", { className: "col-lg-6", key: obj.reservationNumber },
|
|
147
|
-
react_1.default.createElement(ReservationRow_1.default, { reservation: obj, key: obj.reservationNumber })));
|
|
148
|
-
})),
|
|
149
|
-
react_1.default.createElement(LineBreak_1.default, null),
|
|
150
|
-
react_1.default.createElement(CommonAddonSummary_1.CommonAddonSummary, { addons: addons }),
|
|
151
|
-
comments.length >= 1 && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
120
|
+
return (react_1.default.createElement("div", { className: "container u-pad--heavy-plus u-pad-left u-pad-right" },
|
|
121
|
+
react_1.default.createElement(PageTitle_1.PageTitle, { step: "FindReservation" }),
|
|
122
|
+
isLoading ? (react_1.default.createElement(LargeLoader_1.default, null)) : (react_1.default.createElement(react_1.default.Fragment, null,
|
|
152
123
|
react_1.default.createElement("div", { className: "u-marg-bottom" },
|
|
153
|
-
react_1.default.createElement(
|
|
154
|
-
|
|
155
|
-
react_1.default.createElement(
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
react_1.default.createElement(
|
|
159
|
-
|
|
124
|
+
react_1.default.createElement(BackButton_1.default, { onClick: pushHistoryOnClick })),
|
|
125
|
+
react_1.default.createElement(Headline_1.default, { size: "extra-large" }, t(Translation_1.Translation.FindReservation.YourItinerary)),
|
|
126
|
+
react_1.default.createElement(Headline_1.default, { color: Color_1.Color.DarkGrey },
|
|
127
|
+
"#", bookingInformation === null || bookingInformation === void 0 ? void 0 :
|
|
128
|
+
bookingInformation.itineraryNumber),
|
|
129
|
+
react_1.default.createElement("div", { className: "row u-marg-top--heavy" },
|
|
130
|
+
react_1.default.createElement(AutoAutoHeight_1.default, { open: !!cancellationMessage },
|
|
131
|
+
react_1.default.createElement(Alert_1.default, null, cancellationMessage)), (_b = bookingInformation === null || bookingInformation === void 0 ? void 0 : bookingInformation.reservations) === null || _b === void 0 ? void 0 :
|
|
132
|
+
_b.map((obj) => {
|
|
133
|
+
if (obj.addons) {
|
|
134
|
+
const nights = Object.keys(obj.nights);
|
|
135
|
+
obj.addons.forEach((addon) => {
|
|
136
|
+
if (isFromRoomstay) {
|
|
137
|
+
addons.push(Object.assign(Object.assign({}, addon), { nights: nights.length }));
|
|
138
|
+
}
|
|
139
|
+
else {
|
|
140
|
+
addons.push(addon);
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
if (obj.comments) {
|
|
145
|
+
obj.comments.map((comment) => {
|
|
146
|
+
comments.push(comment);
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
return (react_1.default.createElement("div", { className: "col-lg-6", key: obj.reservationNumber },
|
|
150
|
+
react_1.default.createElement(ReservationRow_1.default, { reservation: obj, key: obj.reservationNumber })));
|
|
151
|
+
})),
|
|
152
|
+
react_1.default.createElement(LineBreak_1.default, null),
|
|
153
|
+
react_1.default.createElement(CommonAddonSummary_1.CommonAddonSummary, { addons: addons }),
|
|
154
|
+
comments.length >= 1 && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
155
|
+
react_1.default.createElement("div", { className: "u-marg-bottom" },
|
|
156
|
+
react_1.default.createElement(Text_1.default, { type: Text_1.TextType.Label, color: Color_1.Color.Grey }, t(Translation_1.Translation.Step.Confirmation.Comments))),
|
|
157
|
+
comments.map((comment, index) => (react_1.default.createElement(Text_1.default, { key: index, type: Text_1.TextType.Small }, comment))),
|
|
158
|
+
react_1.default.createElement(LineBreak_1.default, null))),
|
|
159
|
+
react_1.default.createElement(Text_1.default, { type: Text_1.TextType.Small, align: TextAlignment_1.TextAlign.Right }, t(Translation_1.Translation.Misc.Total)),
|
|
160
|
+
react_1.default.createElement(Headline_1.default, { bold: true, size: "large", align: TextAlignment_1.TextAlign.Right },
|
|
161
|
+
react_1.default.createElement(Currency_1.default, null, total)),
|
|
162
|
+
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))))));
|
|
160
163
|
}
|
|
161
164
|
exports.default = FindReservationResults;
|
|
162
165
|
//# sourceMappingURL=FindReservationResults.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FindReservationResults.js","sourceRoot":"/","sources":["src/pages/findReservation/FindReservationResults.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAoD;AACpD,2CAA4D;AAC5D,kDAA0B;AAC1B,+CAA4E;AAC5E,iDAA+C;AAC/C,uDAAyD;AACzD,0DAAuD;AAEvD,iFAAyD;AACzD,kEAAmC;AACnC,uEAA+C;AAC/C,iFAAyD;AACzD,6EAAqD;AACrD,6EAAqD;AACrD,+EAAuD;AACvD,0FAAkE;AAClE,kEAA2D;AAC3D,wGAAqG;AACrG,qCAA2D;AAG3D,4FAAoE;AACpE,wCAAqC;AACrC,wDAAiD;AACjD,4DAAsE;AAEtE,SAAwB,sBAAsB;;IAC1C,MAAM,MAAM,GAAQ,IAAA,4BAAS,GAAE,CAAC;IAChC,MAAM,OAAO,GAAG,IAAA,6BAAU,GAAE,CAAC;IAE7B,MAAM,EAAE,KAAK,EAAE,GAAG,IAAA,uBAAe,GAAE,CAAC;IACpC,MAAM,GAAG,GAAG,IAAA,kBAAU,EAAC,yBAAc,CAAC,CAAC;IAEvC,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,8BAAc,GAAE,CAAC;IAE/B,MAAM,CAAC,kBAAkB,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,yBAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CACvB;QACP,8BAAC,kBAAQ,IAAC,IAAI,QAAC,IAAI,EAAC,OAAO,EAAC,KAAK,EAAE,yBAAS,CAAC,KAAK;YAC9C,8BAAC,kBAAQ,QAAE,KAAK,CAAY,CACrB;QACX,8BAAC,cAAI,IAAC,IAAI,EAAE,eAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,yBAAS,CAAC,KAAK,EAAE,KAAK,EAAE,aAAK,CAAC,QAAQ,IACpE,CAAC,CAAC,yBAAW,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CACvC,CACR,CACN,CACC,CACT,CAAC;AACN,CAAC;AAxJD,yCAwJC","sourcesContent":["import { 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 { useHistory, useParams } from 'react-router-dom';\nimport { Translation } from 'translations/Translation';\n\nimport AutoAutoHeight from '@/animations/AutoAutoHeight';\nimport API from '@/api/BookingAPI';\nimport Alert from '@/components/generic/Alert';\nimport BackButton from '@/components/generic/BackButton';\nimport Currency from '@/components/generic/Currency';\nimport Headline from '@/components/generic/Headline';\nimport LineBreak from '@/components/generic/LineBreak';\nimport LargeLoader from '@/components/generic/loader/LargeLoader';\nimport Text, { TextType } from '@/components/generic/Text';\nimport { CommonAddonSummary } from '@/components/steps/common/CommonAddonSummary/CommonAddonSummary';\nimport { FindReservationResultsViewEvent } from '@/events';\nimport { IEventReservation } from '@/models/Api/IEventReservation';\nimport ReservationsDTO, { ReservationAddonDTO, ReservationDTO } from '@/models/Api/ReservationsDTO';\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 FindReservationResults() {\n const params: any = useParams();\n const history = useHistory();\n\n const { hotel } = useCurrentHotel();\n const ccx = useContext(CompanyContext);\n\n const { t } = useTranslation();\n\n const [bookingInformation, setBookingInformation] = useState<ReservationsDTO | null>(null);\n const [isLoading, setIsLoading] = useState(false);\n\n const [cancellationMessage, setCancellationMessage] = useState('');\n const [cancellationTrigger, setCancellationTrigger] = useState(0);\n\n const [data, setData] = useState<ReservationsDTO | null>(null);\n const pushHistoryOnClick = () => {\n history.push('../');\n };\n\n const isFromRoomstay = bookingInformation?.itineraryNumber?.startsWith('RS');\n\n useEffect(() => {\n let isCancelled = false;\n\n setIsLoading(true);\n if (params?.ref) {\n API.Reservation.findReservation(params.ref, params.email, hotel?.hotelID as string)\n .then((data: ReservationsDTO) => {\n if (!isCancelled) {\n setBookingInformation(data);\n setIsLoading(false);\n setData(data);\n }\n })\n .catch(() => {\n history.push('/find-reservation/');\n });\n } else {\n history.push('/find-reservation/');\n }\n\n return () => {\n isCancelled = true;\n };\n }, [cancellationTrigger]);\n\n const addons: ReservationAddonDTO[] = [];\n const comments: string[] = [];\n\n const total = useCallback(() => {\n if (bookingInformation?.reservations) {\n return calculateTotalForReservation(bookingInformation, !isFromRoomstay);\n }\n\n return 0;\n }, [bookingInformation]);\n\n const { raise } = useEvent();\n useEffect(() => {\n if (!data) return;\n\n const reservations: IEventReservation[] =\n data.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\n const event = new FindReservationResultsViewEvent(reservations);\n raise(event);\n }, [data]);\n\n return (\n <div className=\"container u-pad--heavy-plus u-pad-left u-pad-right\">\n {isLoading ? (\n <LargeLoader />\n ) : (\n <>\n <div className=\"u-marg-bottom\">\n <BackButton onClick={pushHistoryOnClick} />\n </div>\n <Headline size=\"extra-large\">{t(Translation.FindReservation.YourItinerary)}</Headline>\n <Headline color={Color.DarkGrey}>#{bookingInformation?.itineraryNumber}</Headline>\n <div className=\"row u-marg-top--heavy\">\n <AutoAutoHeight open={!!cancellationMessage}>\n <Alert>{cancellationMessage}</Alert>\n </AutoAutoHeight>\n {bookingInformation?.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 (\n <div className=\"col-lg-6\" key={obj.reservationNumber}>\n <ReservationRow reservation={obj} key={obj.reservationNumber} />\n </div>\n );\n })}\n </div>\n <LineBreak />\n <CommonAddonSummary addons={addons} />\n {comments.length >= 1 && (\n <>\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: number) => (\n <Text key={index} type={TextType.Small}>\n {comment}\n </Text>\n ))}\n <LineBreak />\n </>\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 </>\n )}\n </div>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"FindReservationResults.js","sourceRoot":"/","sources":["src/pages/findReservation/FindReservationResults.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAoD;AACpD,2CAA4D;AAC5D,kDAA0B;AAC1B,+CAA4E;AAC5E,iDAA+C;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CAAC,CACA;YACN,8BAAC,mBAAS,OAAG;YACb,8BAAC,uCAAkB,IAAC,MAAM,EAAE,MAAM,GAAI;YACrC,QAAQ,CAAC,MAAM,IAAI,CAAC,IAAI,CACrB;gBACI,uCAAK,SAAS,EAAC,eAAe;oBAC1B,8BAAC,cAAI,IAAC,IAAI,EAAE,eAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,aAAK,CAAC,IAAI,IACxC,CAAC,CAAC,yBAAW,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CACvC,CACL;gBACL,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,KAAa,EAAE,EAAE,CAAC,CACtC,8BAAC,cAAI,IAAC,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,eAAQ,CAAC,KAAK,IACjC,OAAO,CACL,CACV,CAAC;gBACF,8BAAC,mBAAS,OAAG,CACd,CACN;YACD,8BAAC,cAAI,IAAC,IAAI,EAAE,eAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,yBAAS,CAAC,KAAK,IAC7C,CAAC,CAAC,yBAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CACvB;YACP,8BAAC,kBAAQ,IAAC,IAAI,QAAC,IAAI,EAAC,OAAO,EAAC,KAAK,EAAE,yBAAS,CAAC,KAAK;gBAC9C,8BAAC,kBAAQ,QAAE,KAAK,CAAY,CACrB;YACX,8BAAC,cAAI,IAAC,IAAI,EAAE,eAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,yBAAS,CAAC,KAAK,EAAE,KAAK,EAAE,aAAK,CAAC,QAAQ,IACpE,CAAC,CAAC,yBAAW,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CACvC,CACR,CACN,CACC,CACT,CAAC;AACN,CAAC;AAzJD,yCAyJC","sourcesContent":["import { 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 { useHistory, useParams } from 'react-router-dom';\nimport { Translation } from 'translations/Translation';\n\nimport AutoAutoHeight from '@/animations/AutoAutoHeight';\nimport API from '@/api/BookingAPI';\nimport Alert from '@/components/generic/Alert';\nimport BackButton from '@/components/generic/BackButton';\nimport Currency from '@/components/generic/Currency';\nimport Headline from '@/components/generic/Headline';\nimport LineBreak from '@/components/generic/LineBreak';\nimport LargeLoader from '@/components/generic/loader/LargeLoader';\nimport { PageTitle } from '@/components/generic/PageTitle';\nimport Text, { TextType } from '@/components/generic/Text';\nimport { CommonAddonSummary } from '@/components/steps/common/CommonAddonSummary/CommonAddonSummary';\nimport { FindReservationResultsViewEvent } from '@/events';\nimport { IEventReservation } from '@/models/Api/IEventReservation';\nimport ReservationsDTO, { ReservationAddonDTO, ReservationDTO } from '@/models/Api/ReservationsDTO';\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 FindReservationResults() {\n const params: any = useParams();\n const history = useHistory();\n\n const { hotel } = useCurrentHotel();\n const ccx = useContext(CompanyContext);\n\n const { t } = useTranslation();\n\n const [bookingInformation, setBookingInformation] = useState<ReservationsDTO | null>(null);\n const [isLoading, setIsLoading] = useState(false);\n\n const [cancellationMessage, setCancellationMessage] = useState('');\n const [cancellationTrigger, setCancellationTrigger] = useState(0);\n\n const [data, setData] = useState<ReservationsDTO | null>(null);\n const pushHistoryOnClick = () => {\n history.push('../');\n };\n\n const isFromRoomstay = bookingInformation?.itineraryNumber?.startsWith('RS');\n\n useEffect(() => {\n let isCancelled = false;\n\n setIsLoading(true);\n if (params?.ref) {\n API.Reservation.findReservation(params.ref, params.email, hotel?.hotelID as string)\n .then((data: ReservationsDTO) => {\n if (!isCancelled) {\n setBookingInformation(data);\n setIsLoading(false);\n setData(data);\n }\n })\n .catch(() => {\n history.push('/find-reservation/');\n });\n } else {\n history.push('/find-reservation/');\n }\n\n return () => {\n isCancelled = true;\n };\n }, [cancellationTrigger]);\n\n const addons: ReservationAddonDTO[] = [];\n const comments: string[] = [];\n\n const total = useCallback(() => {\n if (bookingInformation?.reservations) {\n return calculateTotalForReservation(bookingInformation, !isFromRoomstay);\n }\n\n return 0;\n }, [bookingInformation]);\n\n const { raise } = useEvent();\n useEffect(() => {\n if (!data) return;\n\n const reservations: IEventReservation[] =\n data.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\n const event = new FindReservationResultsViewEvent(reservations);\n raise(event);\n }, [data]);\n\n return (\n <div className=\"container u-pad--heavy-plus u-pad-left u-pad-right\">\n <PageTitle step=\"FindReservation\" />\n {isLoading ? (\n <LargeLoader />\n ) : (\n <>\n <div className=\"u-marg-bottom\">\n <BackButton onClick={pushHistoryOnClick} />\n </div>\n <Headline size=\"extra-large\">{t(Translation.FindReservation.YourItinerary)}</Headline>\n <Headline color={Color.DarkGrey}>#{bookingInformation?.itineraryNumber}</Headline>\n <div className=\"row u-marg-top--heavy\">\n <AutoAutoHeight open={!!cancellationMessage}>\n <Alert>{cancellationMessage}</Alert>\n </AutoAutoHeight>\n {bookingInformation?.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 (\n <div className=\"col-lg-6\" key={obj.reservationNumber}>\n <ReservationRow reservation={obj} key={obj.reservationNumber} />\n </div>\n );\n })}\n </div>\n <LineBreak />\n <CommonAddonSummary addons={addons} />\n {comments.length >= 1 && (\n <>\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: number) => (\n <Text key={index} type={TextType.Small}>\n {comment}\n </Text>\n ))}\n <LineBreak />\n </>\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 </>\n )}\n </div>\n );\n}\n"]}
|
|
@@ -37,6 +37,7 @@ const BEButton_1 = __importDefault(require("../../components/generic/BEButton"))
|
|
|
37
37
|
const Headline_1 = __importDefault(require("../../components/generic/Headline"));
|
|
38
38
|
const Icon_1 = __importStar(require("../../components/generic/Icon/Icon"));
|
|
39
39
|
const HotelLocationMap_1 = __importDefault(require("../../components/generic/map/HotelLocationMap"));
|
|
40
|
+
const PageTitle_1 = require("../../components/generic/PageTitle");
|
|
40
41
|
const Text_1 = __importStar(require("../../components/generic/Text"));
|
|
41
42
|
const TransportDistanceFromHotelBlock_1 = __importDefault(require("../../components/summary/TransportDistanceFromHotelBlock"));
|
|
42
43
|
const ImageProvider_1 = __importStar(require("../../providers/ImageProvider"));
|
|
@@ -88,6 +89,7 @@ function HotelInfo() {
|
|
|
88
89
|
return (react_1.default.createElement("div", { style: { backgroundImage: `url('${resizedUrl}')`, paddingTop: '75%' }, className: "c-images u-block u-w-100 u-marg-bottom u-marg-bottom--heavy", onClick: openSliderOnClickHandler }));
|
|
89
90
|
};
|
|
90
91
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
92
|
+
react_1.default.createElement(PageTitle_1.PageTitle, { step: "HotelInfo" }),
|
|
91
93
|
react_1.default.createElement("div", { style: { backgroundImage: `url('${imageUrl && ImageProvider_1.default.resizeImage(imageUrl, ImageProvider_1.ImageSize.Original)}')` }, className: "c-masthead has-tint" },
|
|
92
94
|
react_1.default.createElement("div", { className: "container" },
|
|
93
95
|
react_1.default.createElement("div", { className: "c-masthead__body u-fill-white u-pad--heavy u-shadow-accent" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HotelInfo.js","sourceRoot":"/","sources":["src/pages/hotel/HotelInfo.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA0D;AAC1D,2CAA4D;AAC5D,wEAA0C;AAC1C,uEAAuE;AACvE,+CAAmD;AACnD,iDAA+C;AAC/C,0DAAuD;AAEvD,6EAAqD;AACrD,6EAAqD;AACrD,uEAAgE;AAChE,iGAAyE;AACzE,kEAA2D;AAC3D,2HAAmG;AACnG,2EAAqE;AACrE,wCAAqC;AACrC,qEAA6C;AAE7C,SAAwB,SAAS;;IAC7B,MAAM,EAAE,KAAK,EAAE,GAAG,IAAA,uBAAe,GAAE,CAAC;IACpC,MAAM,qBAAqB,GAAG,IAAA,gDAAwB,GAAE,CAAC;IACzD,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,8BAAc,GAAE,CAAC;IAE/B,MAAM,QAAQ,GAAG,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,SAAS,CAAC;IAElC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,OAAO,mCAAI,EAAE,CAAC;IAEnE,MAAM,CAAC,kBAAkB,EAAE,qBAAqB,CAAC,GAAG,IAAA,gBAAQ,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;IAC3F,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC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4CAAS,MAAM,CAAC,MAAM,GAAG,CAAC,CAAQ,CAChC,CACJ,CACT,CACC,CACJ,CACJ,CACJ,CACJ,CACJ;QACL,CAAC,CAAC,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,MAAM,CAAA,IAAI,CACjB,8BAAC,0BAAU,IACP,OAAO,EAAE,kBAAkB,CAAC,OAAO,EACnC,KAAK,EAAE,kBAAkB,CAAC,KAAK,EAC/B,OAAO,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,uBAAa,CAAC,WAAW,CAAC,KAAK,EAAE,yBAAS,CAAC,QAAQ,CAAC,CAAC,EACpF,IAAI,EAAC,OAAO,GACd,CACL,CACF,CACN,CAAC;AACN,CAAC;AArQD,4BAqQC","sourcesContent":["import { StepHotelInfoViewEvent } from '@frontend/events';\nimport { useCurrentHotel, useEvent } from '@frontend/hooks';\nimport FsLightbox from 'fslightbox-react';\nimport { useHistoryConsistentPush } from 'hooks/HistoryConsistentPush';\nimport React, { useEffect, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { Translation } from 'translations/Translation';\n\nimport BEButton from '@/components/generic/BEButton';\nimport Headline from '@/components/generic/Headline';\nimport Icon, { IconType } from '@/components/generic/Icon/Icon';\nimport HotelLocationMap from '@/components/generic/map/HotelLocationMap';\nimport Text, { TextType } from '@/components/generic/Text';\nimport TransportDistanceFromHotelBlock from '@/components/summary/TransportDistanceFromHotelBlock';\nimport ImageProvider, { ImageSize } from '@/providers/ImageProvider';\nimport { Color } from '@/util/Color';\nimport StepManager from '@/util/StepManager';\n\nexport default function HotelInfo() {\n const { hotel } = useCurrentHotel();\n const historyConsistentPush = useHistoryConsistentPush();\n const { t } = useTranslation();\n\n const imageUrl = hotel?.heroImage;\n\n const { line1, line2, postalCode, country } = hotel?.address ?? {};\n\n const [lightboxController, setLightboxController] = useState({ toggler: false, slide: 1 });\n const [images, setImages] = useState<string[]>([]);\n\n const openSlider = (slide: number) => {\n setLightboxController((controller) => ({ toggler: !controller.toggler, slide: slide + 1 }));\n };\n const openSliderOnClick = () => {\n openSlider(4);\n };\n\n const { raise } = useEvent();\n\n useEffect(() => {\n const event = new StepHotelInfoViewEvent();\n raise(event);\n }, []);\n\n useEffect(() => {\n const newImages: string[] = [];\n\n if (hotel?.images?.length) {\n newImages.push(...hotel.images);\n }\n\n if (hotel?.rooms) {\n for (const room of Object.values(hotel?.rooms)) {\n room.images?.forEach((image) => {\n newImages.push(image);\n });\n }\n }\n\n setImages(newImages);\n }, [hotel?.images, hotel?.rooms]);\n\n const onBookNowClick = () => {\n historyConsistentPush(StepManager.getFirstStep().getStepUrl());\n };\n\n const getImage = (index: number) => {\n const openSliderOnClickHandler = () => {\n openSlider(index);\n };\n\n const resizedUrl = ImageProvider.resizeImage(images[index], ImageSize.Small);\n\n return (\n <div\n style={{ backgroundImage: `url('${resizedUrl}')`, paddingTop: '75%' }}\n className=\"c-images u-block u-w-100 u-marg-bottom u-marg-bottom--heavy\"\n onClick={openSliderOnClickHandler}\n />\n );\n };\n\n return (\n <>\n <div style={{ backgroundImage: `url('${imageUrl && ImageProvider.resizeImage(imageUrl, ImageSize.Original)}')` }} className=\"c-masthead has-tint\">\n <div className=\"container\">\n <div className=\"c-masthead__body u-fill-white u-pad--heavy u-shadow-accent\">\n <h1 className=\"c-masthead__header\">{hotel?.name}</h1>\n <h2 className=\"c-masthead__sub-header\">{hotel?.address?.country}</h2>\n </div>\n </div>\n </div>\n <div className=\"u-fill-snow u-pad--heavy-med u-pad-top-bottom--heavy@m-\">\n <div className=\"container\">\n <div className=\"row\">\n <div className=\"col-md-6 u-flex align-items-center\">\n <ul>\n <li className=\"u-flex u-marg-bottom--heavy\">\n <Icon icon={IconType.Map} size=\"1.3em\" color={Color.Accent} />\n <span className=\"u-flex__item u-marg-left\">\n {line1}\n <br />\n {line2} {postalCode}, {country}\n </span>\n </li>\n <li className=\"u-flex u-marg-bottom--heavy\">\n <Icon icon={IconType.Phone} size=\"1.3em\" color={Color.Accent} />\n <span className=\"u-flex__item u-marg-left\">{hotel?.phone}</span>\n </li>\n <li className=\"u-flex u-marg-bottom--heavy\">\n <Icon icon={IconType.Hotel2} size=\"1.3em\" color={Color.Accent} />\n <span className=\"u-flex__item u-marg-left\">\n <a href={hotel?.hotelUrl} style={{ color: 'var(--rs-color-accent-1)' }}>\n {hotel?.name}\n </a>\n </span>\n </li>\n <li className=\"u-flex\">\n <BEButton icon={IconType.ArrowRight} primary filled iconPosition=\"right\" onClick={onBookNowClick}>\n {t(Translation.Misc.BookNow)}\n </BEButton>\n </li>\n </ul>\n </div>\n <div className=\"col-md-6\">\n <div className=\"c-overlap\">\n <div className=\"u-marg-bottom u-marg-bottom--heavy u-marg-top u-marg-top--heavy\" style={{ height: '240px' }}>\n <HotelLocationMap />\n </div>\n <div className=\"u-flex u-flex-column justify-content-center\">\n <TransportDistanceFromHotelBlock hotel={hotel} />\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div className=\"u-pad u-pad--heavy-plus u-pad-top-bottom--heavy@m-\">\n <div className=\"container rs-hotelinfo\">\n <div className=\"row\">\n <div className=\"col-lg-6\">\n <div className=\"u-marg-bottom u-marg-bottom--heavy\">\n <div className=\"u-marg-bottom u-marg-bottom--heavy\">\n <Headline className=\"rs-hotelinfo-about\" bold>\n {t(Translation.Step.Hotel.About)}\n </Headline>\n </div>\n <div className=\"u-marg-bottom u-marg-bottom--heavy\">\n <Text type={TextType.Small}>\n <span dangerouslySetInnerHTML={{ __html: hotel?.description?.replace('\\r\\n', '<br/><br/>') || '' }} />\n </Text>\n {!!hotel?.locationDescription && (\n <>\n <div className=\"u-marg-top\">\n <Text type={TextType.Small}>\n <strong>{t(Translation.Step.Hotel.Location)}</strong>\n </Text>\n </div>\n <Text type={TextType.Small}>\n <span dangerouslySetInnerHTML={{ __html: hotel?.locationDescription?.replace('\\r\\n', '<br/><br/>') }} />\n </Text>\n </>\n )}\n </div>\n {!!hotel?.perks?.length && (\n <>\n <div className=\"u-marg-bottom u-marg-bottom--heavy\">\n <Text type={TextType.Small}>\n <strong className=\"rs-hotelinfo-andyougetall\">{t(Translation.Step.Hotel.AndYouGetAll)}</strong>\n </Text>\n </div>\n <div className=\"row\">\n {hotel?.perks.map((perk) => {\n return (\n <div className=\"col-6 col-md-4\" key={perk.name}>\n <div className=\"u-flex u-marg-bottom\">\n <div className=\"room-perk-icon\">{perk.iconElement ? perk.iconElement : <Icon icon={perk.icon as IconType} />}</div>\n <span className=\"u-flex__item\">\n <Text type={TextType.Small}>\n <span\n dangerouslySetInnerHTML={{\n __html: perk.name,\n }}\n />\n </Text>\n </span>\n </div>\n </div>\n );\n })}\n </div>\n {hotel?.perksShowDisclaimer && (\n <div className=\"row u-marg-top--lighter\">\n <small className=\"col-12\">{t(Translation.Misc.PerksDisclaimer)}</small>\n </div>\n )}\n </>\n )}\n </div>\n {!!hotel?.hotelServices?.length && (\n <div className=\"u-marg-bottom u-marg-bottom--heavy\">\n <div className=\"u-marg-bottom--heavy\">\n <Headline className=\"rs-hotelinfo-hotelamenities\" bold>\n {t(Translation.Step.Hotel.HotelAmenities)}\n </Headline>\n </div>\n <div className=\"row\">\n {hotel?.hotelServices.map((hotelService, index) => {\n return (\n <div key={index} className=\"col-md-6\">\n <div className=\"u-flex u-marg-bottom\">\n <Icon icon={IconType.Check} color={Color.White} backgroundColor={Color.Accent} borderRadius=\"round\" noPadding size=\"16px\" />\n <span className=\"u-flex__item u-marg-left--light\">\n <Text type={TextType.Small}>{hotelService.name}</Text>\n </span>\n </div>\n </div>\n );\n })}\n </div>\n </div>\n )}\n {!!hotel?.policies && (\n <div className=\"u-marg-bottom u-marg-bottom--heavy\">\n <div className=\"u-marg-bottom--heavy\">\n <Headline className=\"rs-hotelinfo-policies\" bold>\n {t(Translation.Step.Hotel.Policies)}\n </Headline>\n </div>\n <Text type={TextType.Small}>\n <a href={hotel?.policies} target=\"_blank\" style={{ color: hotel?.colors.accent }} rel=\"noreferrer\">\n {hotel?.policies}\n </a>\n </Text>\n </div>\n )}\n </div>\n <div className=\"col-lg-6\">\n <div className=\"u-marg-bottom u-marg-bottom--heavy\">\n <div className=\"u-marg-bottom u-marg-bottom--heavy\">\n <Headline className=\"rs-hotelinfo-gallery\" bold>\n {t(Translation.Step.Hotel.Gallery)}\n </Headline>\n </div>\n {images.length >= 1 && getImage(0)}\n <div className=\"row\">\n {[1, 2, 3].map((index) => {\n if (images.length > index) {\n return (\n <div key={index} className=\"col-6\">\n {getImage(index)}\n </div>\n );\n }\n })}\n {images.length > 5 && (\n <div className=\"col-6\">\n <div className=\"c-images c-images--more\" onClick={openSliderOnClick}>\n {getImage(4)}\n <span>+ {images.length - 5}</span>\n </div>\n </div>\n )}\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n {!!images?.length && (\n <FsLightbox\n toggler={lightboxController.toggler}\n slide={lightboxController.slide}\n sources={images.map((image) => ImageProvider.resizeImage(image, ImageSize.Original))}\n type=\"image\"\n />\n )}\n </>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"HotelInfo.js","sourceRoot":"/","sources":["src/pages/hotel/HotelInfo.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA0D;AAC1D,2CAA4D;AAC5D,wEAA0C;AAC1C,uEAAuE;AACvE,+CAAmD;AACnD,iDAA+C;AAC/C,0DAAuD;AAEvD,6EAAqD;AACrD,6EAAqD;AACrD,uEAAgE;AAChE,iGAAyE;AACzE,8DAA2D;AAC3D,kEAA2D;AAC3D,2HAAmG;AACnG,2EAAqE;AACrE,wCAAqC;AACrC,qEAA6C;AAE7C,SAAwB,SAAS;;IAC7B,MAAM,EAAE,KAAK,EAAE,GAAG,IAAA,uBAAe,GAAE,CAAC;IACpC,MAAM,qBAAqB,GAAG,IAAA,gDAAwB,GAAE,CAAC;IACzD,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,8BAAc,GAAE,CAAC;IAE/B,MAAM,QAAQ,GAAG,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AAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;oCACrB,IAAI,MAAM,CAAC,MAAM,GAAG,KAAK,EAAE;wCACvB,OAAO,CACH,uCAAK,GAAG,EAAE,KAAK,EAAE,SAAS,EAAC,OAAO,IAC7B,QAAQ,CAAC,KAAK,CAAC,CACd,CACT,CAAC;qCACL;gCACL,CAAC,CAAC;gCACD,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,CAClB,uCAAK,SAAS,EAAC,OAAO;oCAClB,uCAAK,SAAS,EAAC,yBAAyB,EAAC,OAAO,EAAE,iBAAiB;wCAC9D,QAAQ,CAAC,CAAC,CAAC;wCACZ;;4CAAS,MAAM,CAAC,MAAM,GAAG,CAAC,CAAQ,CAChC,CACJ,CACT,CACC,CACJ,CACJ,CACJ,CACJ,CACJ;QACL,CAAC,CAAC,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,MAAM,CAAA,IAAI,CACjB,8BAAC,0BAAU,IACP,OAAO,EAAE,kBAAkB,CAAC,OAAO,EACnC,KAAK,EAAE,kBAAkB,CAAC,KAAK,EAC/B,OAAO,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,uBAAa,CAAC,WAAW,CAAC,KAAK,EAAE,yBAAS,CAAC,QAAQ,CAAC,CAAC,EACpF,IAAI,EAAC,OAAO,GACd,CACL,CACF,CACN,CAAC;AACN,CAAC;AAtQD,4BAsQC","sourcesContent":["import { StepHotelInfoViewEvent } from '@frontend/events';\nimport { useCurrentHotel, useEvent } from '@frontend/hooks';\nimport FsLightbox from 'fslightbox-react';\nimport { useHistoryConsistentPush } from 'hooks/HistoryConsistentPush';\nimport React, { useEffect, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { Translation } from 'translations/Translation';\n\nimport BEButton from '@/components/generic/BEButton';\nimport Headline from '@/components/generic/Headline';\nimport Icon, { IconType } from '@/components/generic/Icon/Icon';\nimport HotelLocationMap from '@/components/generic/map/HotelLocationMap';\nimport { PageTitle } from '@/components/generic/PageTitle';\nimport Text, { TextType } from '@/components/generic/Text';\nimport TransportDistanceFromHotelBlock from '@/components/summary/TransportDistanceFromHotelBlock';\nimport ImageProvider, { ImageSize } from '@/providers/ImageProvider';\nimport { Color } from '@/util/Color';\nimport StepManager from '@/util/StepManager';\n\nexport default function HotelInfo() {\n const { hotel } = useCurrentHotel();\n const historyConsistentPush = useHistoryConsistentPush();\n const { t } = useTranslation();\n\n const imageUrl = hotel?.heroImage;\n\n const { line1, line2, postalCode, country } = hotel?.address ?? {};\n\n const [lightboxController, setLightboxController] = useState({ toggler: false, slide: 1 });\n const [images, setImages] = useState<string[]>([]);\n\n const openSlider = (slide: number) => {\n setLightboxController((controller) => ({ toggler: !controller.toggler, slide: slide + 1 }));\n };\n const openSliderOnClick = () => {\n openSlider(4);\n };\n\n const { raise } = useEvent();\n\n useEffect(() => {\n const event = new StepHotelInfoViewEvent();\n raise(event);\n }, []);\n\n useEffect(() => {\n const newImages: string[] = [];\n\n if (hotel?.images?.length) {\n newImages.push(...hotel.images);\n }\n\n if (hotel?.rooms) {\n for (const room of Object.values(hotel?.rooms)) {\n room.images?.forEach((image) => {\n newImages.push(image);\n });\n }\n }\n\n setImages(newImages);\n }, [hotel?.images, hotel?.rooms]);\n\n const onBookNowClick = () => {\n historyConsistentPush(StepManager.getFirstStep().getStepUrl());\n };\n\n const getImage = (index: number) => {\n const openSliderOnClickHandler = () => {\n openSlider(index);\n };\n\n const resizedUrl = ImageProvider.resizeImage(images[index], ImageSize.Small);\n\n return (\n <div\n style={{ backgroundImage: `url('${resizedUrl}')`, paddingTop: '75%' }}\n className=\"c-images u-block u-w-100 u-marg-bottom u-marg-bottom--heavy\"\n onClick={openSliderOnClickHandler}\n />\n );\n };\n\n return (\n <>\n <PageTitle step=\"HotelInfo\" />\n <div style={{ backgroundImage: `url('${imageUrl && ImageProvider.resizeImage(imageUrl, ImageSize.Original)}')` }} className=\"c-masthead has-tint\">\n <div className=\"container\">\n <div className=\"c-masthead__body u-fill-white u-pad--heavy u-shadow-accent\">\n <h1 className=\"c-masthead__header\">{hotel?.name}</h1>\n <h2 className=\"c-masthead__sub-header\">{hotel?.address?.country}</h2>\n </div>\n </div>\n </div>\n <div className=\"u-fill-snow u-pad--heavy-med u-pad-top-bottom--heavy@m-\">\n <div className=\"container\">\n <div className=\"row\">\n <div className=\"col-md-6 u-flex align-items-center\">\n <ul>\n <li className=\"u-flex u-marg-bottom--heavy\">\n <Icon icon={IconType.Map} size=\"1.3em\" color={Color.Accent} />\n <span className=\"u-flex__item u-marg-left\">\n {line1}\n <br />\n {line2} {postalCode}, {country}\n </span>\n </li>\n <li className=\"u-flex u-marg-bottom--heavy\">\n <Icon icon={IconType.Phone} size=\"1.3em\" color={Color.Accent} />\n <span className=\"u-flex__item u-marg-left\">{hotel?.phone}</span>\n </li>\n <li className=\"u-flex u-marg-bottom--heavy\">\n <Icon icon={IconType.Hotel2} size=\"1.3em\" color={Color.Accent} />\n <span className=\"u-flex__item u-marg-left\">\n <a href={hotel?.hotelUrl} style={{ color: 'var(--rs-color-accent-1)' }}>\n {hotel?.name}\n </a>\n </span>\n </li>\n <li className=\"u-flex\">\n <BEButton icon={IconType.ArrowRight} primary filled iconPosition=\"right\" onClick={onBookNowClick}>\n {t(Translation.Misc.BookNow)}\n </BEButton>\n </li>\n </ul>\n </div>\n <div className=\"col-md-6\">\n <div className=\"c-overlap\">\n <div className=\"u-marg-bottom u-marg-bottom--heavy u-marg-top u-marg-top--heavy\" style={{ height: '240px' }}>\n <HotelLocationMap />\n </div>\n <div className=\"u-flex u-flex-column justify-content-center\">\n <TransportDistanceFromHotelBlock hotel={hotel} />\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div className=\"u-pad u-pad--heavy-plus u-pad-top-bottom--heavy@m-\">\n <div className=\"container rs-hotelinfo\">\n <div className=\"row\">\n <div className=\"col-lg-6\">\n <div className=\"u-marg-bottom u-marg-bottom--heavy\">\n <div className=\"u-marg-bottom u-marg-bottom--heavy\">\n <Headline className=\"rs-hotelinfo-about\" bold>\n {t(Translation.Step.Hotel.About)}\n </Headline>\n </div>\n <div className=\"u-marg-bottom u-marg-bottom--heavy\">\n <Text type={TextType.Small}>\n <span dangerouslySetInnerHTML={{ __html: hotel?.description?.replace('\\r\\n', '<br/><br/>') || '' }} />\n </Text>\n {!!hotel?.locationDescription && (\n <>\n <div className=\"u-marg-top\">\n <Text type={TextType.Small}>\n <strong>{t(Translation.Step.Hotel.Location)}</strong>\n </Text>\n </div>\n <Text type={TextType.Small}>\n <span dangerouslySetInnerHTML={{ __html: hotel?.locationDescription?.replace('\\r\\n', '<br/><br/>') }} />\n </Text>\n </>\n )}\n </div>\n {!!hotel?.perks?.length && (\n <>\n <div className=\"u-marg-bottom u-marg-bottom--heavy\">\n <Text type={TextType.Small}>\n <strong className=\"rs-hotelinfo-andyougetall\">{t(Translation.Step.Hotel.AndYouGetAll)}</strong>\n </Text>\n </div>\n <div className=\"row\">\n {hotel?.perks.map((perk) => {\n return (\n <div className=\"col-6 col-md-4\" key={perk.name}>\n <div className=\"u-flex u-marg-bottom\">\n <div className=\"room-perk-icon\">{perk.iconElement ? perk.iconElement : <Icon icon={perk.icon as IconType} />}</div>\n <span className=\"u-flex__item\">\n <Text type={TextType.Small}>\n <span\n dangerouslySetInnerHTML={{\n __html: perk.name,\n }}\n />\n </Text>\n </span>\n </div>\n </div>\n );\n })}\n </div>\n {hotel?.perksShowDisclaimer && (\n <div className=\"row u-marg-top--lighter\">\n <small className=\"col-12\">{t(Translation.Misc.PerksDisclaimer)}</small>\n </div>\n )}\n </>\n )}\n </div>\n {!!hotel?.hotelServices?.length && (\n <div className=\"u-marg-bottom u-marg-bottom--heavy\">\n <div className=\"u-marg-bottom--heavy\">\n <Headline className=\"rs-hotelinfo-hotelamenities\" bold>\n {t(Translation.Step.Hotel.HotelAmenities)}\n </Headline>\n </div>\n <div className=\"row\">\n {hotel?.hotelServices.map((hotelService, index) => {\n return (\n <div key={index} className=\"col-md-6\">\n <div className=\"u-flex u-marg-bottom\">\n <Icon icon={IconType.Check} color={Color.White} backgroundColor={Color.Accent} borderRadius=\"round\" noPadding size=\"16px\" />\n <span className=\"u-flex__item u-marg-left--light\">\n <Text type={TextType.Small}>{hotelService.name}</Text>\n </span>\n </div>\n </div>\n );\n })}\n </div>\n </div>\n )}\n {!!hotel?.policies && (\n <div className=\"u-marg-bottom u-marg-bottom--heavy\">\n <div className=\"u-marg-bottom--heavy\">\n <Headline className=\"rs-hotelinfo-policies\" bold>\n {t(Translation.Step.Hotel.Policies)}\n </Headline>\n </div>\n <Text type={TextType.Small}>\n <a href={hotel?.policies} target=\"_blank\" style={{ color: hotel?.colors.accent }} rel=\"noreferrer\">\n {hotel?.policies}\n </a>\n </Text>\n </div>\n )}\n </div>\n <div className=\"col-lg-6\">\n <div className=\"u-marg-bottom u-marg-bottom--heavy\">\n <div className=\"u-marg-bottom u-marg-bottom--heavy\">\n <Headline className=\"rs-hotelinfo-gallery\" bold>\n {t(Translation.Step.Hotel.Gallery)}\n </Headline>\n </div>\n {images.length >= 1 && getImage(0)}\n <div className=\"row\">\n {[1, 2, 3].map((index) => {\n if (images.length > index) {\n return (\n <div key={index} className=\"col-6\">\n {getImage(index)}\n </div>\n );\n }\n })}\n {images.length > 5 && (\n <div className=\"col-6\">\n <div className=\"c-images c-images--more\" onClick={openSliderOnClick}>\n {getImage(4)}\n <span>+ {images.length - 5}</span>\n </div>\n </div>\n )}\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n {!!images?.length && (\n <FsLightbox\n toggler={lightboxController.toggler}\n slide={lightboxController.slide}\n sources={images.map((image) => ImageProvider.resizeImage(image, ImageSize.Original))}\n type=\"image\"\n />\n )}\n </>\n );\n}\n"]}
|
|
@@ -36,6 +36,7 @@ const BackButton_1 = __importDefault(require("../../../components/generic/BackBu
|
|
|
36
36
|
const Headline_1 = __importDefault(require("../../../components/generic/Headline"));
|
|
37
37
|
const StepLayout_1 = require("../../../components/generic/Layout/StepLayout");
|
|
38
38
|
const LineBreak_1 = __importDefault(require("../../../components/generic/LineBreak"));
|
|
39
|
+
const PageTitle_1 = require("../../../components/generic/PageTitle");
|
|
39
40
|
const AddonList_1 = __importDefault(require("../../../components/steps/addons/AddonList"));
|
|
40
41
|
const StepRoomHotelDetails_1 = __importDefault(require("../../../components/steps/room/StepRoomHotelDetails"));
|
|
41
42
|
const BEMobileSummary_1 = __importDefault(require("../../../components/summary/BEMobileSummary"));
|
|
@@ -53,6 +54,7 @@ function StepAddonComponent() {
|
|
|
53
54
|
raise(event);
|
|
54
55
|
}, []);
|
|
55
56
|
return (react_1.default.createElement("div", { className: "container" },
|
|
57
|
+
react_1.default.createElement(PageTitle_1.PageTitle, { step: "Addon" }),
|
|
56
58
|
react_1.default.createElement(BEMobileSummary_1.default, null),
|
|
57
59
|
react_1.default.createElement(StepLayout_1.StepLayoutContainer, null,
|
|
58
60
|
react_1.default.createElement(StepLayout_1.StepLayoutLeftContent, null, context.screenSize > ScreenSize_1.default.Medium && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StepAddonComponent.js","sourceRoot":"/","sources":["src/pages/steps/StepAddon/StepAddonComponent.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAgG;AAChG,6CAAsD;AACtD,+CAAqD;AACrD,iDAA+C;AAC/C,uDAAwC;AACxC,0DAAuD;AAEvD,iFAAyD;AACzD,6EAAqD;AACrD,uEAA4H;AAC5H,+EAAuD;AACvD,oFAA4D;AAC5D,wGAAgF;AAChF,2FAAmE;AACnE,iDAA6C;AAC7C,mEAA2C;AAC3C,qEAA6C;AAE7C,SAAwB,kBAAkB;IACtC,MAAM,OAAO,GAAG,IAAA,kBAAU,EAAC,+BAAoB,CAAC,CAAC;IACjD,MAAM,EAAE,WAAW,EAAE,GAAG,IAAA,kBAAU,EAAC,gCA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U,CAAC,KAAK,CAAC,KAAK,CAAC,CAAY,CAC/D,CACP,CACN,CACmB;YACvB,OAAO,CAAC,UAAU,GAAG,oBAAU,CAAC,MAAM,IAAI,CACvC,8BAAC,mCAAsB;gBACnB,8BAAC,8BAAoB,OAAG,CACH,CAC5B,CACiB;QACrB,OAAO,CAAC,UAAU,GAAG,oBAAU,CAAC,MAAM,IAAI,8BAAC,mBAAS,OAAG;QACxD,8BAAC,mBAAS,OAAG,CACX,CACT,CAAC;AACN,CAAC;AAzCD,qCAyCC","sourcesContent":["import { BasketContext, BookingEngineContext, FullPageEngineContext } from '@frontend/contexts';\nimport { StepAddonViewEvent } from '@frontend/events';\nimport React, { useContext, useEffect } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { Link } from 'react-router-dom';\nimport { Translation } from 'translations/Translation';\n\nimport BackButton from '@/components/generic/BackButton';\nimport Headline from '@/components/generic/Headline';\nimport { StepLayoutContainer, StepLayoutLeftContent, StepLayoutRightContent } from '@/components/generic/Layout/StepLayout';\nimport LineBreak from '@/components/generic/LineBreak';\nimport { PageTitle } from '@/components/generic/PageTitle';\nimport AddonList from '@/components/steps/addons/AddonList';\nimport StepRoomHotelDetails from '@/components/steps/room/StepRoomHotelDetails';\nimport BEMobileSummary from '@/components/summary/BEMobileSummary';\nimport { useEvent } from '@/hooks/EventHook';\nimport ScreenSize from '@/util/ScreenSize';\nimport StepManager from '@/util/StepManager';\n\nexport default function StepAddonComponent() {\n const context = useContext(BookingEngineContext);\n const { currentStep } = useContext(FullPageEngineContext);\n const { currentBasketRows } = useContext(BasketContext);\n\n const { t } = useTranslation();\n\n const { raise } = useEvent();\n\n useEffect(() => {\n const event = new StepAddonViewEvent(currentBasketRows);\n raise(event);\n }, []);\n\n return (\n <div className=\"container\">\n <PageTitle step=\"Addon\" />\n <BEMobileSummary />\n <StepLayoutContainer>\n <StepLayoutLeftContent>\n {context.screenSize > ScreenSize.Medium && (\n <>\n <Link to={StepManager.getPreviousStepUrl(currentStep)}>\n <BackButton />\n </Link>\n <div className=\"u-marg-top--light u-marg-bottom--heavy\">\n <Headline bold>{t(Translation.Navigation.Steps.Addon)}</Headline>\n </div>\n </>\n )}\n </StepLayoutLeftContent>\n {context.screenSize > ScreenSize.Medium && (\n <StepLayoutRightContent>\n <StepRoomHotelDetails />\n </StepLayoutRightContent>\n )}\n </StepLayoutContainer>\n {context.screenSize > ScreenSize.Medium && <LineBreak />}\n <AddonList />\n </div>\n );\n}\n"]}
|
|
@@ -37,6 +37,7 @@ const BackButton_1 = __importDefault(require("../../../components/generic/BackBu
|
|
|
37
37
|
const Headline_1 = __importDefault(require("../../../components/generic/Headline"));
|
|
38
38
|
const StepLayout_1 = require("../../../components/generic/Layout/StepLayout");
|
|
39
39
|
const LineBreak_1 = __importDefault(require("../../../components/generic/LineBreak"));
|
|
40
|
+
const PageTitle_1 = require("../../../components/generic/PageTitle");
|
|
40
41
|
const AdditionalOffers_1 = __importDefault(require("../../../components/steps/confirmation/additionalOffers/AdditionalOffers"));
|
|
41
42
|
const StepConfirmationLimitedOffer_1 = __importDefault(require("../../../components/steps/confirmation/StepConfirmationLimitedOffer"));
|
|
42
43
|
const StepRoomBestRateAlert_1 = __importDefault(require("../../../components/steps/room/StepRoomBestRateAlert"));
|
|
@@ -59,6 +60,7 @@ function StepConfirmationComponent() {
|
|
|
59
60
|
raise(event);
|
|
60
61
|
}, []);
|
|
61
62
|
return (react_1.default.createElement("div", { className: "container" },
|
|
63
|
+
react_1.default.createElement(PageTitle_1.PageTitle, { step: "Confirmation" }),
|
|
62
64
|
react_1.default.createElement(contexts_1.ConfirmationFormContextWrapper, null,
|
|
63
65
|
react_1.default.createElement(BEMobileSummary_1.default, null),
|
|
64
66
|
react_1.default.createElement(StepLayout_1.StepLayoutContainer, null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StepConfirmationComponent.js","sourceRoot":"/","sources":["src/pages/steps/StepConfirmation/StepConfirmationComponent.tsx"],"names":[],"mappings":";;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C,wCAAwC;4BACnD,8BAAC,kBAAQ,IAAC,IAAI,UAAE,CAAC,CAAC,yBAAW,CAAC,UAAU,CAAC,KAAK,CAAC,YAAY,CAAC,CAAY,CACtE,CACP,CACN;oBAED,uCAAK,SAAS,EAAC,eAAe;wBAC1B,8BAAC,+BAAqB,OAAG,CACvB,CACc;gBACvB,OAAO,CAAC,UAAU,GAAG,oBAAU,CAAC,MAAM,IAAI,CACvC,8BAAC,mCAAsB;oBACnB,8BAAC,8BAAoB,OAAG,CACH,CAC5B,CACiB;YACtB,8BAAC,mBAAS,OAAG;YACb,8BAAC,gCAAmB;gBAChB,8BAAC,kCAAqB;oBAClB,uCAAK,SAAS,EAAC,iBAAiB;wBAC3B,CAAC,gCAAsB,CAAC,QAAQ,EAAE,IAAI,8BAAC,0BAAgB,OAAG;wBAC3D,8BAAC,sCAA4B,OAAG,CAC9B,CACc;gBAEvB,OAAO,CAAC,UAAU,GAAG,oBAAU,CAAC,MAAM,IAAI,CACvC,8BAAC,mCAAsB;oBACnB,8BAAC,sCAA4B,IAAC,OAAO,EAAE,IAAA,eAAK,GAAE,CAAC,GAAG,CAAC,EAAE,EAAE,QAAQ,CAAC,GAAI;oBACpE,8BAAC,qBAAS,IAAC,UAAU,SAAG,CACH,CAC5B,CACiB,CACO,CAC/B,CACT,CAAC;AACN,CAAC;AAED,kBAAe,yBAAyB,CAAC","sourcesContent":["import { BasketContext, BookingEngineContext, ConfirmationFormContextWrapper, FullPageEngineContext } from '@frontend/contexts';\nimport { StepCheckoutViewEvent } from '@frontend/events';\nimport dayjs from 'dayjs';\nimport React, { useContext, useEffect } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { Link } from 'react-router-dom';\nimport { Translation } from 'translations/Translation';\n\nimport BackButton from '@/components/generic/BackButton';\nimport Headline from '@/components/generic/Headline';\nimport { StepLayoutContainer, StepLayoutLeftContent, StepLayoutRightContent } from '@/components/generic/Layout/StepLayout';\nimport LineBreak from '@/components/generic/LineBreak';\nimport AdditionalOffers from '@/components/steps/confirmation/additionalOffers/AdditionalOffers';\nimport StepConfirmationLimitedOffer from '@/components/steps/confirmation/StepConfirmationLimitedOffer';\nimport StepRoomBestRateAlert from '@/components/steps/room/StepRoomBestRateAlert';\nimport StepRoomHotelDetails from '@/components/steps/room/StepRoomHotelDetails';\nimport BEMobileSummary from '@/components/summary/BEMobileSummary';\nimport { BESummary } from '@/components/summary/BESummary';\nimport { useEvent } from '@/hooks/EventHook';\nimport InlineAddonStepFeature from '@/providers/feature/InlineAddonStepFeature';\nimport ScreenSize from '@/util/ScreenSize';\nimport StepManager from '@/util/StepManager';\n\nimport StepConfirmationFormProvider from '../../../components/steps/confirmation/StepConfirmationFormProvider';\n\nfunction StepConfirmationComponent() {\n const context = useContext(BookingEngineContext);\n const { currentStep } = useContext(FullPageEngineContext);\n const { currentBasketRows } = useContext(BasketContext);\n\n const { t } = useTranslation();\n\n const { raise } = useEvent();\n\n useEffect(() => {\n const event = new StepCheckoutViewEvent(currentBasketRows);\n raise(event);\n }, []);\n\n return (\n <div className=\"container\">\n <ConfirmationFormContextWrapper>\n <BEMobileSummary />\n <StepLayoutContainer>\n <StepLayoutLeftContent>\n {context.screenSize > ScreenSize.Medium && (\n <>\n <Link to={StepManager.getPreviousStepUrl(currentStep)}>\n <BackButton />\n </Link>\n <div className=\"u-marg-top--light u-marg-bottom--heavy\">\n <Headline bold>{t(Translation.Navigation.Steps.Confirmation)}</Headline>\n </div>\n </>\n )}\n\n <div className=\"u-marg-top@m-\">\n <StepRoomBestRateAlert />\n </div>\n </StepLayoutLeftContent>\n {context.screenSize > ScreenSize.Medium && (\n <StepLayoutRightContent>\n <StepRoomHotelDetails />\n </StepLayoutRightContent>\n )}\n </StepLayoutContainer>\n <LineBreak />\n <StepLayoutContainer>\n <StepLayoutLeftContent>\n <div className=\"block-container\">\n {!InlineAddonStepFeature.isActive() && <AdditionalOffers />}\n <StepConfirmationFormProvider />\n </div>\n </StepLayoutLeftContent>\n\n {context.screenSize > ScreenSize.Medium && (\n <StepLayoutRightContent>\n <StepConfirmationLimitedOffer endDate={dayjs().add(10, 'minute')} />\n <BESummary showImages />\n </StepLayoutRightContent>\n )}\n </StepLayoutContainer>\n </ConfirmationFormContextWrapper>\n </div>\n );\n}\n\nexport default StepConfirmationComponent;\n"]}
|
|
1
|
+
{"version":3,"file":"StepConfirmationComponent.js","sourceRoot":"/","sources":["src/pages/steps/StepConfirmation/StepConfirmationComponent.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAgI;AAChI,6CAAyD;AACzD,kDAA0B;AAC1B,+CAAqD;AACrD,iDAA+C;AAC/C,uDAAwC;AACxC,0DAAuD;AAEvD,iFAAyD;AACzD,6EAAqD;AACrD,uEAA4H;AAC5H,+EAAuD;AACvD,8DAA2D;AAC3D,yHAAiG;AACjG,gIAAwG;AACxG,0GAAkF;AAClF,wGAAgF;AAChF,2FAAmE;AACnE,8DAA2D;AAC3D,iDAA6C;AAC7C,wGAAgF;AAChF,mEAA2C;AAC3C,qEAA6C;AAE7C,uIAA+G;AAE/G,SAAS,yBAAyB;IAC9B,MAAM,OAAO,GAAG,IAAA,kBAAU,EAAC,+BAAoB,CAAC,CAAC;IACjD,MAAM,EAAE,WAAW,EAAE,GAAG,IAAA,kBAAU,EAAC,gCAAqB,CAAC,CAAC;IAC1D,MAAM,EAAE,iBAAiB,EAAE,GAAG,IAAA,kBAAU,EAAC,wBAAa,CAAC,CAAC;IAExD,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,8BAAc,GAAE,CAAC;IAE/B,MAAM,EAAE,KAAK,EAAE,GAAG,IAAA,oBAAQ,GAAE,CAAC;IAE7B,IAAA,iBAAS,EAAC,GAAG,EAAE;QACX,MAAM,KAAK,GAAG,IAAI,8BAAqB,CAAC,iBAAiB,CAAC,CAAC;QAC3D,KAAK,CAAC,KAAK,CAAC,CAAC;IACjB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACH,uC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ketContext, BookingEngineContext, ConfirmationFormContextWrapper, FullPageEngineContext } from '@frontend/contexts';\nimport { StepCheckoutViewEvent } from '@frontend/events';\nimport dayjs from 'dayjs';\nimport React, { useContext, useEffect } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { Link } from 'react-router-dom';\nimport { Translation } from 'translations/Translation';\n\nimport BackButton from '@/components/generic/BackButton';\nimport Headline from '@/components/generic/Headline';\nimport { StepLayoutContainer, StepLayoutLeftContent, StepLayoutRightContent } from '@/components/generic/Layout/StepLayout';\nimport LineBreak from '@/components/generic/LineBreak';\nimport { PageTitle } from '@/components/generic/PageTitle';\nimport AdditionalOffers from '@/components/steps/confirmation/additionalOffers/AdditionalOffers';\nimport StepConfirmationLimitedOffer from '@/components/steps/confirmation/StepConfirmationLimitedOffer';\nimport StepRoomBestRateAlert from '@/components/steps/room/StepRoomBestRateAlert';\nimport StepRoomHotelDetails from '@/components/steps/room/StepRoomHotelDetails';\nimport BEMobileSummary from '@/components/summary/BEMobileSummary';\nimport { BESummary } from '@/components/summary/BESummary';\nimport { useEvent } from '@/hooks/EventHook';\nimport InlineAddonStepFeature from '@/providers/feature/InlineAddonStepFeature';\nimport ScreenSize from '@/util/ScreenSize';\nimport StepManager from '@/util/StepManager';\n\nimport StepConfirmationFormProvider from '../../../components/steps/confirmation/StepConfirmationFormProvider';\n\nfunction StepConfirmationComponent() {\n const context = useContext(BookingEngineContext);\n const { currentStep } = useContext(FullPageEngineContext);\n const { currentBasketRows } = useContext(BasketContext);\n\n const { t } = useTranslation();\n\n const { raise } = useEvent();\n\n useEffect(() => {\n const event = new StepCheckoutViewEvent(currentBasketRows);\n raise(event);\n }, []);\n\n return (\n <div className=\"container\">\n <PageTitle step=\"Confirmation\" />\n <ConfirmationFormContextWrapper>\n <BEMobileSummary />\n <StepLayoutContainer>\n <StepLayoutLeftContent>\n {context.screenSize > ScreenSize.Medium && (\n <>\n <Link to={StepManager.getPreviousStepUrl(currentStep)}>\n <BackButton />\n </Link>\n <div className=\"u-marg-top--light u-marg-bottom--heavy\">\n <Headline bold>{t(Translation.Navigation.Steps.Confirmation)}</Headline>\n </div>\n </>\n )}\n\n <div className=\"u-marg-top@m-\">\n <StepRoomBestRateAlert />\n </div>\n </StepLayoutLeftContent>\n {context.screenSize > ScreenSize.Medium && (\n <StepLayoutRightContent>\n <StepRoomHotelDetails />\n </StepLayoutRightContent>\n )}\n </StepLayoutContainer>\n <LineBreak />\n <StepLayoutContainer>\n <StepLayoutLeftContent>\n <div className=\"block-container\">\n {!InlineAddonStepFeature.isActive() && <AdditionalOffers />}\n <StepConfirmationFormProvider />\n </div>\n </StepLayoutLeftContent>\n\n {context.screenSize > ScreenSize.Medium && (\n <StepLayoutRightContent>\n <StepConfirmationLimitedOffer endDate={dayjs().add(10, 'minute')} />\n <BESummary showImages />\n </StepLayoutRightContent>\n )}\n </StepLayoutContainer>\n </ConfirmationFormContextWrapper>\n </div>\n );\n}\n\nexport default StepConfirmationComponent;\n"]}
|
|
@@ -32,7 +32,6 @@ const hooks_1 = require("../../../hooks/index.js");
|
|
|
32
32
|
const HotelOverridesContext_1 = require("contexts/HotelOverridesContext");
|
|
33
33
|
const react_1 = __importStar(require("react"));
|
|
34
34
|
const react_i18next_1 = require("react-i18next");
|
|
35
|
-
const react_router_dom_1 = require("react-router-dom");
|
|
36
35
|
const Translation_1 = require("translations/Translation");
|
|
37
36
|
const Headline_1 = __importDefault(require("../../../components/generic/Headline"));
|
|
38
37
|
const LineBreak_1 = __importDefault(require("../../../components/generic/LineBreak"));
|
|
@@ -52,7 +51,6 @@ const StepDate = () => {
|
|
|
52
51
|
const basketContext = (0, react_1.useContext)(contexts_1.BasketContext);
|
|
53
52
|
const ccx = (0, react_1.useContext)(contexts_1.CompanyContext);
|
|
54
53
|
const { hideByLine } = (0, react_1.useContext)(HotelOverridesContext_1.HotelOverridesContext);
|
|
55
|
-
const history = (0, react_router_dom_1.useHistory)();
|
|
56
54
|
const { hotel } = (0, hooks_1.useCurrentHotel)();
|
|
57
55
|
const { t } = (0, react_i18next_1.useTranslation)();
|
|
58
56
|
const peopleRef = (0, react_1.useRef)(null);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StepDateComponent.js","sourceRoot":"/","sources":["src/pages/steps/StepDate/StepDateComponent.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAyF;AACzF,6CAAqD;AACrD,2CAA4D;AAC5D,0EAAuE;AACvE,+CAA6E;AAC7E,iDAA+C;AAC/C,
|
|
1
|
+
{"version":3,"file":"StepDateComponent.js","sourceRoot":"/","sources":["src/pages/steps/StepDate/StepDateComponent.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAyF;AACzF,6CAAqD;AACrD,2CAA4D;AAC5D,0EAAuE;AACvE,+CAA6E;AAC7E,iDAA+C;AAC/C,0DAAuD;AAEvD,6EAAqD;AACrD,+EAAuD;AACvD,qEAA6C;AAC7C,wFAAgE;AAChE,wGAAgF;AAChF,gGAAwE;AACxE,4GAAoF;AACpF,wHAAgG;AAChG,0GAAkF;AAClF,sGAA8E;AAC9E,wCAAqC;AACrC,mEAA2C;AAC3C,MAAM,eAAe,GAAG,IAAA,YAAI,EAAC,GAAG,EAAE,mDAAQ,sCAAsC,GAAC,CAAC,CAAC;AAEnF,MAAM,QAAQ,GAAG,GAAG,EAAE;IAClB,MAAM,OAAO,GAAG,IAAA,kBAAU,EAAC,+BAAoB,CAAC,CAAC;IACjD,MAAM,aAAa,GAAG,IAAA,kBAAU,EAAC,wBAAa,CAAC,CAAC;IAChD,MAAM,GAAG,GAAG,IAAA,kBAAU,EAAC,yBAAc,CAAC,CAAC;IACvC,MAAM,EAAE,UAAU,EAAE,GAAG,IAAA,kBAAU,EAAC,6CAAqB,CAAC,CAAC;IAEzD,MAAM,EAAE,KAAK,EAAE,GAAG,IAAA,uBAAe,GAAE,CAAC;IAEpC,MAAM,EAAE,CAAC,EAAE,GAA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AqB,OAAG,CACvB,CACJ,CACT,CAAC;AACN,CAAC,CAAC;AACF,kBAAe,QAAQ,CAAC","sourcesContent":["import { BasketContext, BookingEngineContext, CompanyContext } from '@frontend/contexts';\nimport { StepDateViewEvent } from '@frontend/events';\nimport { useCurrentHotel, useEvent } from '@frontend/hooks';\nimport { HotelOverridesContext } from 'contexts/HotelOverridesContext';\nimport React, { lazy, Suspense, useContext, useEffect, useRef } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { Translation } from 'translations/Translation';\n\nimport Headline from '@/components/generic/Headline';\nimport LineBreak from '@/components/generic/LineBreak';\nimport Text from '@/components/generic/Text';\nimport PeoplePicker from '@/components/steps/date/PeoplePicker';\nimport StepDatePricePerRoom from '@/components/steps/date/StepDatePricePerRoom';\nimport StepOneDateRange from '@/components/steps/date/StepOneDateRange';\nimport StepOneDateRangePicker from '@/components/steps/date/StepOneDateRangePicker';\nimport StepOneDateRangePickerLegend from '@/components/steps/date/StepOneDateRangePickerLegend';\nimport StepOneNextStepButton from '@/components/steps/date/StepOneNextStepButton';\nimport StepOneStatusPeople from '@/components/steps/date/StepOneStatusPeople';\nimport { Color } from '@/util/Color';\nimport ScreenSize from '@/util/ScreenSize';\nconst BEMobileSummary = lazy(() => import('@/components/summary/BEMobileSummary'));\n\nconst StepDate = () => {\n const context = useContext(BookingEngineContext);\n const basketContext = useContext(BasketContext);\n const ccx = useContext(CompanyContext);\n const { hideByLine } = useContext(HotelOverridesContext);\n\n const { hotel } = useCurrentHotel();\n\n const { t } = useTranslation();\n const peopleRef = useRef<HTMLDivElement | null>(null);\n\n useEffect(() => {\n if (context.screenSize <= ScreenSize.Medium && basketContext.endDate) {\n if (peopleRef) {\n setTimeout(() => {\n peopleRef.current?.scrollIntoView?.({ behavior: 'smooth', block: 'center', inline: 'nearest' });\n }, 50);\n }\n }\n }, [basketContext.endDate]);\n\n const { raise } = useEvent();\n\n useEffect(() => {\n const event = new StepDateViewEvent();\n raise(event);\n }, []);\n\n return (\n <div className=\"container\">\n {context.screenSize <= ScreenSize.Medium && <BEMobileSummary />}\n {context.screenSize >= ScreenSize.Large && (\n <>\n <div className=\"row step-date-hotel-info\">\n <div className=\"col-md-4 col-lg-3\">\n <div className=\"u-marg-bottom--heavy\">\n <Headline bold>{t(Translation.Step.Date.Reservation)}</Headline>\n </div>\n <Headline className=\"hotel-name\" color={Color.Navy}>\n {hotel?.name}\n </Headline>\n {!hideByLine && (\n <Text className=\"company-name\" color={Color.DarkGrey}>\n {t(Translation.Misc.By)} {ccx.name}\n </Text>\n )}\n </div>\n <div className=\"col-md-8 col-lg-9\">\n <div className=\"row justify-content-between\">\n <div className=\"col-md-6\">\n <div className=\"u-marg-bottom--heavy\">\n <Headline bold>{t(Translation.Step.Date.SelectYourDate)}</Headline>\n </div>\n <div className=\"step-one-status\">\n <StepOneDateRange />\n <StepOneStatusPeople />\n </div>\n </div>\n <div className=\"col-md-4\">\n <StepDatePricePerRoom isMobile={false} />\n </div>\n </div>\n </div>\n </div>\n <LineBreak />\n </>\n )}\n\n <div className=\"row flex-column-reverse flex-md-row align-items-center align-items-md-start\">\n <div ref={peopleRef} className=\"col-md-4 col-xl-3\">\n <PeoplePicker />\n </div>\n <div className=\"col-md-8 col-xl-9\">\n <div className=\"w-100 u-flex justify-content-center flex-column align-items-center\">\n <Suspense fallback=\"loading....\">\n <StepOneDateRangePicker />\n </Suspense>\n </div>\n {context.screenSize >= ScreenSize.Large ? <StepOneDateRangePickerLegend /> : <LineBreak />}\n </div>\n </div>\n <div className=\"u-flex justify-content-end\">\n <StepOneNextStepButton />\n </div>\n </div>\n );\n};\nexport default StepDate;\n"]}
|
|
@@ -5,15 +5,26 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const react_1 = __importDefault(require("react"));
|
|
7
7
|
const react_router_1 = require("react-router");
|
|
8
|
+
const PageTitle_1 = require("../components/generic/PageTitle");
|
|
8
9
|
const StepSelector_1 = __importDefault(require("../components/navigation/StepSelector"));
|
|
9
10
|
const InactivityWindow_1 = __importDefault(require("../components/steps/room/InactivityWindow"));
|
|
10
11
|
const StepAddon_1 = __importDefault(require("../pages/steps/StepAddon/StepAddon"));
|
|
11
12
|
const StepConfirmation_1 = __importDefault(require("../pages/steps/StepConfirmation/StepConfirmation"));
|
|
12
13
|
const StepGuide_1 = __importDefault(require("../pages/steps/StepGuide"));
|
|
13
14
|
const GetStepRoom_1 = __importDefault(require("../util/GetStepRoom"));
|
|
15
|
+
const mappingPageTitle = {
|
|
16
|
+
date: 'Date',
|
|
17
|
+
room: 'Room',
|
|
18
|
+
confirmation: 'Confirmation',
|
|
19
|
+
addon: 'Addon',
|
|
20
|
+
thanks: 'Thanks',
|
|
21
|
+
};
|
|
14
22
|
const StepRoute = (props) => {
|
|
15
23
|
const renderFunction = (routeProps) => {
|
|
24
|
+
var _a;
|
|
25
|
+
const pageTitleStep = mappingPageTitle === null || mappingPageTitle === void 0 ? void 0 : mappingPageTitle[(_a = props.step.getName()) === null || _a === void 0 ? void 0 : _a.toLocaleLowerCase()];
|
|
16
26
|
return (react_1.default.createElement(StepGuide_1.default, { step: props.step },
|
|
27
|
+
pageTitleStep ? react_1.default.createElement(PageTitle_1.PageTitle, { step: pageTitleStep }) : null,
|
|
17
28
|
react_1.default.createElement(StepSelector_1.default, null),
|
|
18
29
|
react_1.default.createElement(StepContent, Object.assign({}, routeProps)),
|
|
19
30
|
[(0, GetStepRoom_1.default)().getName(), StepAddon_1.default.getName(), StepConfirmation_1.default.getName()].includes(props.step.getName()) && react_1.default.createElement(InactivityWindow_1.default, null)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NaturallyProgressedStepRoute.js","sourceRoot":"/","sources":["src/routes/NaturallyProgressedStepRoute.tsx"],"names":[],"mappings":";;;;;AAAA,kDAA0B;AAC1B,+CAAqC;AAErC,wFAAgE;AAChE,gGAAwE;
|
|
1
|
+
{"version":3,"file":"N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AI,CAAC,UAAU,EAAE,EAAE,MAAM,EAAE,cAAc,GAAI,CAAC;AAC5E,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["import React from 'react';\nimport { Route } from 'react-router';\n\nimport { PageTitle } from '@/components/generic/PageTitle';\nimport StepSelector from '@/components/navigation/StepSelector';\nimport InactivityWindow from '@/components/steps/room/InactivityWindow';\nimport { IPageTitle } from '@/models/Api/HotelOverrideDTO';\nimport Step from '@/pages/steps/Step';\nimport StepAddon from '@/pages/steps/StepAddon/StepAddon';\nimport StepConfirmation from '@/pages/steps/StepConfirmation/StepConfirmation';\nimport StepGuide from '@/pages/steps/StepGuide';\nimport getStepRoom from '@/util/GetStepRoom';\n\nexport interface StepRouteProps {\n step: Step;\n}\n\nconst mappingPageTitle: Record<string, keyof IPageTitle> = {\n date: 'Date',\n room: 'Room',\n confirmation: 'Confirmation',\n addon: 'Addon',\n thanks: 'Thanks',\n};\n\nconst StepRoute = (props: StepRouteProps) => {\n const renderFunction = (routeProps: any) => {\n const pageTitleStep: keyof IPageTitle = mappingPageTitle?.[props.step.getName()?.toLocaleLowerCase()];\n\n return (\n <StepGuide step={props.step}>\n {pageTitleStep ? <PageTitle step={pageTitleStep} /> : null}\n <StepSelector />\n <StepContent {...routeProps} />\n {[getStepRoom().getName(), StepAddon.getName(), StepConfirmation.getName()].includes(props.step.getName()) && <InactivityWindow />}\n </StepGuide>\n );\n };\n\n const StepContent = props.step.getComponent() as any;\n\n return <Route path={props.step.getStepUrl()} render={renderFunction} />;\n};\n\nexport default StepRoute;\n"]}
|
|
@@ -538,6 +538,7 @@ export declare const Translation: {
|
|
|
538
538
|
Title: string;
|
|
539
539
|
Subtitle: string;
|
|
540
540
|
ViewAllBookings: string;
|
|
541
|
+
Bookings: string;
|
|
541
542
|
};
|
|
542
543
|
ProfileScreen: {
|
|
543
544
|
Validation: {
|
|
@@ -576,6 +577,7 @@ export declare const Translation: {
|
|
|
576
577
|
MarkAsDefault: string;
|
|
577
578
|
SavedCards: string;
|
|
578
579
|
YouDontHaveAnyCardsYet: string;
|
|
580
|
+
YouDontHaveAnyCardsYetLine2: string;
|
|
579
581
|
AddNewCard: string;
|
|
580
582
|
DefaultCard: string;
|
|
581
583
|
};
|
|
@@ -541,6 +541,7 @@ exports.Translation = {
|
|
|
541
541
|
Title: 'UserPortal.HomeScreen.Title',
|
|
542
542
|
Subtitle: 'UserPortal.HomeScreen.Subtitle',
|
|
543
543
|
ViewAllBookings: 'UserPortal.HomeScreen.ViewAllBookings',
|
|
544
|
+
Bookings: 'UserPortal.HomeScreen.Bookings',
|
|
544
545
|
},
|
|
545
546
|
ProfileScreen: {
|
|
546
547
|
Validation: {
|
|
@@ -579,6 +580,7 @@ exports.Translation = {
|
|
|
579
580
|
MarkAsDefault: 'UserPortal.PaymentInformationScreen.MarkAsDefault',
|
|
580
581
|
SavedCards: 'UserPortal.PaymentInformationScreen.SavedCards',
|
|
581
582
|
YouDontHaveAnyCardsYet: 'UserPortal.PaymentInformationScreen.YouDontHaveAnyCardsYet',
|
|
583
|
+
YouDontHaveAnyCardsYetLine2: 'UserPortal.PaymentInformationScreen.YouDontHaveAnyCardsYetLine2',
|
|
582
584
|
AddNewCard: 'UserPortal.PaymentInformationScreen.AddNewCard',
|
|
583
585
|
DefaultCard: 'UserPortal.PaymentInformationScreen.DefaultCard',
|
|
584
586
|
},
|