@roomstay/frontend 2.3.38 → 2.3.40
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/319.bundle.js +1 -1
- package/dist/572.bundle.js +1 -1
- package/dist/975.bundle.js +1 -1
- package/dist/main.bundle.js +1 -1
- package/dist/src/components/steps/confirmation/StepConfirmationPolicyBlock.js +4 -4
- package/dist/src/components/steps/confirmation/StepConfirmationPolicyBlock.js.map +1 -1
- package/dist/src/components/steps/room/RoomModal.js +9 -6
- package/dist/src/components/steps/room/RoomModal.js.map +1 -1
- package/dist/src/components/steps/room/roomDetails/RoomDetailsBedsBlock.js +8 -6
- package/dist/src/components/steps/room/roomDetails/RoomDetailsBedsBlock.js.map +1 -1
- package/dist/src/models/Api/HotelDTO.d.ts +1 -0
- package/dist/src/models/Api/HotelDTO.js.map +1 -1
- package/dist/src/models/Client/Hotel/Hotel.d.ts +1 -0
- package/dist/src/models/Client/Hotel/Hotel.js.map +1 -1
- package/dist/src/pages/account/Reservations/AccountReservationSinglePage.js +2 -2
- package/dist/src/pages/account/Reservations/AccountReservationSinglePage.js.map +1 -1
- package/dist/src/translations/Translation.d.ts +1 -0
- package/dist/src/translations/Translation.js +1 -0
- package/dist/src/translations/Translation.js.map +1 -1
- package/dist/src/translations/languages/en-gb.js +1 -0
- package/dist/src/translations/languages/en-gb.js.map +1 -1
- package/dist/test.bundle.js +1 -1
- package/package.json +1 -1
|
@@ -51,7 +51,7 @@ function StepConfirmationPolicyBlock() {
|
|
|
51
51
|
policiesGrouped[0] = { rooms: [{ index: 1, room: rooms[0] }] };
|
|
52
52
|
}
|
|
53
53
|
return (react_1.default.createElement("div", { className: "u-marg-bottom" }, Object.values(policiesGrouped).map((group, index) => {
|
|
54
|
-
var _a, _b;
|
|
54
|
+
var _a, _b, _c;
|
|
55
55
|
const firstRoom = group.rooms[0];
|
|
56
56
|
return (react_1.default.createElement("div", { className: "u-marg-bottom--heavy", key: index },
|
|
57
57
|
react_1.default.createElement("div", { className: "u-marg-bottom" }, group.rooms.map((roomWithIndex) => {
|
|
@@ -66,13 +66,13 @@ function StepConfirmationPolicyBlock() {
|
|
|
66
66
|
" - ", (_a = roomWithIndex.room.getRate()) === null || _a === void 0 ? void 0 :
|
|
67
67
|
_a.name));
|
|
68
68
|
})),
|
|
69
|
-
react_1.default.createElement("div", { className: "u-marg-bottom" },
|
|
69
|
+
react_1.default.createElement("div", { className: "u-marg-bottom" }, ((_a = firstRoom.room.getRate()) === null || _a === void 0 ? void 0 : _a.getGuaranteePolicy()) ? (react_1.default.createElement(react_1.default.Fragment, null,
|
|
70
70
|
react_1.default.createElement(Text_1.default, { type: Text_1.TextType.Small, bold: true }, t(Translation_1.Translation.Misc.GuaranteePolicy)),
|
|
71
71
|
react_1.default.createElement(Text_1.default, { type: Text_1.TextType.Small, preformatted: true },
|
|
72
|
-
react_1.default.createElement("span", { dangerouslySetInnerHTML: { __html: ((
|
|
72
|
+
react_1.default.createElement("span", { dangerouslySetInnerHTML: { __html: ((_b = firstRoom.room.getRate()) === null || _b === void 0 ? void 0 : _b.getGuaranteePolicy()) || '' } })))) : null),
|
|
73
73
|
react_1.default.createElement(Text_1.default, { type: Text_1.TextType.Small, bold: true }, t(Translation_1.Translation.Misc.CancellationPolicy)),
|
|
74
74
|
react_1.default.createElement(Text_1.default, { type: Text_1.TextType.Small, preformatted: true },
|
|
75
|
-
react_1.default.createElement("span", { dangerouslySetInnerHTML: { __html: ((
|
|
75
|
+
react_1.default.createElement("span", { dangerouslySetInnerHTML: { __html: ((_c = firstRoom.room.getRate()) === null || _c === void 0 ? void 0 : _c.getCancellationPolicy()) || '' } }))));
|
|
76
76
|
})));
|
|
77
77
|
}, [basketContext.currentBasketRows]);
|
|
78
78
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StepConfirmationPolicyBlock.js","sourceRoot":"/","sources":["src/components/steps/confirmation/StepConfirmationPolicyBlock.tsx"],"names":[],"mappings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,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;SAClE;QAED,OAAO,CACH,uCAAK,SAAS,EAAC,eAAe,IACzB,MAAM,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;;YACjD,MAAM,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAEjC,OAAO,CACH,uCAAK,SAAS,EAAC,sBAAsB,EAAC,GAAG,EAAE,KAAK;gBAC5C,uCAAK,SAAS,EAAC,eAAe,IACzB,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,aAAa,EAAE,EAAE;;oBAC/B,OAAO,CACH,8BAAC,cAAI,IAAC,GAAG,EAAE,aAAa,CAAC,KAAK,EAAE,IAAI,EAAE,eAAQ,CAAC,KAAK;wBAChD;4BACK,eAAe;;4BAAG,aAAa,CAAC,KAAK,CACjC;wBAAC,GAAG;wBACZ,aAAa,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,IAAI;+BAAK,MAAA,aAAa,CAAC,IAAI,CAAC,OAAO,EAAE;2BAAE,IAAI,CACtE,CACV,CAAC;gBACN,CAAC,CAAC,CACA;gBACN,uCAAK,SAAS,EAAC,eAAe;
|
|
1
|
+
{"version":3,"file":"StepConfirmationPolicyBlock.js","sourceRoot":"/","sources":["src/components/steps/confirmation/StepConfirmationPolicyBlock.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAmD;AACnD,+CAAmD;AACnD,iDAA+C;AAC/C,0DAAuD;AAEvD,kEAA2D;AAG3D,SAAwB,2BAA2B;IAC/C,MAAM,aAAa,GAAG,IAAA,kBAAU,EAAC,wBAAa,CAAC,CAAC;IAEhD,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,8BAAc,GA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AkB,CAAC,CACpC;gBACP,8BAAC,cAAI,IAAC,IAAI,EAAE,eAAQ,CAAC,KAAK,EAAE,YAAY;oBACpC,wCAAM,uBAAuB,EAAE,EAAE,MAAM,EAAE,CAAA,MAAA,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE,0CAAE,qBAAqB,EAAE,KAAI,EAAE,EAAE,GAAS,CACxG,CACL,CACT,CAAC;QACN,CAAC,CAAC,CACA,CACT,CAAC;IACN,CAAC,EAAE,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAAC,CAAC;AAC1C,CAAC;AAzED,8CAyEC","sourcesContent":["import { BasketContext } from '@frontend/contexts';\nimport React, { useContext, useMemo } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { Translation } from 'translations/Translation';\n\nimport Text, { TextType } from '@/components/generic/Text';\nimport BasketRow from '@/models/BasketRow';\n\nexport default function StepConfirmationPolicyBlock() {\n const basketContext = useContext(BasketContext);\n\n const { t } = useTranslation();\n\n const roomTranslation = t(Translation.Misc.Room);\n\n return useMemo(() => {\n const policiesGrouped: { [uniq: string]: { rooms: { index: number; room: BasketRow }[] } } = {};\n const rooms = basketContext.getAllValidRows();\n\n let roomIndex = 0;\n\n if (rooms.length > 1) {\n rooms.forEach((room) => {\n roomIndex++;\n\n const rate = room.getRate();\n let entry = policiesGrouped[`${rate?.cancelPolicyCode}-${rate?.guaranteeCode}`];\n\n if (!entry) {\n entry = policiesGrouped[`${rate?.cancelPolicyCode}-${rate?.guaranteeCode}`] = { rooms: [] };\n }\n\n entry.rooms.push({ index: roomIndex, room });\n });\n } else {\n policiesGrouped[0] = { rooms: [{ index: 1, room: rooms[0] }] };\n }\n\n return (\n <div className=\"u-marg-bottom\">\n {Object.values(policiesGrouped).map((group, index) => {\n const firstRoom = group.rooms[0];\n\n return (\n <div className=\"u-marg-bottom--heavy\" key={index}>\n <div className=\"u-marg-bottom\">\n {group.rooms.map((roomWithIndex) => {\n return (\n <Text key={roomWithIndex.index} type={TextType.Small}>\n <strong>\n {roomTranslation} {roomWithIndex.index}\n </strong>{' '}\n {roomWithIndex.room.getRoom().name} - {roomWithIndex.room.getRate()?.name}\n </Text>\n );\n })}\n </div>\n <div className=\"u-marg-bottom\">\n {firstRoom.room.getRate()?.getGuaranteePolicy() ? (\n <>\n <Text type={TextType.Small} bold>\n {t(Translation.Misc.GuaranteePolicy)}\n </Text>\n <Text type={TextType.Small} preformatted>\n <span dangerouslySetInnerHTML={{ __html: firstRoom.room.getRate()?.getGuaranteePolicy() || '' }}></span>\n </Text>\n </>\n ) : null}\n </div>\n <Text type={TextType.Small} bold>\n {t(Translation.Misc.CancellationPolicy)}\n </Text>\n <Text type={TextType.Small} preformatted>\n <span dangerouslySetInnerHTML={{ __html: firstRoom.room.getRate()?.getCancellationPolicy() || '' }}></span>\n </Text>\n </div>\n );\n })}\n </div>\n );\n }, [basketContext.currentBasketRows]);\n}\n"]}
|
|
@@ -63,12 +63,15 @@ function RoomModal(props) {
|
|
|
63
63
|
react_1.default.createElement("div", { className: "u-marg-bottom--heavy" },
|
|
64
64
|
react_1.default.createElement(Text_1.default, { color: Color_1.Color.DarkGrey, type: Text_1.TextType.Small },
|
|
65
65
|
react_1.default.createElement("span", { dangerouslySetInnerHTML: { __html: props.room.getShortDescription(false) || '' } }))),
|
|
66
|
-
!(hotel === null || hotel === void 0 ? void 0 : hotel.perksHideOnRoomDetail) && (react_1.default.createElement("div", { className: "u-marg-bottom--heavy" },
|
|
67
|
-
|
|
68
|
-
react_1.default.createElement("div", { className: "
|
|
69
|
-
|
|
70
|
-
react_1.default.createElement(
|
|
71
|
-
|
|
66
|
+
!(hotel === null || hotel === void 0 ? void 0 : hotel.perksHideOnRoomDetail) && perks && (react_1.default.createElement("div", { className: "u-marg-bottom--heavy" },
|
|
67
|
+
react_1.default.createElement("div", { className: "row" }, perks.map((perk, index) => {
|
|
68
|
+
return (react_1.default.createElement("div", { key: index, className: "u-marg-bottom col-6 col-md-4 u-flex align-items-center justify-content-start" },
|
|
69
|
+
react_1.default.createElement("div", { className: "room-perk-icon --has-bg" }, perk.iconElement ? perk.iconElement : react_1.default.createElement(Icon_1.default, { icon: perk.icon })),
|
|
70
|
+
react_1.default.createElement("div", { className: "u-marg-left--light" },
|
|
71
|
+
react_1.default.createElement(Text_1.default, { type: Text_1.TextType.Small }, perk.name))));
|
|
72
|
+
})),
|
|
73
|
+
(hotel === null || hotel === void 0 ? void 0 : hotel.perksShowDisclaimer) && (react_1.default.createElement("div", { className: "row u-marg-top--lighter" },
|
|
74
|
+
react_1.default.createElement("small", { className: "col-12" }, t(Translation_1.Translation.Misc.PerksDisclaimer)))))),
|
|
72
75
|
!!(amenities === null || amenities === void 0 ? void 0 : amenities.length) && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
73
76
|
react_1.default.createElement("div", { className: "u-marg-bottom" },
|
|
74
77
|
react_1.default.createElement(Text_1.default, { color: Color_1.Color.Accent, type: Text_1.TextType.Small },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RoomModal.js","sourceRoot":"/","sources":["src/components/steps/room/RoomModal.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAAkD;AAElD,kDAA0B;AAC1B,iDAA+C;AAC/C,0DAAuD;AAEvD,6EAAqD;AACrD,uEAAgE;AAChE,+EAAuD;AACvD,sFAAsF;AACtF,kEAA2D;AAC3D,oGAA4E;AAC5E,mGAAgG;AAChG,wGAAgF;AAGhF,wCAAqC;AAYrC,SAAwB,SAAS,CAAC,KAAqB;;IACnD,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,8BAAc,GAAE,CAAC;IAC/B,MAAM,EAAE,KAAK,EAAE,GAAG,IAAA,uBAAe,GAAE,CAAC;IAEpC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,KAAc,CAAC;IAExC,MAAM,aAAa,GAAG,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAG,KAAK,CAAC,IAAI,CAAC,IAAc,CA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G;4BAC1H,uCAAK,SAAS,EAAC,2BAA2B;gCACtC,8BAAC,cAAI,IAAC,IAAI,EAAE,eAAQ,CAAC,KAAK,EAAE,MAAM,UAC7B,OAAO,CAAC,WAAW,CACjB,CACL,CACJ,CACT,CAAC;oBACN,CAAC,CAAC,CACA,CACP,CACN;gBACD,8BAAC,mBAAS,OAAG;gBACb,uCAAK,SAAS,EAAC,sBAAsB;oBACjC,8BAAC,cAAI,IAAC,IAAI,EAAE,eAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,aAAK,CAAC,QAAQ;wBAC7C,wCAAM,uBAAuB,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,kBAAkB,EAAE,IAAI,EAAE,EAAE,GAAI,CACjF,CACL,CACJ;YACN,8BAAC,mBAAS,IAAC,aAAa,EAAE,KAAK,CAAC,aAAa,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,CAAC,IAAI,CAAC,IAAc,GAAI,CACxG,CACI,CACjB,CAAC;AACN,CAAC;AA3FD,4BA2FC","sourcesContent":["import { useCurrentHotel } from '@frontend/hooks';\nimport { Hotel } from 'models/Client/Hotel/Hotel';\nimport React from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { Translation } from 'translations/Translation';\n\nimport Headline from '@/components/generic/Headline';\nimport Icon, { IconType } from '@/components/generic/Icon/Icon';\nimport LineBreak from '@/components/generic/LineBreak';\nimport SimpleModal, { SimpleModalSize } from '@/components/generic/modal/SimpleModal';\nimport Text, { TextType } from '@/components/generic/Text';\nimport ImageGallerySlider from '@/components/steps/room/ImageGallerySlider';\nimport { RoomDetailsBedsBlock } from '@/components/steps/room/roomDetails/RoomDetailsBedsBlock';\nimport RoomRates from '@/components/steps/room/roomDetails/roomRates/RoomRates';\nimport { Room } from '@/models/Room/Room';\nimport { RoomRate } from '@/models/Room/RoomRate';\nimport { Color } from '@/util/Color';\n\ninterface RoomModalProps {\n room: Room;\n\n rates: RoomRate[];\n featuredRates: RoomRate[];\n\n open: boolean;\n onClose?: () => void;\n}\n\nexport default function RoomModal(props: RoomModalProps) {\n const { t } = useTranslation();\n const { hotel } = useCurrentHotel();\n\n const { perks, rooms } = hotel as Hotel;\n\n const extraRoomData = rooms?.[props.room.code as string];\n\n // Explode otherwise original data gets overwritten.\n const amenities = extraRoomData?.amenities ? [...extraRoomData.amenities] : [];\n\n if (extraRoomData?.features?.length) {\n extraRoomData.features.forEach((feature) => {\n amenities.push(feature);\n });\n }\n\n return (\n <SimpleModal title={props.room.name + ' ' + t(Translation.Step.Room.RoomInfo.Information)} open={props.open} size={SimpleModalSize.Small} onClose={props.onClose}>\n <div>\n <div style={{ height: '350px' }}>\n <ImageGallerySlider images={props.room.getImages()} />\n </div>\n\n <div className=\"u-marg-heavy u-marg@m-\">\n <div className=\"u-marg-bottom--light\">\n <Headline bold size=\"large\">\n {props.room.name}\n </Headline>\n </div>\n <RoomDetailsBedsBlock room={props.room} />\n <div className=\"u-marg-bottom--heavy\">\n <Text color={Color.DarkGrey} type={TextType.Small}>\n <span dangerouslySetInnerHTML={{ __html: props.room.getShortDescription(false) || '' }} />\n </Text>\n </div>\n {!hotel?.perksHideOnRoomDetail && perks && (\n <div className=\"u-marg-bottom--heavy\">\n <div className=\"row\">\n {perks.map((perk, index) => {\n return (\n <div key={index} className=\"u-marg-bottom col-6 col-md-4 u-flex align-items-center justify-content-start\">\n <div className=\"room-perk-icon --has-bg\">{perk.iconElement ? perk.iconElement : <Icon icon={perk.icon as IconType} />}</div>\n <div className=\"u-marg-left--light\">\n <Text type={TextType.Small}>{perk.name}</Text>\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 </div>\n )}\n {!!amenities?.length && (\n <>\n <div className=\"u-marg-bottom\">\n <Text color={Color.Accent} type={TextType.Small}>\n <strong>{t(Translation.Step.Room.RoomInfo.RoomAmenities)}</strong>\n </Text>\n </div>\n <div className=\"row\">\n {amenities.map((amenity) => {\n return (\n <div key={amenity.description} className=\"col-sm-6 u-marg-bottom--light u-flex justify-content-start\">\n <Icon icon={IconType.Check} color={Color.White} backgroundColor={Color.Navy} borderRadius=\"round\" noPadding size=\"16px\" />\n <div className=\"u-marg-left--light u-flex\">\n <Text type={TextType.Small} inline>\n {amenity.description}\n </Text>\n </div>\n </div>\n );\n })}\n </div>\n </>\n )}\n <LineBreak />\n <div className=\"u-marg-bottom--heavy\">\n <Text type={TextType.Small} color={Color.Graphite}>\n <span dangerouslySetInnerHTML={{ __html: props.room.getLongDescription() || '' }} />\n </Text>\n </div>\n </div>\n <RoomRates featuredRates={props.featuredRates} rates={props.rates} roomCode={props.room.code as string} />\n </div>\n </SimpleModal>\n );\n}\n"]}
|
|
@@ -35,14 +35,16 @@ const Text_1 = require("../../../generic/Text");
|
|
|
35
35
|
const Translation_1 = require("../../../../translations/Translation");
|
|
36
36
|
const Color_1 = require("../../../../util/Color");
|
|
37
37
|
function RoomDetailsBedsBlock(props) {
|
|
38
|
-
var _a, _b, _c, _d, _e, _f;
|
|
38
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
39
39
|
const { hotel } = (0, hooks_1.useCurrentHotel)();
|
|
40
40
|
const { t } = (0, react_i18next_1.useTranslation)();
|
|
41
41
|
const extraRoomData = (_a = hotel === null || hotel === void 0 ? void 0 : hotel.rooms) === null || _a === void 0 ? void 0 : _a[(_b = props.room) === null || _b === void 0 ? void 0 : _b.code];
|
|
42
|
-
const
|
|
43
|
-
const
|
|
42
|
+
const adminRoomSize = (_e = (_c = hotel === null || hotel === void 0 ? void 0 : hotel.rooms) === null || _c === void 0 ? void 0 : _c[(_d = props.room) === null || _d === void 0 ? void 0 : _d.code]) === null || _e === void 0 ? void 0 : _e.roomSize;
|
|
43
|
+
const overrideRoomSize = (_h = (_f = hotel === null || hotel === void 0 ? void 0 : hotel.overwrites) === null || _f === void 0 ? void 0 : _f[(_g = props.room) === null || _g === void 0 ? void 0 : _g.code]) === null || _h === void 0 ? void 0 : _h.RoomDimensions;
|
|
44
|
+
const roomSize = overrideRoomSize !== null && overrideRoomSize !== void 0 ? overrideRoomSize : (adminRoomSize ? `${adminRoomSize} m²` : undefined);
|
|
45
|
+
const textColor = (_j = props.textColor) !== null && _j !== void 0 ? _j : Color_1.Color.DarkGrey;
|
|
44
46
|
let bedType = `${(extraRoomData === null || extraRoomData === void 0 ? void 0 : extraRoomData.bedQuantity) > 0 ? extraRoomData === null || extraRoomData === void 0 ? void 0 : extraRoomData.bedQuantity : ''} ${extraRoomData === null || extraRoomData === void 0 ? void 0 : extraRoomData.bedType}`;
|
|
45
|
-
if ((
|
|
47
|
+
if ((_k = extraRoomData === null || extraRoomData === void 0 ? void 0 : extraRoomData.bedTypeOverride) === null || _k === void 0 ? void 0 : _k.trim()) {
|
|
46
48
|
bedType = extraRoomData.bedTypeOverride;
|
|
47
49
|
}
|
|
48
50
|
return (react_1.default.createElement("ul", { className: "u-inline-flex u-flex-gap u-flex-wrap u-marg-bottom" },
|
|
@@ -56,10 +58,10 @@ function RoomDetailsBedsBlock(props) {
|
|
|
56
58
|
react_1.default.createElement(Icon_1.default, { icon: Icon_1.IconType.Bed, size: "24px", color: Color_1.Color.Navy }),
|
|
57
59
|
react_1.default.createElement("div", { className: "u-pad-left--light" },
|
|
58
60
|
react_1.default.createElement(Text_1.Text, { type: Text_1.TextType.Small, inline: true, color: textColor }, bedType))),
|
|
59
|
-
!!
|
|
61
|
+
!!roomSize && (react_1.default.createElement("li", { className: "u-flex align-items-center" },
|
|
60
62
|
react_1.default.createElement(Icon_1.default, { icon: Icon_1.IconType.RoomSize, size: "24px", color: Color_1.Color.Navy }),
|
|
61
63
|
react_1.default.createElement("div", { className: "u-pad-left--light" },
|
|
62
|
-
react_1.default.createElement(Text_1.Text, { type: Text_1.TextType.Small, inline: true, color: textColor }, roomSize
|
|
64
|
+
react_1.default.createElement(Text_1.Text, { type: Text_1.TextType.Small, inline: true, color: textColor }, roomSize))))));
|
|
63
65
|
}
|
|
64
66
|
exports.RoomDetailsBedsBlock = RoomDetailsBedsBlock;
|
|
65
67
|
//# sourceMappingURL=RoomDetailsBedsBlock.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RoomDetailsBedsBlock.js","sourceRoot":"/","sources":["src/components/steps/room/roomDetails/RoomDetailsBedsBlock.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAAkD;AAClD,kDAA0B;AAC1B,iDAA+C;AAE/C,uEAAgE;AAChE,oDAA2D;AAE3D,4DAAyD;AACzD,wCAAqC;AAQrC,SAAgB,oBAAoB,CAAC,KAAgC;;IACjE,MAAM,EAAE,KAAK,EAAE,GAAG,IAAA,uBAAe,GAAE,CAAC;IACpC,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,8BAAc,GAAE,CAAC;IAE/B,MAAM,aAAa,GAAG,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,KAAK,0CAAG,MAAA,KAAK,CAAC,IAAI,0CAAE,IAAc,CAAC,CAAC;IACjE,MAAM,QAAQ,GAAG,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,UAAU,0CAAG,MAAA,KAAK,CAAC,IAAI,0CAAE,IAAc,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"RoomDetailsBedsBlock.js","sourceRoot":"/","sources":["src/components/steps/room/roomDetails/RoomDetailsBedsBlock.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAAkD;AAClD,kDAA0B;AAC1B,iDAA+C;AAE/C,uEAAgE;AAChE,oDAA2D;AAE3D,4DAAyD;AACzD,wCAAqC;AAQrC,SAAgB,oBAAoB,CAAC,KAAgC;;IACjE,MAAM,EAAE,KAAK,EAAE,GAAG,IAAA,uBAAe,GAAE,CAAC;IACpC,M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MAAM,EAAE,IAAI,EAAC,MAAM,EAAC,KAAK,EAAE,aAAK,CAAC,IAAI,GAAI;YAC9D,uCAAK,SAAS,EAAC,mBAAmB;gBAC9B,8BAAC,WAAI,IAAC,IAAI,EAAE,eAAQ,CAAC,KAAK,EAAE,MAAM,QAAC,KAAK,EAAE,SAAS,IAC9C,CAAC,CAAC,yBAAW,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;oBAC7B,YAAY,EAAE,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,YAAY;iBAC5C,CAAC,CACC,CACL,CACL;QACL,sCAAI,SAAS,EAAC,2BAA2B;YACrC,8BAAC,cAAI,IAAC,IAAI,EAAE,eAAQ,CAAC,GAAG,EAAE,IAAI,EAAC,MAAM,EAAC,KAAK,EAAE,aAAK,CAAC,IAAI,GAAI;YAC3D,uCAAK,SAAS,EAAC,mBAAmB;gBAC9B,8BAAC,WAAI,IAAC,IAAI,EAAE,eAAQ,CAAC,KAAK,EAAE,MAAM,QAAC,KAAK,EAAE,SAAS,IAC9C,OAAO,CACL,CACL,CACL;QACJ,CAAC,CAAC,QAAQ,IAAI,CACX,sCAAI,SAAS,EAAC,2BAA2B;YACrC,8BAAC,cAAI,IAAC,IAAI,EAAE,eAAQ,CAAC,QAAQ,EAAE,IAAI,EAAC,MAAM,EAAC,KAAK,EAAE,aAAK,CAAC,IAAI,GAAI;YAChE,uCAAK,SAAS,EAAC,mBAAmB;gBAC9B,8BAAC,WAAI,IAAC,IAAI,EAAE,eAAQ,CAAC,KAAK,EAAE,MAAM,QAAC,KAAK,EAAE,SAAS,IAC9C,QAAQ,CACN,CACL,CACL,CACR,CACA,CACR,CAAC;AACN,CAAC;AAhDD,oDAgDC","sourcesContent":["import { useCurrentHotel } from '@frontend/hooks';\nimport React from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport Icon, { IconType } from '@/components/generic/Icon/Icon';\nimport { Text, TextType } from '@/components/generic/Text';\nimport { Room } from '@/models/Room/Room';\nimport { Translation } from '@/translations/Translation';\nimport { Color } from '@/util/Color';\n\ninterface RoomDetailsBedsBlockProps {\n room: Room;\n\n textColor?: Color;\n}\n\nexport function RoomDetailsBedsBlock(props: RoomDetailsBedsBlockProps) {\n const { hotel } = useCurrentHotel();\n const { t } = useTranslation();\n\n const extraRoomData = hotel?.rooms?.[props.room?.code as string];\n const adminRoomSize = hotel?.rooms?.[props.room?.code as string]?.roomSize;\n const overrideRoomSize = hotel?.overwrites?.[props.room?.code as string]?.RoomDimensions;\n const roomSize = overrideRoomSize ?? (adminRoomSize ? `${adminRoomSize} m²` : undefined);\n\n const textColor = props.textColor ?? Color.DarkGrey;\n\n let bedType = `${(extraRoomData?.bedQuantity as number) > 0 ? extraRoomData?.bedQuantity : ''} ${extraRoomData?.bedType}`;\n if (extraRoomData?.bedTypeOverride?.trim()) {\n bedType = extraRoomData.bedTypeOverride;\n }\n\n return (\n <ul className=\"u-inline-flex u-flex-gap u-flex-wrap u-marg-bottom\">\n <li className=\"u-flex align-items-center\">\n <Icon icon={IconType.People} size=\"24px\" color={Color.Navy} />\n <div className=\"u-pad-left--light\">\n <Text type={TextType.Small} inline color={textColor}>\n {t(Translation.Step.Room.Sleeps, {\n maxOccupancy: extraRoomData?.maxOccupancy,\n })}\n </Text>\n </div>\n </li>\n <li className=\"u-flex align-items-center\">\n <Icon icon={IconType.Bed} size=\"24px\" color={Color.Navy} />\n <div className=\"u-pad-left--light\">\n <Text type={TextType.Small} inline color={textColor}>\n {bedType}\n </Text>\n </div>\n </li>\n {!!roomSize && (\n <li className=\"u-flex align-items-center\">\n <Icon icon={IconType.RoomSize} size=\"24px\" color={Color.Navy} />\n <div className=\"u-pad-left--light\">\n <Text type={TextType.Small} inline color={textColor}>\n {roomSize}\n </Text>\n </div>\n </li>\n )}\n </ul>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HotelDTO.js","sourceRoot":"/","sources":["src/models/Api/HotelDTO.ts"],"names":[],"mappings":";;;AAMA,uDAA+D;
|
|
1
|
+
{"version":3,"file":"HotelDTO.js","sourceRoot":"/","sources":["src/models/Api/HotelDTO.ts"],"names":[],"mappings":";;;AAMA,uDAA+D;AAmG/D,IAAY,WAOX;AAPD,WAAY,WAAW;IACnB,4BAAa,CAAA;IACb,wCAAyB,CAAA;IACzB,0BAAW,CAAA;IACX,wCAAyB,CAAA;IACzB,uCAAwB,CAAA;IACxB,oCAAqB,CAAA;AACzB,CAAC,EAPW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAOtB;AAEY,QAAA,0BAA0B,GAAsD;IACzF,CAAC,wBAAgB,CAAC,IAAI,CAAC,EAAE,WAAW,CAAC,IAAI;IACzC,CAAC,wBAAgB,CAAC,UAAU,CAAC,EAAE,WAAW,CAAC,UAAU;IACrD,CAAC,wBAAgB,CAAC,GAAG,CAAC,EAAE,WAAW,CAAC,GAAG;IACvC,CAAC,wBAAgB,CAAC,eAAe,CAAC,EAAE,WAAW,CAAC,eAAe;IAC/D,CAAC,wBAAgB,CAAC,UAAU,CAAC,EAAE,WAAW,CAAC,UAAU;IACrD,CAAC,wBAAgB,CAAC,QAAQ,CAAC,EAAE,WAAW,CAAC,QAAQ;CACpD,CAAC","sourcesContent":["import type { EnvironmentName } from '@planpay/web';\nimport type { EBookingPaymentMethod } from '@roomstay/core';\nimport { DeepPartial } from 'react-hook-form';\n\nimport ColorProfile from '@/models/Client/Hotel/ColorProfile';\nimport { DistanceUnitType } from '@/models/Client/Hotel/DistanceUnitType.types';\nimport { EPaymentCardType } from '@/models/Client/Hotel/Hotel';\nimport HotelAddress from '@/models/Client/Hotel/HotelAddress';\nimport { HotelDataSource } from '@/models/Client/Hotel/HotelDataSource.types';\nimport { WeekdayStartsOn } from '@/models/Client/Hotel/WeekdayStartsOn.types';\n\nexport type HotelServiceDTO = {\n detail: string;\n included: boolean;\n name: string;\n onsite: boolean;\n};\n\nexport type HotelRoomsDTO = {\n [roomTypeCode: string]: HotelRoomDTO;\n};\n\nexport type HotelRoomGroupsDTO = {\n groupName: string;\n id: string;\n filters: { [id: string]: { name: string; type: 'select'; includeAllAbove: boolean; options: any } };\n}[];\n\nexport type HotelRoomAmenitiesDTO = {\n type: string;\n description: string;\n};\n\nexport type HotelRoomDTO = {\n code: string;\n name: string;\n shortDescription: string;\n longDescription: string;\n images: string[];\n quantity: number;\n maxOccupancy: number;\n bedQuantity: number;\n standardNumBeds: number;\n maxRollaways: number;\n bedType: string;\n amenities: HotelRoomAmenitiesDTO[];\n features: HotelRoomAmenitiesDTO[];\n bedTypeOverride?: string;\n roomGroupId?: string;\n roomSize?: number;\n};\n\nexport type HotelDTO = {\n id: number;\n name: string;\n chainId: number;\n chainName: string;\n\n address: HotelAddress;\n phone: string;\n\n latitude: string;\n longitude: string;\n\n utcOffset: string;\n\n languageCode: string;\n currencyCode: string;\n\n checkInTime: string;\n checkOutTime: string;\n\n paymentCardTypes: EPaymentCardType[];\n\n description: string;\n locationDescription: string;\n policies: string;\n\n hotelServices: HotelServiceDTO[];\n businessServices: HotelServiceDTO[];\n\n rooms: { [roomTypeCode: string]: HotelRoomDTO };\n dataSource: HotelDataSource;\n\n // Following fields are only present if dataSource = 'roomstay'\n logo?: string;\n colors: DeepPartial<ColorProfile>;\n distanceUnitType?: DistanceUnitType;\n weekdayStartsOn?: WeekdayStartsOn;\n\n crossSellHotelIds?: string[];\n paymentMethods: EBookingPaymentMethod[];\n planpay?: {\n username: string;\n minDaysShowPlanpay: number;\n env: EnvironmentName;\n };\n\n email?: string;\n hotelUrl?: string;\n heroImage?: string;\n images?: string[];\n roomGroups: HotelRoomGroupsDTO;\n};\n\nexport enum VGSCardName {\n Visa = 'visa',\n Mastercard = 'mastercard',\n JCB = 'jcb',\n DinersClub = 'dinersclub',\n AmericanExpress = 'amex',\n UnionPay = 'unionpay',\n}\n\nexport const SynxisToVGSCardNameMapping: { [synxisName in EPaymentCardType]: VGSCardName } = {\n [EPaymentCardType.Visa]: VGSCardName.Visa,\n [EPaymentCardType.Mastercard]: VGSCardName.Mastercard,\n [EPaymentCardType.JCB]: VGSCardName.JCB,\n [EPaymentCardType.AmericanExpress]: VGSCardName.AmericanExpress,\n [EPaymentCardType.DinersClub]: VGSCardName.DinersClub,\n [EPaymentCardType.UnionPay]: VGSCardName.UnionPay,\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Hotel.js","sourceRoot":"/","sources":["src/models/Client/Hotel/Hotel.ts"],"names":[],"mappings":";;;AAgBA,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 type { EnvironmentName } from '@planpay/web';\nimport { EBookingPaymentMethod, IHotelColorScheme } from '@roomstay/core';\nimport type { ReactChild } from 'react';\n\nimport type { MemberOnlyModalInputs } from '@/components/steps/room/MemberSignInModal/MemberSignInModal.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 type { Language } from '@/providers/LanguageProvider';\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 images?: string[];\n logo: string | ReactChild;\n colors: IHotelColorScheme;\n distanceUnitType: DistanceUnitType;\n startsWeekOnDay?: WeekdayStartsOn;\n crossSellHotelIds?: string[];\n maxOccupancy?: number;\n hideByLine?: boolean;\n transportDistances?: TransportDistances;\n roomGroups: HotelRoomGroupsDTO;\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 memberOnlySignupInputs?: MemberOnlyModalInputs;\n googleMapsImage?: string;\n /**\n * Whether to show the Breakfast / Lunch / Dinner included\n */\n showMealPill?: boolean;\n perks: HotelPerk[];\n /**\n * Hide perks on room row\n */\n perksHideOnRoomRow?: boolean;\n /**\n * Hide perks on room detail modal\n */\n perksHideOnRoomDetail?: boolean;\n /** @deprecated Use the vgs.vaultNames.standard property now */\n vgsVaultName?: string;\n vgs?: {\n vaultNames: IVGSVaultNames;\n };\n showAddonLoader: boolean;\n overwrites?: { [code: string]: Partial<HotelRoomOverwrite> };\n forwardFindReservationToSynxis?: boolean;\n additionalOptions?: { [name: string]: any };\n googleReCaptcha?: {\n loadForMembers?: boolean;\n siteKey?: string;\n };\n /**\n * Show description on RoomDetails\n */\n showDescriptionOnRoomDetails?: boolean;\n /**\n * Customize the Member modal colours. Specifically replacing the green (success) with the primary color of hotel (accent)\n */\n memberOnlyModalUsePrimaryColor?: boolean;\n /**\n * Callback to trigger specific events on load of a hotel.\n *\n * This is where you can specify custom fields, language overrides, feature toggles etc.\n */\n onLoad?: () => void;\n}\n\nexport interface ConfigHotel extends ClientHotelConfig, AdminHotelConfig, HasDatalayerTags {}\n\nexport type Hotel = ConfigHotel & {\n lowestPrice?: {\n value: number;\n isLoading: boolean;\n };\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":";;;AAgBA,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 type { EnvironmentName } from '@planpay/web';\nimport { EBookingPaymentMethod, IHotelColorScheme } from '@roomstay/core';\nimport type { ReactChild } from 'react';\n\nimport type { MemberOnlyModalInputs } from '@/components/steps/room/MemberSignInModal/MemberSignInModal.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 type { Language } from '@/providers/LanguageProvider';\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 images?: string[];\n logo: string | ReactChild;\n colors: IHotelColorScheme;\n distanceUnitType: DistanceUnitType;\n startsWeekOnDay?: WeekdayStartsOn;\n crossSellHotelIds?: string[];\n maxOccupancy?: number;\n hideByLine?: boolean;\n transportDistances?: TransportDistances;\n roomGroups: HotelRoomGroupsDTO;\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 memberOnlySignupInputs?: MemberOnlyModalInputs;\n googleMapsImage?: string;\n /**\n * Whether to show the Breakfast / Lunch / Dinner included\n */\n showMealPill?: boolean;\n perks: HotelPerk[];\n /**\n * Hide perks on room row\n */\n perksHideOnRoomRow?: boolean;\n /**\n * Hide perks on room detail modal\n */\n perksHideOnRoomDetail?: boolean;\n perksShowDisclaimer?: boolean;\n /** @deprecated Use the vgs.vaultNames.standard property now */\n vgsVaultName?: string;\n vgs?: {\n vaultNames: IVGSVaultNames;\n };\n showAddonLoader: boolean;\n overwrites?: { [code: string]: Partial<HotelRoomOverwrite> };\n forwardFindReservationToSynxis?: boolean;\n additionalOptions?: { [name: string]: any };\n googleReCaptcha?: {\n loadForMembers?: boolean;\n siteKey?: string;\n };\n /**\n * Show description on RoomDetails\n */\n showDescriptionOnRoomDetails?: boolean;\n /**\n * Customize the Member modal colours. Specifically replacing the green (success) with the primary color of hotel (accent)\n */\n memberOnlyModalUsePrimaryColor?: boolean;\n /**\n * Callback to trigger specific events on load of a hotel.\n *\n * This is where you can specify custom fields, language overrides, feature toggles etc.\n */\n onLoad?: () => void;\n}\n\nexport interface ConfigHotel extends ClientHotelConfig, AdminHotelConfig, HasDatalayerTags {}\n\nexport type Hotel = ConfigHotel & {\n lowestPrice?: {\n value: number;\n isLoading: boolean;\n };\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"]}
|
|
@@ -270,10 +270,10 @@ const AccountReservationSinglePage = () => {
|
|
|
270
270
|
itinerary.roomName,
|
|
271
271
|
" - ",
|
|
272
272
|
itinerary.rateName)),
|
|
273
|
-
react_1.default.createElement("div", { className: "u-marg-bottom" },
|
|
273
|
+
react_1.default.createElement("div", { className: "u-marg-bottom" }, itinerary.guaranteePolicyLongDescription ? (react_1.default.createElement(react_1.default.Fragment, null,
|
|
274
274
|
react_1.default.createElement(Text_1.default, { type: Text_1.TextType.Small, bold: true, className: "u-marg-bottom--light" }, t(Translation_1.Translation.Misc.GuaranteePolicy)),
|
|
275
275
|
react_1.default.createElement(Text_1.default, { type: Text_1.TextType.Small },
|
|
276
|
-
react_1.default.createElement("span", { dangerouslySetInnerHTML: { __html: itinerary.guaranteePolicyLongDescription || '' } }))),
|
|
276
|
+
react_1.default.createElement("span", { dangerouslySetInnerHTML: { __html: itinerary.guaranteePolicyLongDescription || '' } })))) : null),
|
|
277
277
|
react_1.default.createElement(Text_1.default, { type: Text_1.TextType.Small, bold: true, className: "u-marg-bottom--light" }, t(Translation_1.Translation.Misc.CancellationPolicy)),
|
|
278
278
|
react_1.default.createElement(Text_1.default, { type: Text_1.TextType.Small },
|
|
279
279
|
react_1.default.createElement("span", { dangerouslySetInnerHTML: { __html: itinerary.cancellationPolicyLongDescription || '' } })))))))),
|
|
@@ -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;A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OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,CAAC,CAAC,sBAAsB,GACnC,CACA,CACT,CAAC;AACN,CAAC,CAAC;AApPW,QAAA,4BAA4B,gCAoPvC","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 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({ ...itinerary, bookingId: booking.itineraryId, hotel: booking.hotel, hotelId: booking.hotelId });\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 \n {itinerary.roomName} - {itinerary.rateName}\n </Text>\n </div>\n <div className=\"u-marg-bottom\">\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 </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;AAC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AAC,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;AAxPW,QAAA,4BAA4B,gCAwPvC","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 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({ ...itinerary, bookingId: booking.itineraryId, hotel: booking.hotel, hotelId: booking.hotelId });\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 \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"]}
|