@roomstay/frontend 2.7.0 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/177.bundle.js +1 -1
- package/dist/370.bundle.js +1 -1
- package/dist/449.bundle.js +1 -1
- package/dist/836.bundle.js +1 -1
- package/dist/main.bundle.js +1 -1
- package/dist/src/api/AvailabilityAPI.d.ts +19 -0
- package/dist/src/api/AvailabilityAPI.js +84 -0
- package/dist/src/api/AvailabilityAPI.js.map +1 -1
- package/dist/src/api/BaseAPI.d.ts +1 -0
- package/dist/src/api/BaseAPI.js +1 -0
- package/dist/src/api/BaseAPI.js.map +1 -1
- package/dist/src/components/generic/Alert.d.ts +6 -4
- package/dist/src/components/generic/Alert.js +1 -1
- package/dist/src/components/generic/Alert.js.map +1 -1
- package/dist/src/components/generic/Currency.js +5 -30
- package/dist/src/components/generic/Currency.js.map +1 -1
- package/dist/src/components/generic/map/BEHotelLocationMapBlock.d.ts +4 -0
- package/dist/src/components/generic/map/{HotelLocationMap.js → BEHotelLocationMapBlock.js} +10 -3
- package/dist/src/components/generic/map/BEHotelLocationMapBlock.js.map +1 -0
- package/dist/src/components/steps/confirmation/RoomContactDetails.js +20 -14
- package/dist/src/components/steps/confirmation/RoomContactDetails.js.map +1 -1
- package/dist/src/components/steps/confirmation/StepConfirmationForm.js +16 -0
- package/dist/src/components/steps/confirmation/StepConfirmationForm.js.map +1 -1
- package/dist/src/components/steps/date/BEPeoplePickerBlock.d.ts +4 -0
- package/dist/src/components/steps/date/{PeoplePicker.js → BEPeoplePickerBlock.js} +10 -3
- package/dist/src/components/steps/date/BEPeoplePickerBlock.js.map +1 -0
- package/dist/src/components/steps/hotel/HotelCard.js +1 -7
- package/dist/src/components/steps/hotel/HotelCard.js.map +1 -1
- package/dist/src/components/steps/hotel/HotelCardModal.js +1 -1
- package/dist/src/components/steps/hotel/HotelCardModal.js.map +1 -1
- package/dist/src/components/steps/room/TabGroupedRooms/TabGroupedRoomList.js +10 -1
- package/dist/src/components/steps/room/TabGroupedRooms/TabGroupedRoomList.js.map +1 -1
- package/dist/src/components/summary/BEMobileSummaryModal.js +9 -3
- package/dist/src/components/summary/BEMobileSummaryModal.js.map +1 -1
- package/dist/src/components/summary/BESummary.js +17 -4
- package/dist/src/components/summary/BESummary.js.map +1 -1
- package/dist/src/contexts/CompanyContext/CompanyContextType.type.d.ts +1 -1
- package/dist/src/contexts/CompanyContext/CompanyContextType.type.js.map +1 -1
- package/dist/src/contexts/CompanyContext/CompanyContextWrapper.js +39 -25
- package/dist/src/contexts/CompanyContext/CompanyContextWrapper.js.map +1 -1
- package/dist/src/hooks/Currency.d.ts +25 -1
- package/dist/src/hooks/Currency.js +50 -5
- package/dist/src/hooks/Currency.js.map +1 -1
- package/dist/src/index.d.ts +8 -8
- package/dist/src/index.js +16 -10
- package/dist/src/index.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/pages/hotel/HotelInfo.js +3 -3
- package/dist/src/pages/hotel/HotelInfo.js.map +1 -1
- package/dist/src/pages/steps/StepDate/StepDateComponent.js +2 -2
- package/dist/src/pages/steps/StepDate/StepDateComponent.js.map +1 -1
- package/dist/src/pages/steps/StepHotel/StepHotelComponent.js +1 -3
- package/dist/src/pages/steps/StepHotel/StepHotelComponent.js.map +1 -1
- package/dist/src/pages/steps/StepThanks/StepThanksComponent.d.ts +2 -0
- package/dist/src/pages/steps/StepThanks/StepThanksComponent.js +8 -1
- package/dist/src/pages/steps/StepThanks/StepThanksComponent.js.map +1 -1
- package/dist/src/providers/CurrencyProvider.js +1 -1
- package/dist/src/providers/CurrencyProvider.js.map +1 -1
- package/dist/src/providers/FilterProvider.d.ts +4 -0
- package/dist/src/providers/FilterProvider.js +12 -0
- package/dist/src/providers/FilterProvider.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/src/util/CurrencyHelper.js +1 -1
- package/dist/src/util/CurrencyHelper.js.map +1 -1
- package/dist/test.bundle.js +1 -1
- package/dist/tests/offline/entry/config/hotelSpecDefault.js +2 -2
- package/dist/tests/offline/entry/config/hotelSpecDefault.js.map +1 -1
- package/dist/vendors.bundle.js +1 -1
- package/package.json +2 -2
- package/dist/src/components/generic/map/HotelLocationMap.d.ts +0 -2
- package/dist/src/components/generic/map/HotelLocationMap.js.map +0 -1
- package/dist/src/components/steps/date/PeoplePicker.d.ts +0 -2
- package/dist/src/components/steps/date/PeoplePicker.js.map +0 -1
|
@@ -3,14 +3,21 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.BE_HOTEL_LOCATION_MAP_BLOCK = void 0;
|
|
7
|
+
exports.OriginalHotelLocationMapBlock = OriginalHotelLocationMapBlock;
|
|
8
|
+
exports.default = BEHotelLocationMapBlock;
|
|
7
9
|
const hooks_1 = require("../../../hooks/index.js");
|
|
8
10
|
const react_1 = __importDefault(require("react"));
|
|
9
11
|
const BEMapWidget_1 = __importDefault(require("../../summary/BEMapWidget"));
|
|
10
|
-
|
|
12
|
+
const DIProvider_1 = require("../../../providers/DIProvider");
|
|
13
|
+
exports.BE_HOTEL_LOCATION_MAP_BLOCK = 'BEHotelLocationMapBlock';
|
|
14
|
+
function OriginalHotelLocationMapBlock() {
|
|
11
15
|
const { hotel } = (0, hooks_1.useCurrentHotel)();
|
|
12
16
|
if (!hotel)
|
|
13
17
|
return react_1.default.createElement(react_1.default.Fragment, null);
|
|
14
18
|
return react_1.default.createElement(react_1.default.Fragment, null, hotel.latitude && hotel.longitude ? react_1.default.createElement(BEMapWidget_1.default, { mapLatLng: { lat: hotel.latitude, lng: hotel.longitude } }) : null);
|
|
15
19
|
}
|
|
16
|
-
|
|
20
|
+
function BEHotelLocationMapBlock() {
|
|
21
|
+
return (0, DIProvider_1.withDI)(exports.BE_HOTEL_LOCATION_MAP_BLOCK, OriginalHotelLocationMapBlock, null);
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=BEHotelLocationMapBlock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BEHotelLocationMapBlock.js","sourceRoot":"/","sources":["src/components/generic/map/BEHotelLocationMapBlock.tsx"],"names":[],"mappings":";;;;;;AAQA,sEAMC;AAED,0CAEC;AAlBD,2CAAkD;AAClD,kDAA0B;AAE1B,mFAA2D;AAC3D,uDAAgD;AAEnC,QAAA,2BAA2B,GAAG,yBAAyB,CAAC;AAErE,SAAgB,6BAA6B;IACzC,MAAM,EAAE,KAAK,EAAE,GAAG,IAAA,uBAAe,GAAE,CAAC;IAEpC,IAAI,CAAC,KAAK;QAAE,OAAO,6DAAK,CAAC;IAEzB,OAAO,8DAAG,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,8BAAC,qBAAW,IAAC,SAAS,EAAE,EAAE,GAAG,EAAE,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,KAAK,CAAC,SAAS,EAAE,GAAI,CAAC,CAAC,CAAC,IAAI,CAAI,CAAC;AACvI,CAAC;AAED,SAAwB,uBAAuB;IAC3C,OAAO,IAAA,mBAAM,EAAC,mCAA2B,EAAE,6BAA6B,EAAE,IAAI,CAAC,CAAC;AACpF,CAAC","sourcesContent":["import { useCurrentHotel } from '@frontend/hooks';\nimport React from 'react';\n\nimport BEMapWidget from '@/components/summary/BEMapWidget';\nimport { withDI } from '@/providers/DIProvider';\n\nexport const BE_HOTEL_LOCATION_MAP_BLOCK = 'BEHotelLocationMapBlock';\n\nexport function OriginalHotelLocationMapBlock() {\n const { hotel } = useCurrentHotel();\n\n if (!hotel) return <></>;\n\n return <>{hotel.latitude && hotel.longitude ? <BEMapWidget mapLatLng={{ lat: hotel.latitude, lng: hotel.longitude }} /> : null}</>;\n}\n\nexport default function BEHotelLocationMapBlock() {\n return withDI(BE_HOTEL_LOCATION_MAP_BLOCK, OriginalHotelLocationMapBlock, null);\n}\n"]}
|
|
@@ -187,7 +187,7 @@ const RoomContactDetails = () => {
|
|
|
187
187
|
return null;
|
|
188
188
|
};
|
|
189
189
|
return (react_1.default.createElement(react_1.default.Fragment, null, fields.map((field, index) => {
|
|
190
|
-
var _a, _b, _c, _d, _e;
|
|
190
|
+
var _a, _b, _c, _d, _e, _f;
|
|
191
191
|
const padInputName = (name) => padInputNameByRoomNumber(name, index);
|
|
192
192
|
const getValidationClass = (name) => {
|
|
193
193
|
var _a, _b, _c;
|
|
@@ -218,8 +218,7 @@ const RoomContactDetails = () => {
|
|
|
218
218
|
// Build list of auxiliary inputs the user is required to complete
|
|
219
219
|
const roomGroup = (_a = hotel === null || hotel === void 0 ? void 0 : hotel.roomGroups) === null || _a === void 0 ? void 0 : _a.find(({ id }) => id === currentRoom.roomGroupId);
|
|
220
220
|
const requiredInputs = [];
|
|
221
|
-
for (const inputKey of Object.
|
|
222
|
-
const input = roomGroup === null || roomGroup === void 0 ? void 0 : roomGroup.filters[inputKey];
|
|
221
|
+
for (const [inputKey, input] of Object.entries((_b = roomGroup === null || roomGroup === void 0 ? void 0 : roomGroup.filters) !== null && _b !== void 0 ? _b : {})) {
|
|
223
222
|
const values = (_d = (_c = currentRoom === null || currentRoom === void 0 ? void 0 : currentRoom.auxiliaryValues) === null || _c === void 0 ? void 0 : _c[inputKey]) === null || _d === void 0 ? void 0 : _d.map((value) => value.toString());
|
|
224
223
|
if ((input === null || input === void 0 ? void 0 : input.requireInput) && values) {
|
|
225
224
|
// Reduce available options to those assigned to the room
|
|
@@ -236,14 +235,22 @@ const RoomContactDetails = () => {
|
|
|
236
235
|
setValue(padInputName(requiredInputId), filterValue[inputKey]);
|
|
237
236
|
}
|
|
238
237
|
// Convert options to format acceptable by the input
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
label:
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
238
|
+
const auxiliaryFilterOption = options
|
|
239
|
+
.map((option) => {
|
|
240
|
+
var _a;
|
|
241
|
+
return { label: option.label, value: `${option.value}`, order: (_a = option.order) !== null && _a !== void 0 ? _a : 0 };
|
|
242
|
+
})
|
|
243
|
+
.sort((a, b) => a.order - b.order);
|
|
244
|
+
if (auxiliaryFilterOption.length > 0) {
|
|
245
|
+
// Only add to requiredInputs if there are available options to display
|
|
246
|
+
requiredInputs.push({
|
|
247
|
+
id: requiredInputId,
|
|
248
|
+
name: input.name,
|
|
249
|
+
label: input.name,
|
|
250
|
+
options: auxiliaryFilterOption,
|
|
251
|
+
order: (_e = input.order) !== null && _e !== void 0 ? _e : 0,
|
|
252
|
+
});
|
|
253
|
+
}
|
|
247
254
|
}
|
|
248
255
|
}
|
|
249
256
|
// The Country input field will be included in different places, depending on whether the State field is enabled or not.
|
|
@@ -281,7 +288,7 @@ const RoomContactDetails = () => {
|
|
|
281
288
|
showChildren ? (react_1.default.createElement(react_1.default.Fragment, null,
|
|
282
289
|
",\u00A0",
|
|
283
290
|
StringHelper_1.default.pluralWithDictAndCount(basketRow.getChildren(), Translation_1.Translation.Step.Date.Child, t))) : null,
|
|
284
|
-
((
|
|
291
|
+
((_f = hotel === null || hotel === void 0 ? void 0 : hotel.childConfiguration) === null || _f === void 0 ? void 0 : _f.supportInfants) ? (react_1.default.createElement(react_1.default.Fragment, null,
|
|
285
292
|
",\u00A0",
|
|
286
293
|
StringHelper_1.default.pluralWithDictAndCount(basketRow.getInfants(), Translation_1.Translation.Step.Date.Infant, t))) : null),
|
|
287
294
|
react_1.default.createElement("div", { className: "step-one-status--dates u-flex justify-content-start" },
|
|
@@ -412,14 +419,13 @@ const RoomContactDetails = () => {
|
|
|
412
419
|
requiredInputs.length > 0 && (react_1.default.createElement("div", { className: "rs-checkout-required-inputs u-marg-top" },
|
|
413
420
|
react_1.default.createElement("div", { className: "u-marg-top" },
|
|
414
421
|
react_1.default.createElement(InputGroup_1.default, { dimensions: "2/2" }, requiredInputs.map((input) => {
|
|
415
|
-
const options = input.options;
|
|
416
422
|
return (react_1.default.createElement(react_hook_form_1.Controller, { key: input.id, control: control, name: padInputName(input.id), rules: { required: true }, render: ({ field }) => {
|
|
417
423
|
const { ref } = field, rest = __rest(field, ["ref"]);
|
|
418
424
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
419
425
|
react_1.default.createElement("div", { className: "u-marg-bottom--light" },
|
|
420
426
|
react_1.default.createElement(Text_1.default, { type: Text_1.TextType.Small },
|
|
421
427
|
react_1.default.createElement("strong", null, input.name))),
|
|
422
|
-
react_1.default.createElement(Select_1.InputSelect, Object.assign({ key: input.id, keyName: (0, core_1.nameof)('value'), labelName: (0, core_1.nameof)('label'), options: options, placeholder: "Please Select *", validationStatus: getValidationClass(input.id) }, rest))));
|
|
428
|
+
react_1.default.createElement(Select_1.InputSelect, Object.assign({ key: input.id, keyName: (0, core_1.nameof)('value'), labelName: (0, core_1.nameof)('label'), options: input.options, placeholder: "Please Select *", validationStatus: getValidationClass(input.id) }, rest))));
|
|
423
429
|
} }));
|
|
424
430
|
}))))),
|
|
425
431
|
react_1.default.createElement(CaptureChildAges, { hotel: hotel, numberOfChildrens: Number(basketRow.getChildren()), control: control, roomIndex: index })),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RoomContactDetails.js","sourceRoot":"/","sources":["src/components/steps/confirmation/RoomContactDetails.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAA0E;AAC1E,2CAAkD;AAClD,yCAA8F;AAC9F,iEAAyC;AACzC,+CAAmE;AACnE,qDAAiG;AACjG,iDAA+C;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,8BAAC,oBAAU,IAAC,UAAU,EAAC,OAAO,EAAC,GAAG,EAAE,cAAc,UAAU,EAAE,IACzD,UAAU,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,EAAE;YAChD,OAAO,CACH,8BAAC,4BAAU,IACP,GAAG,EAAE,EAAE,EACP,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,IAAW,EACjB,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,EACzB,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;oBAClB,MAAM,EAAE,GAAG,KAAc,KAAK,EAAd,IAAI,UAAK,KAAK,EAAxB,OAAgB,CAAQ,CAAC;oBAC/B,OAAO,CACH;wBACI,uCAAK,SAAS,EAAC,sBAAsB;4BACjC,8BAAC,cAAI,IAAC,IAAI,EAAE,eAAQ,CAAC,KAAK;gCACtB,8CAAS,KAAK,CAAU,CACrB,CACL;wBACN,8BAAC,oBAAW,kBACR,OAAO,EAAC,OAAO,EACf,SAAS,EAAC,OAAO,EACjB,OAAO,EAAE,UAAU,EACnB,WAAW,EAAC,iBAAiB,IACzB,IAAI,IACR,gBAAgB,EAAE,kBAAkB,CAAC,UAAU,CAAC,IAClD,CACH,CACN,CAAC;gBACN,CAAC,GACH,CACL,CAAC;QACN,CAAC,CAAC,CACO,CAChB,CAAC;IACN,CAAC,CAAC,CACA,CACT,CAAC;AACN,CAAC,CAAC;AACF,kBAAe,kBAAkB,CAAC","sourcesContent":["import { BasketContext, RoomstayMemberContext } from '@frontend/contexts';\nimport { useCurrentHotel } from '@frontend/hooks';\nimport { EBookingPaymentMethod, EHotelStateFieldConfiguration, nameof } from '@roomstay/core';\nimport cloneDeep from 'lodash/cloneDeep';\nimport React, { FC, useContext, useEffect, useState } from 'react';\nimport { Control, Controller, FieldError, useFieldArray, useFormContext } from 'react-hook-form';\nimport { useTranslation } from 'react-i18next';\nimport { Translation } from 'translations/Translation';\n\nimport AutoAutoHeight from '@/animations/AutoAutoHeight';\nimport Alert, { AlertType } from '@/components/generic/Alert';\nimport Checkbox from '@/components/generic/Checkbox/Checkbox';\nimport EnhancedPhoneNumberField from '@/components/generic/custom/EnhancedPhoneNumberField/EnhancedPhoneNumberField';\nimport Headline from '@/components/generic/Headline';\nimport Icon, { IconType } from '@/components/generic/Icon/Icon';\nimport InputGroup from '@/components/generic/InputGroup/InputGroup';\nimport { InputSelect } from '@/components/generic/Select';\nimport Text, { TextType } from '@/components/generic/Text';\nimport TextBox from '@/components/generic/TextBox';\nimport StepConfirmationCountrySelector from '@/components/steps/confirmation/StepConfirmationCountrySelector';\nimport { useSearchScopeHook } from '@/hooks/useSearchScopeHook';\nimport { EHotelAddressRequirement, Hotel } from '@/models/Client/Hotel/Hotel';\nimport { ConfirmationFormValues, EUserProfileFormKey, EUserRequiredInputFormKey, TUserProfileFormValues } from '@/models/Confirmation';\nimport E164PhoneNumberFieldFeature from '@/providers/feature/E164PhoneNumberFieldFeature';\nimport GuestTitleFieldFeature from '@/providers/feature/GuestTitleFieldFeature';\nimport { Color } from '@/util/Color';\nimport DataLayer, { InteractionStep, InteractionType } from '@/util/DataLayer';\nimport StringHelper from '@/util/StringHelper';\nimport { EMAIL_REGEX } from '@/util/Validation';\n\ntype AuxiliaryFilterSelect = {\n id: string;\n name: string;\n label: string;\n options: AuxiliaryFilterOption[];\n};\n\ntype AuxiliaryFilterOption = {\n label: string;\n value: string;\n};\n\nconst RoomContactDetails: FC = () => {\n const { register, formState, control, watch, getValues, setValue } = useFormContext<ConfirmationFormValues>();\n const basketContext = useContext(BasketContext);\n const basketRows = basketContext.getAllValidRows();\n const { hotel } = useCurrentHotel();\n\n const isAddressRequired = hotel?.addressRequirement === EHotelAddressRequirement.FullAddressRequired;\n const isCountryRequired =\n hotel?.addressRequirement === EHotelAddressRequirement.FullAddressRequired || hotel?.addressRequirement === EHotelAddressRequirement.AddressOptionalCountryRequired;\n\n const addressPlaceholder = (placeholder: string, required: boolean): string => placeholder + (required ? ' *' : '');\n\n const { update, fields } = useFieldArray({\n control,\n name: 'userProfiles',\n rules: {\n required: false,\n },\n });\n const [copyCheckBox, paymentMethod] = watch(['copyCheckBox', 'paymentMethod']);\n\n const errors = formState.errors;\n\n const { t } = useTranslation();\n const { roomstayMember: member } = useContext(RoomstayMemberContext);\n const { showChildren } = useSearchScopeHook();\n\n useEffect(() => {\n errors.userProfiles?.forEach?.((_, index) => {\n if (errors.userProfiles?.[index]) {\n opens[index] = true;\n }\n });\n setOpens(opens.slice(0));\n }, [errors.userProfiles, copyCheckBox]);\n\n useEffect(() => {\n const getDefaultValue = (index: number, potentialDefaultValue = '') => {\n return index === 0 ? potentialDefaultValue : '';\n };\n\n const userProfiles = basketRows.map((basketRow, index) => {\n const defaults = basketRow.checkoutDefaults;\n const addr = defaults?.address;\n\n return {\n [EUserProfileFormKey.Title]: '', // TODO: Add this to @roomstay/core IRoomstayMember?\n [EUserProfileFormKey.Forename]: getDefaultValue(index, defaults?.firstName ?? member?.forename),\n [EUserProfileFormKey.Surname]: getDefaultValue(index, defaults?.lastName ?? member?.surname),\n [EUserProfileFormKey.Email]: getDefaultValue(index, defaults?.email ?? member?.email),\n [EUserProfileFormKey.Phone]: getDefaultValue(index, defaults?.phone ?? member?.phoneNumber),\n [EUserProfileFormKey.Address]: getDefaultValue(index, addr?.line1 ?? member?.address?.address),\n [EUserProfileFormKey.City]: getDefaultValue(index, addr?.city ?? member?.address?.city),\n [EUserProfileFormKey.PostCode]: getDefaultValue(index, addr?.postalCode ?? member?.address?.zip),\n [EUserProfileFormKey.State]: getDefaultValue(index, addr?.state ?? member?.address?.state),\n [EUserProfileFormKey.Country]: getDefaultValue(index, addr?.country ?? member?.address?.country),\n [EUserProfileFormKey.CountryId]: getDefaultValue(index, addr?.countryId?.toString()),\n [EUserProfileFormKey.CountryCode]: getDefaultValue(index, addr?.countryCode),\n [EUserRequiredInputFormKey.AuxInputs]: basketRow.auxiliaryFilter,\n };\n });\n setValue('userProfiles', userProfiles);\n setValue('copyCheckBox', !!(basketRows?.length && basketRows.length > 1));\n }, [member, basketRows?.length]);\n\n const padInputNameByRoomNumber = (name: EUserProfileFormKey, index: number) => `userProfiles.${index}.${name}` as const;\n\n const [opens, setOpens] = useState<boolean[]>(basketRows.map((basketRow, index) => index === 0));\n\n const copyUserProfileFormFields = (currentIndex: number) => {\n const values = cloneDeep(getValues(`userProfiles.0`));\n const currentValues = cloneDeep(getValues(`userProfiles.${currentIndex}`));\n\n // Exclude AuxInputs\n values[EUserRequiredInputFormKey.AuxInputs] = currentValues.AuxInputs;\n\n // Exclude Child Ages\n values.CaptureChildAge = currentValues.CaptureChildAge;\n\n return values;\n };\n\n const onInputChange =\n (fieldName: string, interactionName: string) =>\n (event: any): void => {\n DataLayer.instance.sendInteraction(interactionName, InteractionType.FORM_FIELD, InteractionStep.GUEST_DETAILS);\n };\n\n useEffect(() => {\n if (copyCheckBox)\n fields.forEach((basketRow, index) => {\n if (index === 0) return;\n const values = copyUserProfileFormFields(index);\n update(index, values);\n });\n }, [copyCheckBox]);\n\n useEffect(() => {\n const { unsubscribe } = watch((allFields, { name, type }) => {\n if (type === 'change' && name?.includes('userProfiles') && name.split('.')[1] === '0' && allFields.copyCheckBox) {\n fields.map((field, index) => {\n if (index === 0) return;\n const values = copyUserProfileFormFields(index);\n update(index, values);\n });\n }\n });\n\n return () => {\n unsubscribe();\n };\n }, [fields]);\n\n const setOpenByIndex = (index: number, value: boolean) => {\n opens.splice(index, 1, value);\n setOpens(opens.slice(0));\n };\n\n const renderError = (userProfileIndex: number): JSX.Element[] | null => {\n const userProfile = errors.userProfiles?.[userProfileIndex];\n\n if (userProfile && formState.submitCount >= 1 && (userProfileIndex === 0 || !copyCheckBox))\n return Object.values(userProfile).map((error, errorIndex) => {\n return (\n <AutoAutoHeight key={errorIndex} open>\n <div className=\"u-flex\">\n <Alert icon={IconType.Error} type={AlertType.Danger} noMargin={errorIndex === Object.keys(userProfile).length - 1}>\n <Text type={TextType.Small}>{(error as FieldError)?.message}</Text>\n </Alert>\n </div>\n </AutoAutoHeight>\n );\n });\n\n return null;\n };\n\n return (\n <>\n {fields.map((field, index) => {\n const padInputName = (name: EUserProfileFormKey) => padInputNameByRoomNumber(name, index);\n const getValidationClass = (name: EUserProfileFormKey) => {\n if (!errors.userProfiles || (copyCheckBox && index >= 1)) return;\n if (errors.userProfiles[index]?.[name]) {\n return 'error';\n // Hack to get Aux Inputs to validate as well.\n } else if (errors.userProfiles[index]?.AuxInputs?.[name.replace('AuxInputs.', '')]) {\n return 'error';\n } else {\n return 'success';\n }\n };\n\n const openExpandable = () => {\n if (index !== 0) {\n setOpenByIndex(index, !opens[index]);\n }\n };\n\n const basketRow = basketRows[index];\n const currentRoom = basketRow.getRoom();\n const filterValue = basketRow.getAuxiliaryFilter();\n\n const isDisabled = (copyCheckBox && index >= 1) || paymentMethod === EBookingPaymentMethod.Planpay;\n\n const includeStateField =\n hotel?.stateFieldConfiguration === EHotelStateFieldConfiguration.Optional || hotel?.stateFieldConfiguration === EHotelStateFieldConfiguration.Required;\n const stateFieldRequired = hotel?.stateFieldConfiguration === EHotelStateFieldConfiguration.Required;\n\n // Build list of auxiliary inputs the user is required to complete\n const roomGroup = hotel?.roomGroups?.find(({ id }) => id === currentRoom.roomGroupId);\n const requiredInputs: AuxiliaryFilterSelect[] = [];\n\n for (const inputKey of Object.keys(roomGroup?.filters ?? {})) {\n const input = roomGroup?.filters[inputKey];\n const values = currentRoom?.auxiliaryValues?.[inputKey]?.map((value) => value.toString());\n\n if (input?.requireInput && values) {\n // Reduce available options to those assigned to the room\n const options = input.options.filter((option) => {\n if (values.includes(option.value.toString())) {\n return option;\n }\n });\n\n const requiredInputId = `${nameof<TUserProfileFormValues>('AuxInputs')}.${inputKey}`;\n\n if (options.length === 1) {\n setValue(padInputName(requiredInputId as any), options[0].value as never);\n } else if (filterValue?.[inputKey]) {\n setValue(padInputName(requiredInputId as any), filterValue[inputKey] as never);\n }\n\n // Convert options to format acceptable by the input\n requiredInputs.push({\n id: requiredInputId,\n name: input.name,\n label: input.name,\n options: options.map((option: any) => {\n return { label: option.label, value: option.value };\n }),\n });\n }\n }\n\n // The Country input field will be included in different places, depending on whether the State field is enabled or not.\n const countryInputField = (\n <Controller\n control={control}\n name={padInputName(EUserProfileFormKey.Country)}\n rules={{\n required: {\n value: isCountryRequired,\n message: t(Translation.Step.Confirmation.Inputs.Required, { field: t(Translation.Step.Confirmation.Inputs.Country) }),\n },\n }}\n render={({ field }) => {\n const { ref, onChange, ...rest } = field;\n return (\n <StepConfirmationCountrySelector\n ref={ref}\n disableOpenOnFocus\n disabled={isDisabled}\n validationStatus={getValidationClass(EUserProfileFormKey.Country)}\n onChange={(e) => {\n onChange(e);\n onInputChange(padInputName(EUserProfileFormKey.Country), 'Country - Address')(e);\n }}\n onChangeId={(id) => {\n setValue(padInputName(EUserProfileFormKey.CountryId), id as never); // Hack to make CountryID be set...\n }}\n onChangeCode={(code) => {\n setValue(padInputName(EUserProfileFormKey.CountryCode), code as never); // Hack to make CountryID be set...\n }}\n required={isCountryRequired}\n {...rest}\n />\n );\n }}\n />\n );\n\n return (\n <div key={field.id} className=\"rs-checkout-contact-details\">\n <div className={index === 0 ? '' : 'u-marg-bottom--heavy'}>\n <div className=\"u-marg-bottom\" onClick={openExpandable}>\n <div className=\"u-flex u-marg-bottom align-items-center\">\n <Headline bold>\n {t(Translation.Misc.Room)} {index + 1}\n </Headline>\n {index !== 0 && <Icon icon={opens[index] ? IconType.ArrowDown2 : IconType.ArrowUp2} color={Color.Grey} />}\n </div>\n {basketRow && (\n <div className=\"u-marg-bottom\">\n <Text>\n <strong className=\"u-block@l-\">{basketRow.getRoom().name}</strong> for{' '}\n {StringHelper.pluralWithDictAndCount(basketRow.getAdults(), Translation.Step.Date.Adult, t)}\n {showChildren ? (\n <>\n , \n {StringHelper.pluralWithDictAndCount(basketRow.getChildren(), Translation.Step.Date.Child, t)}\n </>\n ) : null}\n {hotel?.childConfiguration?.supportInfants ? (\n <>\n , \n {StringHelper.pluralWithDictAndCount(basketRow.getInfants(), Translation.Step.Date.Infant, t)}\n </>\n ) : null}\n </Text>\n <div className=\"step-one-status--dates u-flex justify-content-start\">\n <Text type={TextType.Small} color={Color.Accent}>\n <strong>{basketRow.getStartDate().format('ddd, MMM D')}</strong>\n </Text>\n <Icon icon={IconType.ArrowRight2} size=\"18px\" />\n <Text type={TextType.Small} color={Color.Accent}>\n <strong>{basketRow.getEndDate().format('ddd, MMM D')}</strong>\n </Text>\n </div>\n </div>\n )}\n {renderError(index)}\n </div>\n <div className=\"room-contact-details--row\" style={{ maxHeight: opens[index] ? undefined : 0 }}>\n <div className=\"u-marg-bottom--heavy rs-checkout-contact-info\">\n <div className=\"u-marg-bottom--light\">\n <Text type={TextType.Small}>\n <strong>{t(Translation.Step.Confirmation.ContactInfo)}</strong>\n </Text>\n </div>\n\n <InputGroup dimensions={GuestTitleFieldFeature.isActive() ? '1/2/2' : '2/2'}>\n {GuestTitleFieldFeature.isActive() && (\n <Controller\n control={control}\n name={padInputName(EUserProfileFormKey.Title)}\n rules={{ required: true }}\n render={({ field }) => {\n const { ref, ...rest } = field;\n\n return (\n <InputSelect\n keyName=\"value\"\n labelName=\"label\"\n options={GuestTitleFieldFeature.getTitleOptions()}\n placeholder={t(Translation.Step.Confirmation.Inputs.Title) + ' *'}\n required\n validationStatus={getValidationClass(EUserProfileFormKey.Title)}\n {...rest}\n />\n );\n }}\n />\n )}\n <TextBox\n inputProps={{\n disabled: isDisabled,\n }}\n placeholder={t(Translation.Step.Confirmation.Inputs.Forename) + ' *'}\n wide\n required\n validationStatus={getValidationClass(EUserProfileFormKey.Forename)}\n {...register(padInputName(EUserProfileFormKey.Forename), {\n onChange: onInputChange(padInputName(EUserProfileFormKey.Forename), 'Forename - Contact Info'),\n required: {\n value: true,\n message: t(Translation.Step.Confirmation.Inputs.Required, { field: t(Translation.Step.Confirmation.Inputs.Forename) }),\n },\n })}\n />\n <TextBox\n inputProps={{\n disabled: isDisabled,\n }}\n placeholder={t(Translation.Step.Confirmation.Inputs.Surname) + ' *'}\n wide\n required\n validationStatus={getValidationClass(EUserProfileFormKey.Surname)}\n {...register(padInputName(EUserProfileFormKey.Surname), {\n onChange: onInputChange(padInputName(EUserProfileFormKey.Surname), 'Surname - Contact Info'),\n required: {\n value: true,\n message: t(Translation.Step.Confirmation.Inputs.Required, { field: t(Translation.Step.Confirmation.Inputs.Surname) }),\n },\n })}\n />\n </InputGroup>\n\n <InputGroup dimensions=\"2/2\">\n <TextBox\n inputProps={{\n disabled: isDisabled,\n }}\n placeholder={t(Translation.Step.Confirmation.Inputs.Email) + ' *'}\n wide\n validationStatus={getValidationClass(EUserProfileFormKey.Email)}\n required\n {...register(padInputName(EUserProfileFormKey.Email), {\n onChange: onInputChange(padInputName(EUserProfileFormKey.Email), 'Email - Contact Info'),\n required: {\n value: true,\n message: t(Translation.Step.Confirmation.Inputs.Required, { field: t(Translation.Step.Confirmation.Inputs.Email) }),\n },\n pattern: {\n value: EMAIL_REGEX,\n message: t(Translation.Step.Confirmation.Inputs.InvalidEmail),\n },\n })}\n />\n {E164PhoneNumberFieldFeature.isActive() ? (\n <Controller\n control={control}\n name={padInputName(EUserProfileFormKey.Phone)}\n rules={{\n required: {\n value: true,\n message: t(Translation.Step.Confirmation.Inputs.Required, { field: t(Translation.Step.Confirmation.Inputs.Phone) }),\n },\n minLength: {\n value: 5,\n message: 'Phone number is required',\n },\n maxLength: {\n value: 17,\n message: 'Phone number is too long',\n },\n pattern: {\n value: /^[1-9]( |\\d){1,15}$/g,\n message: 'Incorrect phone number entered',\n },\n }}\n render={({ field }) => {\n return (\n <EnhancedPhoneNumberField\n disabled={isDisabled}\n validationStatus={getValidationClass(EUserProfileFormKey.Phone)}\n {...field}\n onChange={(e: any) => {\n field.onChange(e);\n onInputChange(padInputName(EUserProfileFormKey.Phone), 'Phone - Contact Info')(e);\n }}\n />\n );\n }}\n />\n ) : (\n <TextBox\n inputProps={{\n disabled: isDisabled,\n }}\n placeholder={t(Translation.Step.Confirmation.Inputs.Phone) + ' *'}\n wide\n required\n validationStatus={getValidationClass(EUserProfileFormKey.Phone)}\n {...register(padInputName(EUserProfileFormKey.Phone), {\n onChange: onInputChange(padInputName(EUserProfileFormKey.Phone), 'Phone - Contact Info'),\n required: {\n value: true,\n message: t(Translation.Step.Confirmation.Inputs.Required, { field: t(Translation.Step.Confirmation.Inputs.Phone) }),\n },\n })}\n />\n )}\n </InputGroup>\n </div>\n <div className=\"rs-checkout-contact-info-address\">\n <div className=\"u-marg-bottom--light\">\n <Text type={TextType.Small}>\n <strong>{t(Translation.Step.Confirmation.Address)}</strong>\n </Text>\n </div>\n\n <InputGroup dimensions=\"3/1\">\n <TextBox\n inputProps={{\n disabled: isDisabled,\n }}\n placeholder={addressPlaceholder(t(Translation.Step.Confirmation.Inputs.Address), isAddressRequired)}\n wide\n required={isAddressRequired}\n validationStatus={getValidationClass(EUserProfileFormKey.Address)}\n {...register(padInputName(EUserProfileFormKey.Address), {\n onChange: onInputChange(padInputName(EUserProfileFormKey.Address), 'Address - Address'),\n required: {\n value: isAddressRequired,\n message: t(Translation.Step.Confirmation.Inputs.Required, { field: t(Translation.Step.Confirmation.Inputs.Address) }),\n },\n })}\n />\n <TextBox\n inputProps={{\n disabled: isDisabled,\n }}\n placeholder={addressPlaceholder(t(Translation.Step.Confirmation.Inputs.City), isAddressRequired)}\n wide\n required={isAddressRequired}\n validationStatus={getValidationClass(EUserProfileFormKey.City)}\n {...register(padInputName(EUserProfileFormKey.City), {\n onChange: onInputChange(padInputName(EUserProfileFormKey.City), 'City - Address'),\n required: {\n value: isAddressRequired,\n message: t(Translation.Step.Confirmation.Inputs.Required, { field: t(Translation.Step.Confirmation.Inputs.City) }),\n },\n })}\n />\n </InputGroup>\n <InputGroup dimensions=\"2/2\">\n <TextBox\n inputProps={{\n disabled: isDisabled,\n }}\n placeholder={addressPlaceholder(t(Translation.Step.Confirmation.Inputs.PostCode), isAddressRequired)}\n wide\n required={isAddressRequired}\n validationStatus={getValidationClass(EUserProfileFormKey.PostCode)}\n {...register(padInputName(EUserProfileFormKey.PostCode), {\n onChange: onInputChange(padInputName(EUserProfileFormKey.PostCode), 'PostCode - Address'),\n required: {\n value: isAddressRequired,\n message: t(Translation.Step.Confirmation.Inputs.Required, { field: t(Translation.Step.Confirmation.Inputs.PostCode) }),\n },\n })}\n />\n\n {includeStateField ? (\n // Render the State field here if it's required, otherwise render the Country field\n <TextBox\n inputProps={{\n disabled: isDisabled,\n }}\n placeholder={t(Translation.Step.Confirmation.Inputs.State) + (stateFieldRequired ? ' *' : '')}\n wide\n required={stateFieldRequired}\n validationStatus={getValidationClass(EUserProfileFormKey.State)}\n {...register(padInputName(EUserProfileFormKey.State), {\n onChange: onInputChange(padInputName(EUserProfileFormKey.State), 'State - Address'),\n required: {\n value: stateFieldRequired,\n message: t(Translation.Step.Confirmation.Inputs.Required, { field: t(Translation.Step.Confirmation.Inputs.State) }),\n },\n })}\n />\n ) : (\n countryInputField\n )}\n </InputGroup>\n\n {includeStateField && <InputGroup dimensions=\"1\">{countryInputField}</InputGroup>}\n </div>\n </div>\n {requiredInputs.length > 0 && (\n <div className=\"rs-checkout-required-inputs u-marg-top\">\n <div className=\"u-marg-top\">\n <InputGroup dimensions=\"2/2\">\n {requiredInputs.map((input) => {\n const options = input.options;\n return (\n <Controller\n key={input.id}\n control={control}\n name={padInputName(input.id as any)}\n rules={{ required: true }}\n render={({ field }) => {\n const { ref, ...rest } = field;\n\n return (\n <>\n <div className=\"u-marg-bottom--light\">\n <Text type={TextType.Small}>\n <strong>{input.name}</strong>\n </Text>\n </div>\n <InputSelect\n key={input.id}\n keyName={nameof<AuxiliaryFilterOption>('value')}\n labelName={nameof<AuxiliaryFilterOption>('label')}\n options={options}\n placeholder=\"Please Select *\"\n validationStatus={getValidationClass(input.id as any)}\n {...rest}\n />\n </>\n );\n }}\n />\n );\n })}\n </InputGroup>\n </div>\n </div>\n )}\n\n <CaptureChildAges hotel={hotel} numberOfChildrens={Number(basketRow.getChildren())} control={control} roomIndex={index} />\n </div>\n {fields.length > 1 && index === 0 ? (\n <div className=\"u-marg-bottom--heavy\">\n <Checkbox label={t(Translation.Step.Confirmation.ApplySameInfoToOtherRooms)} {...register('copyCheckBox')} />\n </div>\n ) : null}\n </div>\n );\n })}\n </>\n );\n};\n\nfunction chunkArray<T>(array: T[], chunkSize: number): T[][] {\n const result: T[][] = [];\n for (let i = 0; i < array.length; i += chunkSize) {\n result.push(array.slice(i, i + chunkSize));\n }\n return result;\n}\n\nconst CaptureChildAges = ({\n hotel,\n numberOfChildrens,\n control,\n roomIndex,\n}: {\n hotel: Hotel | undefined;\n numberOfChildrens: number;\n control: Control<ConfirmationFormValues, any>;\n roomIndex: number;\n}) => {\n if (!hotel?.captureChildAge || numberOfChildrens === 0) {\n return <></>;\n }\n const {\n formState: { errors },\n } = useFormContext<ConfirmationFormValues>();\n const ageOptions: { label: string; value: string }[] = [];\n const min = hotel?.childConfiguration?.childRange?.min || 0;\n const max = hotel?.childConfiguration?.childRange?.max || 0;\n for (let index = min; index <= max; index++) {\n ageOptions.push({ label: `${index}`, value: `${index}` });\n }\n const rootKey = `userProfiles[${roomIndex}].${nameof<TUserProfileFormValues>('CaptureChildAge')}`;\n const requiredInputs = Array.from({ length: numberOfChildrens }, (_, childIndex) => childIndex).map((childIndex) => ({\n name: `${rootKey}[${childIndex}]`,\n id: `${rootKey}[${childIndex}].id`,\n label: `Child ${childIndex + 1} Age`,\n childIndex: childIndex,\n }));\n const getValidationClass = (childIndex: number) => {\n if (!errors.userProfiles) return;\n if (errors.userProfiles?.[roomIndex]?.CaptureChildAge?.[childIndex]) {\n return 'error';\n } else {\n return 'success';\n }\n };\n const chunkInputs = chunkArray(requiredInputs, 3);\n\n return (\n <div className=\"u-marg-top\">\n {chunkInputs.map((chunkInput, chunkIndex) => {\n return (\n <InputGroup dimensions=\"1/1/1\" key={`InputGroup-${chunkIndex}`}>\n {chunkInput.map(({ id, name, label, childIndex }) => {\n return (\n <Controller\n key={id}\n control={control}\n name={name as any}\n rules={{ required: true }}\n render={({ field }) => {\n const { ref, ...rest } = field;\n return (\n <>\n <div className=\"u-marg-bottom--light\">\n <Text type={TextType.Small}>\n <strong>{label}</strong>\n </Text>\n </div>\n <InputSelect\n keyName=\"value\"\n labelName=\"label\"\n options={ageOptions}\n placeholder=\"Please Select *\"\n {...rest}\n validationStatus={getValidationClass(childIndex)}\n />\n </>\n );\n }}\n />\n );\n })}\n </InputGroup>\n );\n })}\n </div>\n );\n};\nexport default RoomContactDetails;\n"]}
|
|
1
|
+
{"version":3,"file":"RoomContactDetails.js","sourceRoot":"/","sources":["src/components/steps/confirmation/RoomContactDetails.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAA0E;AAC1E,2CAAkD;AAClD,yCAAgH;AAChH,iEAAyC;AACzC,+CAAmE;AACnE,qDAAiG;AACjG,iDAA+C;AAC/C,0DAAuD;AAEvD,iFAAyD;AACzD,oEAA8D;AAC9D,sFAA8D;AAC9D,6IAAqH;AACrH,6EAAqD;AACrD,uEAAgE;AAChE,4FAAoE;AACpE,wDAA0D;AAC1D,kEAA2D;AAC3D,2EAAmD;AACnD,sIAA8G;AAC9G,mEAAgE;AAChE,uDAA8E;AAC9E,wDAAuI;AACvI,kHAA0F;AAC1F,wGAAgF;AAChF,wCAAqC;AACrC,8DAA+E;AAC/E,uEAA+C;AAC/C,kDAAgD;AAehD,MAAM,kBAAkB,GAAO,GAAG,EAAE;IAChC,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAA,gCAAc,GAA0B,CAAC;IAC9G,MAAM,aAAa,GAAG,IAAA,kBAAU,EAAC,wBAAa,CAAC,CAAC;IAChD,MAAM,UAAU,GAAG,aAAa,CAAC,eAAe,EAAE,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B,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;oBAClB,MAAM,EAAE,GAAG,KAAc,KAAK,EAAd,IAAI,UAAK,KAAK,EAAxB,OAAgB,CAAQ,CAAC;oBAC/B,OAAO,CACH;wBACI,uCAAK,SAAS,EAAC,sBAAsB;4BACjC,8BAAC,cAAI,IAAC,IAAI,EAAE,eAAQ,CAAC,KAAK;gCACtB,8CAAS,KAAK,CAAU,CACrB,CACL;wBACN,8BAAC,oBAAW,kBACR,OAAO,EAAC,OAAO,EACf,SAAS,EAAC,OAAO,EACjB,OAAO,EAAE,UAAU,EACnB,WAAW,EAAC,iBAAiB,IACzB,IAAI,IACR,gBAAgB,EAAE,kBAAkB,CAAC,UAAU,CAAC,IAClD,CACH,CACN,CAAC;gBACN,CAAC,GACH,CACL,CAAC;QACN,CAAC,CAAC,CACO,CAChB,CAAC;IACN,CAAC,CAAC,CACA,CACT,CAAC;AACN,CAAC,CAAC;AACF,kBAAe,kBAAkB,CAAC","sourcesContent":["import { BasketContext, RoomstayMemberContext } from '@frontend/contexts';\nimport { useCurrentHotel } from '@frontend/hooks';\nimport { EBookingPaymentMethod, EHotelStateFieldConfiguration, IAuxiliaryFilter, nameof } from '@roomstay/core';\nimport cloneDeep from 'lodash/cloneDeep';\nimport React, { FC, useContext, useEffect, useState } from 'react';\nimport { Control, Controller, FieldError, useFieldArray, useFormContext } from 'react-hook-form';\nimport { useTranslation } from 'react-i18next';\nimport { Translation } from 'translations/Translation';\n\nimport AutoAutoHeight from '@/animations/AutoAutoHeight';\nimport Alert, { AlertType } from '@/components/generic/Alert';\nimport Checkbox from '@/components/generic/Checkbox/Checkbox';\nimport EnhancedPhoneNumberField from '@/components/generic/custom/EnhancedPhoneNumberField/EnhancedPhoneNumberField';\nimport Headline from '@/components/generic/Headline';\nimport Icon, { IconType } from '@/components/generic/Icon/Icon';\nimport InputGroup from '@/components/generic/InputGroup/InputGroup';\nimport { InputSelect } from '@/components/generic/Select';\nimport Text, { TextType } from '@/components/generic/Text';\nimport TextBox from '@/components/generic/TextBox';\nimport StepConfirmationCountrySelector from '@/components/steps/confirmation/StepConfirmationCountrySelector';\nimport { useSearchScopeHook } from '@/hooks/useSearchScopeHook';\nimport { EHotelAddressRequirement, Hotel } from '@/models/Client/Hotel/Hotel';\nimport { ConfirmationFormValues, EUserProfileFormKey, EUserRequiredInputFormKey, TUserProfileFormValues } from '@/models/Confirmation';\nimport E164PhoneNumberFieldFeature from '@/providers/feature/E164PhoneNumberFieldFeature';\nimport GuestTitleFieldFeature from '@/providers/feature/GuestTitleFieldFeature';\nimport { Color } from '@/util/Color';\nimport DataLayer, { InteractionStep, InteractionType } from '@/util/DataLayer';\nimport StringHelper from '@/util/StringHelper';\nimport { EMAIL_REGEX } from '@/util/Validation';\n\ntype AuxiliaryFilterOption = {\n value: string;\n label: string;\n};\n\ntype AuxiliaryFilterSelect = {\n id: string;\n name: string;\n label: string;\n options: AuxiliaryFilterOption[];\n order: number;\n};\n\nconst RoomContactDetails: FC = () => {\n const { register, formState, control, watch, getValues, setValue } = useFormContext<ConfirmationFormValues>();\n const basketContext = useContext(BasketContext);\n const basketRows = basketContext.getAllValidRows();\n const { hotel } = useCurrentHotel();\n\n const isAddressRequired = hotel?.addressRequirement === EHotelAddressRequirement.FullAddressRequired;\n const isCountryRequired =\n hotel?.addressRequirement === EHotelAddressRequirement.FullAddressRequired || hotel?.addressRequirement === EHotelAddressRequirement.AddressOptionalCountryRequired;\n\n const addressPlaceholder = (placeholder: string, required: boolean): string => placeholder + (required ? ' *' : '');\n\n const { update, fields } = useFieldArray({\n control,\n name: 'userProfiles',\n rules: {\n required: false,\n },\n });\n const [copyCheckBox, paymentMethod] = watch(['copyCheckBox', 'paymentMethod']);\n\n const errors = formState.errors;\n\n const { t } = useTranslation();\n const { roomstayMember: member } = useContext(RoomstayMemberContext);\n const { showChildren } = useSearchScopeHook();\n\n useEffect(() => {\n errors.userProfiles?.forEach?.((_, index) => {\n if (errors.userProfiles?.[index]) {\n opens[index] = true;\n }\n });\n setOpens(opens.slice(0));\n }, [errors.userProfiles, copyCheckBox]);\n\n useEffect(() => {\n const getDefaultValue = (index: number, potentialDefaultValue = '') => {\n return index === 0 ? potentialDefaultValue : '';\n };\n\n const userProfiles = basketRows.map((basketRow, index) => {\n const defaults = basketRow.checkoutDefaults;\n const addr = defaults?.address;\n\n return {\n [EUserProfileFormKey.Title]: '', // TODO: Add this to @roomstay/core IRoomstayMember?\n [EUserProfileFormKey.Forename]: getDefaultValue(index, defaults?.firstName ?? member?.forename),\n [EUserProfileFormKey.Surname]: getDefaultValue(index, defaults?.lastName ?? member?.surname),\n [EUserProfileFormKey.Email]: getDefaultValue(index, defaults?.email ?? member?.email),\n [EUserProfileFormKey.Phone]: getDefaultValue(index, defaults?.phone ?? member?.phoneNumber),\n [EUserProfileFormKey.Address]: getDefaultValue(index, addr?.line1 ?? member?.address?.address),\n [EUserProfileFormKey.City]: getDefaultValue(index, addr?.city ?? member?.address?.city),\n [EUserProfileFormKey.PostCode]: getDefaultValue(index, addr?.postalCode ?? member?.address?.zip),\n [EUserProfileFormKey.State]: getDefaultValue(index, addr?.state ?? member?.address?.state),\n [EUserProfileFormKey.Country]: getDefaultValue(index, addr?.country ?? member?.address?.country),\n [EUserProfileFormKey.CountryId]: getDefaultValue(index, addr?.countryId?.toString()),\n [EUserProfileFormKey.CountryCode]: getDefaultValue(index, addr?.countryCode),\n [EUserRequiredInputFormKey.AuxInputs]: basketRow.auxiliaryFilter,\n };\n });\n setValue('userProfiles', userProfiles);\n setValue('copyCheckBox', !!(basketRows?.length && basketRows.length > 1));\n }, [member, basketRows?.length]);\n\n const padInputNameByRoomNumber = (name: EUserProfileFormKey, index: number) => `userProfiles.${index}.${name}` as const;\n\n const [opens, setOpens] = useState<boolean[]>(basketRows.map((basketRow, index) => index === 0));\n\n const copyUserProfileFormFields = (currentIndex: number) => {\n const values = cloneDeep(getValues(`userProfiles.0`));\n const currentValues = cloneDeep(getValues(`userProfiles.${currentIndex}`));\n\n // Exclude AuxInputs\n values[EUserRequiredInputFormKey.AuxInputs] = currentValues.AuxInputs;\n\n // Exclude Child Ages\n values.CaptureChildAge = currentValues.CaptureChildAge;\n\n return values;\n };\n\n const onInputChange =\n (fieldName: string, interactionName: string) =>\n (event: any): void => {\n DataLayer.instance.sendInteraction(interactionName, InteractionType.FORM_FIELD, InteractionStep.GUEST_DETAILS);\n };\n\n useEffect(() => {\n if (copyCheckBox)\n fields.forEach((basketRow, index) => {\n if (index === 0) return;\n const values = copyUserProfileFormFields(index);\n update(index, values);\n });\n }, [copyCheckBox]);\n\n useEffect(() => {\n const { unsubscribe } = watch((allFields, { name, type }) => {\n if (type === 'change' && name?.includes('userProfiles') && name.split('.')[1] === '0' && allFields.copyCheckBox) {\n fields.map((field, index) => {\n if (index === 0) return;\n const values = copyUserProfileFormFields(index);\n update(index, values);\n });\n }\n });\n\n return () => {\n unsubscribe();\n };\n }, [fields]);\n\n const setOpenByIndex = (index: number, value: boolean) => {\n opens.splice(index, 1, value);\n setOpens(opens.slice(0));\n };\n\n const renderError = (userProfileIndex: number): JSX.Element[] | null => {\n const userProfile = errors.userProfiles?.[userProfileIndex];\n\n if (userProfile && formState.submitCount >= 1 && (userProfileIndex === 0 || !copyCheckBox))\n return Object.values(userProfile).map((error, errorIndex) => {\n return (\n <AutoAutoHeight key={errorIndex} open>\n <div className=\"u-flex\">\n <Alert icon={IconType.Error} type={AlertType.Danger} noMargin={errorIndex === Object.keys(userProfile).length - 1}>\n <Text type={TextType.Small}>{(error as FieldError)?.message}</Text>\n </Alert>\n </div>\n </AutoAutoHeight>\n );\n });\n\n return null;\n };\n\n return (\n <>\n {fields.map((field, index) => {\n const padInputName = (name: EUserProfileFormKey) => padInputNameByRoomNumber(name, index);\n const getValidationClass = (name: EUserProfileFormKey) => {\n if (!errors.userProfiles || (copyCheckBox && index >= 1)) return;\n if (errors.userProfiles[index]?.[name]) {\n return 'error';\n // Hack to get Aux Inputs to validate as well.\n } else if (errors.userProfiles[index]?.AuxInputs?.[name.replace('AuxInputs.', '')]) {\n return 'error';\n } else {\n return 'success';\n }\n };\n\n const openExpandable = () => {\n if (index !== 0) {\n setOpenByIndex(index, !opens[index]);\n }\n };\n\n const basketRow = basketRows[index];\n const currentRoom = basketRow.getRoom();\n const filterValue = basketRow.getAuxiliaryFilter();\n\n const isDisabled = (copyCheckBox && index >= 1) || paymentMethod === EBookingPaymentMethod.Planpay;\n\n const includeStateField =\n hotel?.stateFieldConfiguration === EHotelStateFieldConfiguration.Optional || hotel?.stateFieldConfiguration === EHotelStateFieldConfiguration.Required;\n const stateFieldRequired = hotel?.stateFieldConfiguration === EHotelStateFieldConfiguration.Required;\n\n // Build list of auxiliary inputs the user is required to complete\n const roomGroup = hotel?.roomGroups?.find(({ id }) => id === currentRoom.roomGroupId);\n const requiredInputs: AuxiliaryFilterSelect[] = [];\n\n for (const [inputKey, input] of Object.entries(roomGroup?.filters ?? {})) {\n const values = currentRoom?.auxiliaryValues?.[inputKey]?.map((value) => value.toString());\n\n if (input?.requireInput && values) {\n // Reduce available options to those assigned to the room\n const options = input.options.filter((option) => {\n if (values.includes(option.value.toString())) {\n return option;\n }\n });\n\n const requiredInputId = `${nameof<TUserProfileFormValues>('AuxInputs')}.${inputKey}`;\n\n if (options.length === 1) {\n setValue(padInputName(requiredInputId as any), options[0].value as never);\n } else if (filterValue?.[inputKey]) {\n setValue(padInputName(requiredInputId as any), filterValue[inputKey] as never);\n }\n\n // Convert options to format acceptable by the input\n const auxiliaryFilterOption = options\n .map((option: IAuxiliaryFilter['options'][0]) => {\n return { label: option.label, value: `${option.value}`, order: option.order ?? 0 };\n })\n .sort((a, b) => a.order - b.order);\n\n if (auxiliaryFilterOption.length > 0) {\n // Only add to requiredInputs if there are available options to display\n requiredInputs.push({\n id: requiredInputId,\n name: input.name,\n label: input.name,\n options: auxiliaryFilterOption,\n order: input.order ?? 0,\n });\n }\n }\n }\n\n // The Country input field will be included in different places, depending on whether the State field is enabled or not.\n const countryInputField = (\n <Controller\n control={control}\n name={padInputName(EUserProfileFormKey.Country)}\n rules={{\n required: {\n value: isCountryRequired,\n message: t(Translation.Step.Confirmation.Inputs.Required, { field: t(Translation.Step.Confirmation.Inputs.Country) }),\n },\n }}\n render={({ field }) => {\n const { ref, onChange, ...rest } = field;\n return (\n <StepConfirmationCountrySelector\n ref={ref}\n disableOpenOnFocus\n disabled={isDisabled}\n validationStatus={getValidationClass(EUserProfileFormKey.Country)}\n onChange={(e) => {\n onChange(e);\n onInputChange(padInputName(EUserProfileFormKey.Country), 'Country - Address')(e);\n }}\n onChangeId={(id) => {\n setValue(padInputName(EUserProfileFormKey.CountryId), id as never); // Hack to make CountryID be set...\n }}\n onChangeCode={(code) => {\n setValue(padInputName(EUserProfileFormKey.CountryCode), code as never); // Hack to make CountryID be set...\n }}\n required={isCountryRequired}\n {...rest}\n />\n );\n }}\n />\n );\n\n return (\n <div key={field.id} className=\"rs-checkout-contact-details\">\n <div className={index === 0 ? '' : 'u-marg-bottom--heavy'}>\n <div className=\"u-marg-bottom\" onClick={openExpandable}>\n <div className=\"u-flex u-marg-bottom align-items-center\">\n <Headline bold>\n {t(Translation.Misc.Room)} {index + 1}\n </Headline>\n {index !== 0 && <Icon icon={opens[index] ? IconType.ArrowDown2 : IconType.ArrowUp2} color={Color.Grey} />}\n </div>\n {basketRow && (\n <div className=\"u-marg-bottom\">\n <Text>\n <strong className=\"u-block@l-\">{basketRow.getRoom().name}</strong> for{' '}\n {StringHelper.pluralWithDictAndCount(basketRow.getAdults(), Translation.Step.Date.Adult, t)}\n {showChildren ? (\n <>\n , \n {StringHelper.pluralWithDictAndCount(basketRow.getChildren(), Translation.Step.Date.Child, t)}\n </>\n ) : null}\n {hotel?.childConfiguration?.supportInfants ? (\n <>\n , \n {StringHelper.pluralWithDictAndCount(basketRow.getInfants(), Translation.Step.Date.Infant, t)}\n </>\n ) : null}\n </Text>\n <div className=\"step-one-status--dates u-flex justify-content-start\">\n <Text type={TextType.Small} color={Color.Accent}>\n <strong>{basketRow.getStartDate().format('ddd, MMM D')}</strong>\n </Text>\n <Icon icon={IconType.ArrowRight2} size=\"18px\" />\n <Text type={TextType.Small} color={Color.Accent}>\n <strong>{basketRow.getEndDate().format('ddd, MMM D')}</strong>\n </Text>\n </div>\n </div>\n )}\n {renderError(index)}\n </div>\n <div className=\"room-contact-details--row\" style={{ maxHeight: opens[index] ? undefined : 0 }}>\n <div className=\"u-marg-bottom--heavy rs-checkout-contact-info\">\n <div className=\"u-marg-bottom--light\">\n <Text type={TextType.Small}>\n <strong>{t(Translation.Step.Confirmation.ContactInfo)}</strong>\n </Text>\n </div>\n\n <InputGroup dimensions={GuestTitleFieldFeature.isActive() ? '1/2/2' : '2/2'}>\n {GuestTitleFieldFeature.isActive() && (\n <Controller\n control={control}\n name={padInputName(EUserProfileFormKey.Title)}\n rules={{ required: true }}\n render={({ field }) => {\n const { ref, ...rest } = field;\n\n return (\n <InputSelect\n keyName=\"value\"\n labelName=\"label\"\n options={GuestTitleFieldFeature.getTitleOptions()}\n placeholder={t(Translation.Step.Confirmation.Inputs.Title) + ' *'}\n required\n validationStatus={getValidationClass(EUserProfileFormKey.Title)}\n {...rest}\n />\n );\n }}\n />\n )}\n <TextBox\n inputProps={{\n disabled: isDisabled,\n }}\n placeholder={t(Translation.Step.Confirmation.Inputs.Forename) + ' *'}\n wide\n required\n validationStatus={getValidationClass(EUserProfileFormKey.Forename)}\n {...register(padInputName(EUserProfileFormKey.Forename), {\n onChange: onInputChange(padInputName(EUserProfileFormKey.Forename), 'Forename - Contact Info'),\n required: {\n value: true,\n message: t(Translation.Step.Confirmation.Inputs.Required, { field: t(Translation.Step.Confirmation.Inputs.Forename) }),\n },\n })}\n />\n <TextBox\n inputProps={{\n disabled: isDisabled,\n }}\n placeholder={t(Translation.Step.Confirmation.Inputs.Surname) + ' *'}\n wide\n required\n validationStatus={getValidationClass(EUserProfileFormKey.Surname)}\n {...register(padInputName(EUserProfileFormKey.Surname), {\n onChange: onInputChange(padInputName(EUserProfileFormKey.Surname), 'Surname - Contact Info'),\n required: {\n value: true,\n message: t(Translation.Step.Confirmation.Inputs.Required, { field: t(Translation.Step.Confirmation.Inputs.Surname) }),\n },\n })}\n />\n </InputGroup>\n\n <InputGroup dimensions=\"2/2\">\n <TextBox\n inputProps={{\n disabled: isDisabled,\n }}\n placeholder={t(Translation.Step.Confirmation.Inputs.Email) + ' *'}\n wide\n validationStatus={getValidationClass(EUserProfileFormKey.Email)}\n required\n {...register(padInputName(EUserProfileFormKey.Email), {\n onChange: onInputChange(padInputName(EUserProfileFormKey.Email), 'Email - Contact Info'),\n required: {\n value: true,\n message: t(Translation.Step.Confirmation.Inputs.Required, { field: t(Translation.Step.Confirmation.Inputs.Email) }),\n },\n pattern: {\n value: EMAIL_REGEX,\n message: t(Translation.Step.Confirmation.Inputs.InvalidEmail),\n },\n })}\n />\n {E164PhoneNumberFieldFeature.isActive() ? (\n <Controller\n control={control}\n name={padInputName(EUserProfileFormKey.Phone)}\n rules={{\n required: {\n value: true,\n message: t(Translation.Step.Confirmation.Inputs.Required, { field: t(Translation.Step.Confirmation.Inputs.Phone) }),\n },\n minLength: {\n value: 5,\n message: 'Phone number is required',\n },\n maxLength: {\n value: 17,\n message: 'Phone number is too long',\n },\n pattern: {\n value: /^[1-9]( |\\d){1,15}$/g,\n message: 'Incorrect phone number entered',\n },\n }}\n render={({ field }) => {\n return (\n <EnhancedPhoneNumberField\n disabled={isDisabled}\n validationStatus={getValidationClass(EUserProfileFormKey.Phone)}\n {...field}\n onChange={(e: any) => {\n field.onChange(e);\n onInputChange(padInputName(EUserProfileFormKey.Phone), 'Phone - Contact Info')(e);\n }}\n />\n );\n }}\n />\n ) : (\n <TextBox\n inputProps={{\n disabled: isDisabled,\n }}\n placeholder={t(Translation.Step.Confirmation.Inputs.Phone) + ' *'}\n wide\n required\n validationStatus={getValidationClass(EUserProfileFormKey.Phone)}\n {...register(padInputName(EUserProfileFormKey.Phone), {\n onChange: onInputChange(padInputName(EUserProfileFormKey.Phone), 'Phone - Contact Info'),\n required: {\n value: true,\n message: t(Translation.Step.Confirmation.Inputs.Required, { field: t(Translation.Step.Confirmation.Inputs.Phone) }),\n },\n })}\n />\n )}\n </InputGroup>\n </div>\n <div className=\"rs-checkout-contact-info-address\">\n <div className=\"u-marg-bottom--light\">\n <Text type={TextType.Small}>\n <strong>{t(Translation.Step.Confirmation.Address)}</strong>\n </Text>\n </div>\n\n <InputGroup dimensions=\"3/1\">\n <TextBox\n inputProps={{\n disabled: isDisabled,\n }}\n placeholder={addressPlaceholder(t(Translation.Step.Confirmation.Inputs.Address), isAddressRequired)}\n wide\n required={isAddressRequired}\n validationStatus={getValidationClass(EUserProfileFormKey.Address)}\n {...register(padInputName(EUserProfileFormKey.Address), {\n onChange: onInputChange(padInputName(EUserProfileFormKey.Address), 'Address - Address'),\n required: {\n value: isAddressRequired,\n message: t(Translation.Step.Confirmation.Inputs.Required, { field: t(Translation.Step.Confirmation.Inputs.Address) }),\n },\n })}\n />\n <TextBox\n inputProps={{\n disabled: isDisabled,\n }}\n placeholder={addressPlaceholder(t(Translation.Step.Confirmation.Inputs.City), isAddressRequired)}\n wide\n required={isAddressRequired}\n validationStatus={getValidationClass(EUserProfileFormKey.City)}\n {...register(padInputName(EUserProfileFormKey.City), {\n onChange: onInputChange(padInputName(EUserProfileFormKey.City), 'City - Address'),\n required: {\n value: isAddressRequired,\n message: t(Translation.Step.Confirmation.Inputs.Required, { field: t(Translation.Step.Confirmation.Inputs.City) }),\n },\n })}\n />\n </InputGroup>\n <InputGroup dimensions=\"2/2\">\n <TextBox\n inputProps={{\n disabled: isDisabled,\n }}\n placeholder={addressPlaceholder(t(Translation.Step.Confirmation.Inputs.PostCode), isAddressRequired)}\n wide\n required={isAddressRequired}\n validationStatus={getValidationClass(EUserProfileFormKey.PostCode)}\n {...register(padInputName(EUserProfileFormKey.PostCode), {\n onChange: onInputChange(padInputName(EUserProfileFormKey.PostCode), 'PostCode - Address'),\n required: {\n value: isAddressRequired,\n message: t(Translation.Step.Confirmation.Inputs.Required, { field: t(Translation.Step.Confirmation.Inputs.PostCode) }),\n },\n })}\n />\n\n {includeStateField ? (\n // Render the State field here if it's required, otherwise render the Country field\n <TextBox\n inputProps={{\n disabled: isDisabled,\n }}\n placeholder={t(Translation.Step.Confirmation.Inputs.State) + (stateFieldRequired ? ' *' : '')}\n wide\n required={stateFieldRequired}\n validationStatus={getValidationClass(EUserProfileFormKey.State)}\n {...register(padInputName(EUserProfileFormKey.State), {\n onChange: onInputChange(padInputName(EUserProfileFormKey.State), 'State - Address'),\n required: {\n value: stateFieldRequired,\n message: t(Translation.Step.Confirmation.Inputs.Required, { field: t(Translation.Step.Confirmation.Inputs.State) }),\n },\n })}\n />\n ) : (\n countryInputField\n )}\n </InputGroup>\n\n {includeStateField && <InputGroup dimensions=\"1\">{countryInputField}</InputGroup>}\n </div>\n </div>\n {requiredInputs.length > 0 && (\n <div className=\"rs-checkout-required-inputs u-marg-top\">\n <div className=\"u-marg-top\">\n <InputGroup dimensions=\"2/2\">\n {requiredInputs.map((input: AuxiliaryFilterSelect) => {\n return (\n <Controller\n key={input.id}\n control={control}\n name={padInputName(input.id as any)}\n rules={{ required: true }}\n render={({ field }) => {\n const { ref, ...rest } = field;\n\n return (\n <>\n <div className=\"u-marg-bottom--light\">\n <Text type={TextType.Small}>\n <strong>{input.name}</strong>\n </Text>\n </div>\n <InputSelect\n key={input.id}\n keyName={nameof<AuxiliaryFilterOption>('value')}\n labelName={nameof<AuxiliaryFilterOption>('label')}\n options={input.options}\n placeholder=\"Please Select *\"\n validationStatus={getValidationClass(input.id as any)}\n {...rest}\n />\n </>\n );\n }}\n />\n );\n })}\n </InputGroup>\n </div>\n </div>\n )}\n\n <CaptureChildAges hotel={hotel} numberOfChildrens={Number(basketRow.getChildren())} control={control} roomIndex={index} />\n </div>\n {fields.length > 1 && index === 0 ? (\n <div className=\"u-marg-bottom--heavy\">\n <Checkbox label={t(Translation.Step.Confirmation.ApplySameInfoToOtherRooms)} {...register('copyCheckBox')} />\n </div>\n ) : null}\n </div>\n );\n })}\n </>\n );\n};\n\nfunction chunkArray<T>(array: T[], chunkSize: number): T[][] {\n const result: T[][] = [];\n for (let i = 0; i < array.length; i += chunkSize) {\n result.push(array.slice(i, i + chunkSize));\n }\n return result;\n}\n\nconst CaptureChildAges = ({\n hotel,\n numberOfChildrens,\n control,\n roomIndex,\n}: {\n hotel: Hotel | undefined;\n numberOfChildrens: number;\n control: Control<ConfirmationFormValues, any>;\n roomIndex: number;\n}) => {\n if (!hotel?.captureChildAge || numberOfChildrens === 0) {\n return <></>;\n }\n const {\n formState: { errors },\n } = useFormContext<ConfirmationFormValues>();\n const ageOptions: { label: string; value: string }[] = [];\n const min = hotel?.childConfiguration?.childRange?.min || 0;\n const max = hotel?.childConfiguration?.childRange?.max || 0;\n for (let index = min; index <= max; index++) {\n ageOptions.push({ label: `${index}`, value: `${index}` });\n }\n const rootKey = `userProfiles[${roomIndex}].${nameof<TUserProfileFormValues>('CaptureChildAge')}`;\n const requiredInputs = Array.from({ length: numberOfChildrens }, (_, childIndex) => childIndex).map((childIndex) => ({\n name: `${rootKey}[${childIndex}]`,\n id: `${rootKey}[${childIndex}].id`,\n label: `Child ${childIndex + 1} Age`,\n childIndex: childIndex,\n }));\n const getValidationClass = (childIndex: number) => {\n if (!errors.userProfiles) return;\n if (errors.userProfiles?.[roomIndex]?.CaptureChildAge?.[childIndex]) {\n return 'error';\n } else {\n return 'success';\n }\n };\n const chunkInputs = chunkArray(requiredInputs, 3);\n\n return (\n <div className=\"u-marg-top\">\n {chunkInputs.map((chunkInput, chunkIndex) => {\n return (\n <InputGroup dimensions=\"1/1/1\" key={`InputGroup-${chunkIndex}`}>\n {chunkInput.map(({ id, name, label, childIndex }) => {\n return (\n <Controller\n key={id}\n control={control}\n name={name as any}\n rules={{ required: true }}\n render={({ field }) => {\n const { ref, ...rest } = field;\n return (\n <>\n <div className=\"u-marg-bottom--light\">\n <Text type={TextType.Small}>\n <strong>{label}</strong>\n </Text>\n </div>\n <InputSelect\n keyName=\"value\"\n labelName=\"label\"\n options={ageOptions}\n placeholder=\"Please Select *\"\n {...rest}\n validationStatus={getValidationClass(childIndex)}\n />\n </>\n );\n }}\n />\n );\n })}\n </InputGroup>\n );\n })}\n </div>\n );\n};\nexport default RoomContactDetails;\n"]}
|
|
@@ -47,6 +47,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
47
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
48
|
exports.default = StepConfirmationForm;
|
|
49
49
|
const contexts_1 = require("../../../contexts/index.js");
|
|
50
|
+
const hooks_1 = require("../../../hooks/index.js");
|
|
50
51
|
const ConfirmationStepContext_1 = require("contexts/ConfirmationStepContext/ConfirmationStepContext");
|
|
51
52
|
const HistoryConsistentPush_1 = require("hooks/HistoryConsistentPush");
|
|
52
53
|
const react_1 = __importStar(require("react"));
|
|
@@ -72,6 +73,8 @@ const StepConfirmationAcknowledgement_1 = __importDefault(require("./StepConfirm
|
|
|
72
73
|
const StepConfirmationCommentsComponent_1 = require("./StepConfirmationCommentsComponent");
|
|
73
74
|
const StepConfirmationPoliciesSection_1 = __importDefault(require("./StepConfirmationPoliciesSection"));
|
|
74
75
|
const StepConfirmationPolicyBlock_1 = __importDefault(require("./StepConfirmationPolicyBlock"));
|
|
76
|
+
const Currency_1 = require("../../../hooks/Currency");
|
|
77
|
+
const CurrencyProvider_1 = __importDefault(require("../../../providers/CurrencyProvider"));
|
|
75
78
|
const ConfirmationVerifyFeature_1 = __importDefault(require("../../../providers/feature/ConfirmationVerifyFeature"));
|
|
76
79
|
const ShowIATANumberOnCheckoutFeature_1 = __importDefault(require("../../../providers/feature/ShowIATANumberOnCheckoutFeature"));
|
|
77
80
|
const Color_1 = require("../../../util/Color");
|
|
@@ -86,6 +89,8 @@ function StepConfirmationForm() {
|
|
|
86
89
|
const basketContext = (0, contexts_1.useBasket)();
|
|
87
90
|
const historyConsistentPush = (0, HistoryConsistentPush_1.useHistoryConsistentPush)();
|
|
88
91
|
const { exclusivePayment } = (0, usePaymentHelper_1.usePaymentHelper)();
|
|
92
|
+
const { currentCurrency } = (0, react_1.useContext)(contexts_1.CompanyContext);
|
|
93
|
+
const { hotel } = (0, hooks_1.useCurrentHotel)();
|
|
89
94
|
const returnToPickRooms = () => __awaiter(this, void 0, void 0, function* () {
|
|
90
95
|
historyConsistentPush((0, GetStepRoom_1.default)().getStepUrl());
|
|
91
96
|
});
|
|
@@ -99,6 +104,10 @@ function StepConfirmationForm() {
|
|
|
99
104
|
formContext.setValue('paymentMethod', 'VGS');
|
|
100
105
|
}
|
|
101
106
|
}, [isFullyCoveredByGiftCard]);
|
|
107
|
+
const currencyDisplayEnhancements = (0, Currency_1.useCurrencyDisplay)({
|
|
108
|
+
children: basketContext.getTotalPrice(),
|
|
109
|
+
toCurrencyCode: hotel === null || hotel === void 0 ? void 0 : hotel.defaultCurrency,
|
|
110
|
+
});
|
|
102
111
|
const prePaymentInfo = (react_1.default.createElement(react_1.default.Fragment, null,
|
|
103
112
|
react_1.default.createElement("div", { className: "u-marg-bottom--heavy" },
|
|
104
113
|
react_1.default.createElement("div", { className: "u-marg-bottom--light" },
|
|
@@ -131,6 +140,13 @@ function StepConfirmationForm() {
|
|
|
131
140
|
react_1.default.createElement("div", { className: "u-marg-bottom--heavy" },
|
|
132
141
|
react_1.default.createElement("div", { className: "u-marg-bottom" },
|
|
133
142
|
react_1.default.createElement(Headline_1.default, { bold: true }, t(Translation_1.Translation.Navigation.Menu.PaymentInformation))),
|
|
143
|
+
currentCurrency !== (hotel === null || hotel === void 0 ? void 0 : hotel.defaultCurrency) && (hotel === null || hotel === void 0 ? void 0 : hotel.defaultCurrency) && (react_1.default.createElement("div", { className: "u-marg-bottom--light rs-confirmation-currency-display-enhancements" },
|
|
144
|
+
react_1.default.createElement(Alert_1.default, { iconAlignCenter: true, icon: Icon_1.IconType.Money, iconColor: Color_1.Color.Navy, type: Alert_1.AlertType.LightGray },
|
|
145
|
+
react_1.default.createElement(Text_1.default, { type: Text_1.TextType.Small, color: Color_1.Color.Navy },
|
|
146
|
+
react_1.default.createElement(react_i18next_1.Trans, { i18nKey: Translation_1.Translation.Step.General.PaymentChargeNotice, values: {
|
|
147
|
+
amount: `${CurrencyProvider_1.default.getShortSymbol(hotel.defaultCurrency)}${currencyDisplayEnhancements.prettyValue}`,
|
|
148
|
+
currency: hotel.defaultCurrency,
|
|
149
|
+
}, components: [react_1.default.createElement("span", { key: "0" }), react_1.default.createElement("u", { key: "1" })] }))))),
|
|
134
150
|
showPromocodeFieldInCheckout && (react_1.default.createElement("div", { className: "u-marg-bottom rs-promotional-code-wrapper" },
|
|
135
151
|
react_1.default.createElement(PromotionalCodeInput_1.PromotionalCodeInput, null))),
|
|
136
152
|
isFullyCoveredByGiftCard ? (react_1.default.createElement(Alert_1.default, { type: Alert_1.AlertType.Success },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StepConfirmationForm.js","sourceRoot":"/","sources":["src/components/steps/confirmation/StepConfirmationForm.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,uCAoJC;AAtLD,iDAAsE;AACtE,sGAA+F;AAC/F,uEAAuE;AACvE,+CAAqD;AACrD,qDAAiD;AACjD,iDAA+C;AAC/C,0DAAuD;AAEvD,iFAAyD;AACzD,oEAA8D;AAC9D,iGAAyE;AACzE,6EAAqD;AACrD,6EAAqD;AACrD,uEAAgE;AAChE,+EAAuD;AACvD,0FAAkE;AAClE,oFAAiF;AACjF,mFAA2D;AAC3D,kEAA2D;AAC3D,2EAAmD;AACnD,4GAAoF;AACpF,4GAAoF;AACpF,4GAAoF;AACpF,sIAA8G;AAC9G,yHAAsH;AACtH,sIAA8G;AAC9G,8HAAsG;AAEtG,8GAAsF;AACtF,0HAAkG;AAClG,wCAAqC;AACrC,qEAA6C;AAC7C,8DAA2D;AAE3D,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contexts';\nimport { useConfirmationStep } from 'contexts/ConfirmationStepContext/ConfirmationStepContext';\nimport { useHistoryConsistentPush } from 'hooks/HistoryConsistentPush';\nimport React, { useContext, useEffect } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useTranslation } from 'react-i18next';\nimport { Translation } from 'translations/Translation';\n\nimport AutoAutoHeight from '@/animations/AutoAutoHeight';\nimport Alert, { AlertType } from '@/components/generic/Alert';\nimport SSLSecureBadge from '@/components/generic/badging/SSLSecureBadge';\nimport BEButton from '@/components/generic/BEButton';\nimport Headline from '@/components/generic/Headline';\nimport Icon, { IconType } from '@/components/generic/Icon/Icon';\nimport LineBreak from '@/components/generic/LineBreak';\nimport LargeLoader from '@/components/generic/loader/LargeLoader';\nimport { PromotionalCodeInput } from '@/components/generic/PromotionalCodeInput';\nimport ScrollToTop from '@/components/generic/ScrollToTop';\nimport Text, { TextType } from '@/components/generic/Text';\nimport TextBox from '@/components/generic/TextBox';\nimport GiftCardRedemption from '@/components/steps/confirmation/GiftCardRedemption';\nimport PaymentInformation from '@/components/steps/confirmation/PaymentInformation';\nimport RoomContactDetails from '@/components/steps/confirmation/RoomContactDetails';\nimport StepConfirmationAcknowledgement from '@/components/steps/confirmation/StepConfirmationAcknowledgement';\nimport { StepConfirmationCommentsComponent } from '@/components/steps/confirmation/StepConfirmationCommentsComponent';\nimport StepConfirmationPoliciesSection from '@/components/steps/confirmation/StepConfirmationPoliciesSection';\nimport StepConfirmationPolicyBlock from '@/components/steps/confirmation/StepConfirmationPolicyBlock';\nimport { ConfirmationFormValues } from '@/models/Confirmation';\nimport ConfirmationVerifyFeature from '@/providers/feature/ConfirmationVerifyFeature';\nimport ShowIATANumberOnCheckoutFeature from '@/providers/feature/ShowIATANumberOnCheckoutFeature';\nimport { Color } from '@/util/Color';\nimport getStepRoom from '@/util/GetStepRoom';\nimport { usePaymentHelper } from '@/util/usePaymentHelper';\n\nexport default function StepConfirmationForm() {\n const { t } = useTranslation();\n const { showPromocodeFieldInCheckout } = useContext(HotelOverridesContext);\n const formContext = useFormContext<ConfirmationFormValues>();\n const { isInPaymentMode, isBackFromPlanpay, bookingSource } = useConfirmationStep();\n const basketContext = useBasket();\n const historyConsistentPush = useHistoryConsistentPush();\n const { exclusivePayment } = usePaymentHelper();\n\n const returnToPickRooms = async () => {\n historyConsistentPush(getStepRoom().getStepUrl());\n };\n\n // Check if gift card fully covers the booking\n const giftCardAmount = Math.abs(formContext.watch('giftCardAmount') || 0);\n const totalBookingAmount = basketContext.getTotalPrice() || 0;\n const isFullyCoveredByGiftCard = giftCardAmount > 0 && giftCardAmount >= totalBookingAmount;\n\n // Ensure paymentMethod is set when gift card covers everything\n useEffect(() => {\n if (isFullyCoveredByGiftCard && !formContext.getValues('paymentMethod')) {\n formContext.setValue('paymentMethod', 'VGS');\n }\n }, [isFullyCoveredByGiftCard]);\n\n const prePaymentInfo = (\n <>\n <div className=\"u-marg-bottom--heavy\">\n <div className=\"u-marg-bottom--light\">\n <Headline bold>{t(Translation.Step.Confirmation.GuestDetails)}</Headline>\n </div>\n <Text type={TextType.Small} color={Color.Success}>\n <strong>{t(Translation.Step.Confirmation.AlmostDone, { required: '*' })}</strong>\n </Text>\n </div>\n <RoomContactDetails />\n {bookingSource === 'inline' && basketContext.canAddAnotherRoom ? (\n <Alert type={AlertType.Accent2} heavyPadding>\n <div className=\"u-flex u-w-100 flex-wrap flex-xl-nowrap\">\n <div>\n <Text color={Color.Accent} bold>\n {t(Translation.Step.Confirmation.WantMoreRooms)}\n </Text>\n <Text color={Color.Navy}>{t(Translation.Step.Confirmation.YouCanAddAndEditRooms)}</Text>\n </div>\n <div className=\"d-flex align-items-center u-marg-top@xl-\">\n <BEButton filled primary icon={IconType.Add} iconPosition=\"left\" onClick={returnToPickRooms}>\n {t(Translation.Step.Confirmation.AddMoreRooms)}\n </BEButton>\n </div>\n </div>\n </Alert>\n ) : (\n <></>\n )}\n {ShowIATANumberOnCheckoutFeature.isActive() && (\n <>\n <div className=\"u-marg-bottom--heavy\">\n <div className=\"u-marg-bottom\">\n <Headline bold>{t(Translation.Step.Confirmation.TravelAgent)}</Headline>\n </div>\n\n <div className=\"u-marg-bottom--light\">\n <Text type={TextType.Small}>\n <strong>{t(Translation.Step.Confirmation.Inputs.IATANumber)}</strong>\n </Text>\n </div>\n <div className=\"u-marg-bottom--light\">\n <Text type={TextType.Small}>{t(Translation.Step.Confirmation.Inputs.IATANumberGuide)}</Text>\n </div>\n <TextBox placeholder={t(Translation.Step.Confirmation.Inputs.IATANumber)} wide {...formContext.register('IATANumber')} />\n </div>\n <LineBreak />\n </>\n )}\n <StepConfirmationCommentsComponent />\n <LineBreak />\n <GiftCardRedemption />\n {!exclusivePayment && (\n <>\n <div className=\"u-marg-bottom--heavy\">\n <div className=\"u-marg-bottom\">\n <Headline bold>{t(Translation.Navigation.Menu.PaymentInformation)}</Headline>\n </div>\n {showPromocodeFieldInCheckout && (\n <div className=\"u-marg-bottom rs-promotional-code-wrapper\">\n <PromotionalCodeInput />\n </div>\n )}\n {isFullyCoveredByGiftCard ? (\n <Alert type={AlertType.Success}>\n <div>\n <Text bold>No payment required</Text>\n <Text>Your gift card covers the full booking amount. No additional payment is required.</Text>\n </div>\n </Alert>\n ) : (\n <>\n <PaymentInformation />\n <div className=\"u-marg-top u-flex align-items-center\">\n <div className=\"u-flex align-items-center justify-content-start\">\n <Icon icon={IconType.Lock} color={Color.Success} />\n <div className=\"u-marg-left--light\">\n <Text type={TextType.Small} color={Color.Success}>\n <strong>{t(Translation.Step.Confirmation.Secured)}</strong>\n </Text>\n </div>\n </div>\n <SSLSecureBadge />\n </div>\n </>\n )}\n </div>\n <LineBreak />\n </>\n )}\n <StepConfirmationPoliciesSection />\n <div className=\"u-pad-top--light u-marg-bottom\">\n <StepConfirmationPolicyBlock />\n </div>\n {ConfirmationVerifyFeature.isActive() && (\n <>\n <LineBreak />\n <div>\n <StepConfirmationAcknowledgement />\n </div>\n </>\n )}\n </>\n );\n\n return (\n <form>\n {isBackFromPlanpay ? (\n <LargeLoader />\n ) : (\n <>\n <AutoAutoHeight open={!exclusivePayment || !isInPaymentMode}>{prePaymentInfo}</AutoAutoHeight>\n {exclusivePayment && (\n <AutoAutoHeight open={isInPaymentMode}>\n <ScrollToTop />\n {exclusivePayment.renderPaymentInput?.()}\n </AutoAutoHeight>\n )}\n </>\n )}\n </form>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"StepConfirmationForm.js","sourceRoot":"/","sources":["src/components/steps/confirmation/StepConfirmationForm.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA,uCA8KC;AAnND,iDAAsF;AACtF,2CAAkD;AAClD,sGAA+F;AAC/F,uEAAuE;AACvE,+CAAqD;AACrD,qDAAiD;AACjD,iDAAsD;AACtD,0DAAuD;AAEvD,iFAAyD;AACzD,oEAA8D;AAC9D,iGAAyE;AACzE,6EAAqD;AACrD,6EAAqD;AACrD,uEAAgE;AAChE,+EAAuD;AACvD,0FAAkE;AAClE,oFAAiF;AACjF,mFAA2D;AAC3D,kEAA2D;AAC3D,2EAAmD;AACnD,4GAAoF;AACpF,4GAAoF;AACpF,4GAAoF;AACpF,sIAA8G;AAC9G,yHAAsH;AACtH,sIAA8G;AAC9G,8HAAsG;AACtG,+CAAsD;AAEtD,oFAA4D;AAC5D,8GAAsF;AACtF,0HAAkG;AAClG,wCAAqC;AACrC,qEAA6C;AAC7C,8DAA2D;AAE3D,SAAwB,oBAAoB;;IACxC,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,8BAAc,GAAE,CAAC;IAC/B,MAAM,EAAE,4BAA4B,EAAE,GAAG,IAAA,kBAAU,EAAC,gCAAqB,CAAC,CAAC;IAC3E,MAAM,WAAW,GAAG,IAAA,gCAAc,GAA0B,CAAC;IAC7D,MAAM,EAAE,eAAe,EAAE,iBAAiB,EAAE,aAAa,EAAE,GAAG,IAAA,6CAAmB,GAAE,CAAC;IACpF,MAAM,aAAa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,YAAY,CAAC,OAAO,CAAC,CAAU,CACxD,CACL,CACJ;wBACN,8BAAC,wBAAc,OAAG,CAChB,CACP,CACN,CACC;YACN,8BAAC,mBAAS,OAAG,CACd,CACN;QACD,8BAAC,yCAA+B,OAAG;QACnC,uCAAK,SAAS,EAAC,gCAAgC;YAC3C,8BAAC,qCAA2B,OAAG,CAC7B;QACL,mCAAyB,CAAC,QAAQ,EAAE,IAAI,CACrC;YACI,8BAAC,mBAAS,OAAG;YACb;gBACI,8BAAC,yCAA+B,OAAG,CACjC,CACP,CACN,CACF,CACN,CAAC;IAEF,OAAO,CACH,4CACK,iBAAiB,CAAC,CAAC,CAAC,CACjB,8BAAC,qBAAW,OAAG,CAClB,CAAC,CAAC,CAAC,CACA;QACI,8BAAC,wBAAc,IAAC,IAAI,EAAE,CAAC,gBAAgB,IAAI,CAAC,eAAe,IAAG,cAAc,CAAkB;QAC7F,gBAAgB,IAAI,CACjB,8BAAC,wBAAc,IAAC,IAAI,EAAE,eAAe;YACjC,8BAAC,qBAAW,OAAG,EACd,MAAA,gBAAgB,CAAC,kBAAkB;qCAAI,CAC3B,CACpB,CACF,CACN,CACE,CACV,CAAC;AACN,CAAC","sourcesContent":["import { CompanyContext, HotelOverridesContext, useBasket } from '@frontend/contexts';\nimport { useCurrentHotel } from '@frontend/hooks';\nimport { useConfirmationStep } from 'contexts/ConfirmationStepContext/ConfirmationStepContext';\nimport { useHistoryConsistentPush } from 'hooks/HistoryConsistentPush';\nimport React, { useContext, useEffect } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { Trans, useTranslation } from 'react-i18next';\nimport { Translation } from 'translations/Translation';\n\nimport AutoAutoHeight from '@/animations/AutoAutoHeight';\nimport Alert, { AlertType } from '@/components/generic/Alert';\nimport SSLSecureBadge from '@/components/generic/badging/SSLSecureBadge';\nimport BEButton from '@/components/generic/BEButton';\nimport Headline from '@/components/generic/Headline';\nimport Icon, { IconType } from '@/components/generic/Icon/Icon';\nimport LineBreak from '@/components/generic/LineBreak';\nimport LargeLoader from '@/components/generic/loader/LargeLoader';\nimport { PromotionalCodeInput } from '@/components/generic/PromotionalCodeInput';\nimport ScrollToTop from '@/components/generic/ScrollToTop';\nimport Text, { TextType } from '@/components/generic/Text';\nimport TextBox from '@/components/generic/TextBox';\nimport GiftCardRedemption from '@/components/steps/confirmation/GiftCardRedemption';\nimport PaymentInformation from '@/components/steps/confirmation/PaymentInformation';\nimport RoomContactDetails from '@/components/steps/confirmation/RoomContactDetails';\nimport StepConfirmationAcknowledgement from '@/components/steps/confirmation/StepConfirmationAcknowledgement';\nimport { StepConfirmationCommentsComponent } from '@/components/steps/confirmation/StepConfirmationCommentsComponent';\nimport StepConfirmationPoliciesSection from '@/components/steps/confirmation/StepConfirmationPoliciesSection';\nimport StepConfirmationPolicyBlock from '@/components/steps/confirmation/StepConfirmationPolicyBlock';\nimport { useCurrencyDisplay } from '@/hooks/Currency';\nimport { ConfirmationFormValues } from '@/models/Confirmation';\nimport CurrencyProvider from '@/providers/CurrencyProvider';\nimport ConfirmationVerifyFeature from '@/providers/feature/ConfirmationVerifyFeature';\nimport ShowIATANumberOnCheckoutFeature from '@/providers/feature/ShowIATANumberOnCheckoutFeature';\nimport { Color } from '@/util/Color';\nimport getStepRoom from '@/util/GetStepRoom';\nimport { usePaymentHelper } from '@/util/usePaymentHelper';\n\nexport default function StepConfirmationForm() {\n const { t } = useTranslation();\n const { showPromocodeFieldInCheckout } = useContext(HotelOverridesContext);\n const formContext = useFormContext<ConfirmationFormValues>();\n const { isInPaymentMode, isBackFromPlanpay, bookingSource } = useConfirmationStep();\n const basketContext = useBasket();\n const historyConsistentPush = useHistoryConsistentPush();\n const { exclusivePayment } = usePaymentHelper();\n const { currentCurrency } = useContext(CompanyContext);\n const { hotel } = useCurrentHotel();\n\n const returnToPickRooms = async () => {\n historyConsistentPush(getStepRoom().getStepUrl());\n };\n\n // Check if gift card fully covers the booking\n const giftCardAmount = Math.abs(formContext.watch('giftCardAmount') || 0);\n const totalBookingAmount = basketContext.getTotalPrice() || 0;\n const isFullyCoveredByGiftCard = giftCardAmount > 0 && giftCardAmount >= totalBookingAmount;\n\n // Ensure paymentMethod is set when gift card covers everything\n useEffect(() => {\n if (isFullyCoveredByGiftCard && !formContext.getValues('paymentMethod')) {\n formContext.setValue('paymentMethod', 'VGS');\n }\n }, [isFullyCoveredByGiftCard]);\n\n const currencyDisplayEnhancements = useCurrencyDisplay({\n children: basketContext.getTotalPrice(),\n toCurrencyCode: hotel?.defaultCurrency,\n });\n\n const prePaymentInfo = (\n <>\n <div className=\"u-marg-bottom--heavy\">\n <div className=\"u-marg-bottom--light\">\n <Headline bold>{t(Translation.Step.Confirmation.GuestDetails)}</Headline>\n </div>\n <Text type={TextType.Small} color={Color.Success}>\n <strong>{t(Translation.Step.Confirmation.AlmostDone, { required: '*' })}</strong>\n </Text>\n </div>\n <RoomContactDetails />\n {bookingSource === 'inline' && basketContext.canAddAnotherRoom ? (\n <Alert type={AlertType.Accent2} heavyPadding>\n <div className=\"u-flex u-w-100 flex-wrap flex-xl-nowrap\">\n <div>\n <Text color={Color.Accent} bold>\n {t(Translation.Step.Confirmation.WantMoreRooms)}\n </Text>\n <Text color={Color.Navy}>{t(Translation.Step.Confirmation.YouCanAddAndEditRooms)}</Text>\n </div>\n <div className=\"d-flex align-items-center u-marg-top@xl-\">\n <BEButton filled primary icon={IconType.Add} iconPosition=\"left\" onClick={returnToPickRooms}>\n {t(Translation.Step.Confirmation.AddMoreRooms)}\n </BEButton>\n </div>\n </div>\n </Alert>\n ) : (\n <></>\n )}\n {ShowIATANumberOnCheckoutFeature.isActive() && (\n <>\n <div className=\"u-marg-bottom--heavy\">\n <div className=\"u-marg-bottom\">\n <Headline bold>{t(Translation.Step.Confirmation.TravelAgent)}</Headline>\n </div>\n\n <div className=\"u-marg-bottom--light\">\n <Text type={TextType.Small}>\n <strong>{t(Translation.Step.Confirmation.Inputs.IATANumber)}</strong>\n </Text>\n </div>\n <div className=\"u-marg-bottom--light\">\n <Text type={TextType.Small}>{t(Translation.Step.Confirmation.Inputs.IATANumberGuide)}</Text>\n </div>\n <TextBox placeholder={t(Translation.Step.Confirmation.Inputs.IATANumber)} wide {...formContext.register('IATANumber')} />\n </div>\n <LineBreak />\n </>\n )}\n <StepConfirmationCommentsComponent />\n <LineBreak />\n <GiftCardRedemption />\n {!exclusivePayment && (\n <>\n <div className=\"u-marg-bottom--heavy\">\n <div className=\"u-marg-bottom\">\n <Headline bold>{t(Translation.Navigation.Menu.PaymentInformation)}</Headline>\n </div>\n\n {currentCurrency !== hotel?.defaultCurrency && hotel?.defaultCurrency && (\n <div className=\"u-marg-bottom--light rs-confirmation-currency-display-enhancements\">\n <Alert iconAlignCenter icon={IconType.Money} iconColor={Color.Navy} type={AlertType.LightGray}>\n <Text type={TextType.Small} color={Color.Navy}>\n <Trans\n i18nKey={Translation.Step.General.PaymentChargeNotice}\n values={{\n amount: `${CurrencyProvider.getShortSymbol(hotel.defaultCurrency)}${currencyDisplayEnhancements.prettyValue}`,\n currency: hotel.defaultCurrency,\n }}\n components={[<span key=\"0\" />, <u key=\"1\" />]}\n />\n </Text>\n </Alert>\n </div>\n )}\n\n {showPromocodeFieldInCheckout && (\n <div className=\"u-marg-bottom rs-promotional-code-wrapper\">\n <PromotionalCodeInput />\n </div>\n )}\n\n {isFullyCoveredByGiftCard ? (\n <Alert type={AlertType.Success}>\n <div>\n <Text bold>No payment required</Text>\n <Text>Your gift card covers the full booking amount. No additional payment is required.</Text>\n </div>\n </Alert>\n ) : (\n <>\n <PaymentInformation />\n <div className=\"u-marg-top u-flex align-items-center\">\n <div className=\"u-flex align-items-center justify-content-start\">\n <Icon icon={IconType.Lock} color={Color.Success} />\n <div className=\"u-marg-left--light\">\n <Text type={TextType.Small} color={Color.Success}>\n <strong>{t(Translation.Step.Confirmation.Secured)}</strong>\n </Text>\n </div>\n </div>\n <SSLSecureBadge />\n </div>\n </>\n )}\n </div>\n <LineBreak />\n </>\n )}\n <StepConfirmationPoliciesSection />\n <div className=\"u-pad-top--light u-marg-bottom\">\n <StepConfirmationPolicyBlock />\n </div>\n {ConfirmationVerifyFeature.isActive() && (\n <>\n <LineBreak />\n <div>\n <StepConfirmationAcknowledgement />\n </div>\n </>\n )}\n </>\n );\n\n return (\n <form>\n {isBackFromPlanpay ? (\n <LargeLoader />\n ) : (\n <>\n <AutoAutoHeight open={!exclusivePayment || !isInPaymentMode}>{prePaymentInfo}</AutoAutoHeight>\n {exclusivePayment && (\n <AutoAutoHeight open={isInPaymentMode}>\n <ScrollToTop />\n {exclusivePayment.renderPaymentInput?.()}\n </AutoAutoHeight>\n )}\n </>\n )}\n </form>\n );\n}\n"]}
|