@qite/tide-booking-component 1.4.84 → 1.4.86
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/build/build-cjs/index.js +570 -288
- package/build/build-cjs/src/content/footer/types.d.ts +1 -0
- package/build/build-cjs/src/content/navbar/types.d.ts +1 -0
- package/build/build-cjs/src/qsm/components/item-picker/index.d.ts +4 -4
- package/build/build-cjs/src/qsm/store/qsm-slice.d.ts +5 -5
- package/build/build-cjs/src/qsm/types.d.ts +4 -9
- package/build/build-cjs/src/search-results/components/item-picker/index.d.ts +2 -2
- package/build/build-cjs/src/search-results/store/search-results-slice.d.ts +5 -0
- package/build/build-cjs/src/shared/types.d.ts +2 -7
- package/build/build-esm/index.js +570 -288
- package/build/build-esm/src/content/footer/types.d.ts +1 -0
- package/build/build-esm/src/content/navbar/types.d.ts +1 -0
- package/build/build-esm/src/qsm/components/item-picker/index.d.ts +4 -4
- package/build/build-esm/src/qsm/store/qsm-slice.d.ts +5 -5
- package/build/build-esm/src/qsm/types.d.ts +4 -9
- package/build/build-esm/src/search-results/components/item-picker/index.d.ts +2 -2
- package/build/build-esm/src/search-results/store/search-results-slice.d.ts +5 -0
- package/build/build-esm/src/shared/types.d.ts +2 -7
- package/package.json +2 -2
- package/src/content/features/content-page/content-page-self-contained.tsx +17 -17
- package/src/content/footer/index.tsx +4 -1
- package/src/content/footer/types.ts +1 -0
- package/src/content/navbar/index.tsx +17 -2
- package/src/content/navbar/types.ts +1 -0
- package/src/qsm/components/item-picker/index.tsx +10 -13
- package/src/qsm/components/travel-class-picker/index.tsx +3 -2
- package/src/qsm/components/travel-nationality-picker/index.tsx +3 -2
- package/src/qsm/components/travel-type-picker/index.tsx +3 -2
- package/src/qsm/store/qsm-slice.ts +5 -5
- package/src/qsm/types.ts +5 -10
- package/src/search-results/components/item-picker/index.tsx +2 -2
- package/src/search-results/components/search-results-container/flight-search-results.tsx +5 -5
- package/src/search-results/components/search-results-container/search-results-container.tsx +96 -4
- package/src/search-results/store/search-results-slice.ts +6 -0
- package/src/shared/components/flyin/accommodation-flyin.tsx +373 -157
- package/src/shared/types.ts +13 -7
- package/styles/components/_flyin.scss +187 -158
- package/styles/components/_footer.scss +1 -0
- package/styles/components/_navbar.scss +1 -0
package/build/build-esm/index.js
CHANGED
|
@@ -6753,7 +6753,7 @@ var DepartureRange;
|
|
|
6753
6753
|
DepartureRange[(DepartureRange['Night'] = 3)] = 'Night';
|
|
6754
6754
|
})(DepartureRange || (DepartureRange = {}));
|
|
6755
6755
|
|
|
6756
|
-
var formatPrice = function (price, currencyCode, locale) {
|
|
6756
|
+
var formatPrice$1 = function (price, currencyCode, locale) {
|
|
6757
6757
|
if (locale === void 0) {
|
|
6758
6758
|
locale = 'nl-BE';
|
|
6759
6759
|
}
|
|
@@ -6860,7 +6860,7 @@ function getLocale(code) {
|
|
|
6860
6860
|
}
|
|
6861
6861
|
}
|
|
6862
6862
|
var getPriceDifferenceText = function (price, currencyCode) {
|
|
6863
|
-
return price > 0 ? '+ '.concat(formatPrice(Math.abs(price), currencyCode)) : '- '.concat(formatPrice(Math.abs(price), currencyCode));
|
|
6863
|
+
return price > 0 ? '+ '.concat(formatPrice$1(Math.abs(price), currencyCode)) : '- '.concat(formatPrice$1(Math.abs(price), currencyCode));
|
|
6864
6864
|
};
|
|
6865
6865
|
function format(text, args) {
|
|
6866
6866
|
return text.replace(/{([0-9]+)}/g, function (match, index) {
|
|
@@ -13584,16 +13584,16 @@ var formatPriceByMode = function (price, priceMode, personCount, duration, perPe
|
|
|
13584
13584
|
if (!price) return '';
|
|
13585
13585
|
switch (priceMode) {
|
|
13586
13586
|
case 0:
|
|
13587
|
-
return ''.concat(formatPrice(price, currencyCode));
|
|
13587
|
+
return ''.concat(formatPrice$1(price, currencyCode));
|
|
13588
13588
|
case 1:
|
|
13589
13589
|
var perPersonPrice = price / personCount;
|
|
13590
|
-
return ''.concat(formatPrice(perPersonPrice, currencyCode), ' / ').concat(perPersonLabel);
|
|
13590
|
+
return ''.concat(formatPrice$1(perPersonPrice, currencyCode), ' / ').concat(perPersonLabel);
|
|
13591
13591
|
case 2:
|
|
13592
13592
|
var perNightPrice = price / duration;
|
|
13593
|
-
return ''.concat(formatPrice(perNightPrice, currencyCode), ' / ').concat(perNightLabel);
|
|
13593
|
+
return ''.concat(formatPrice$1(perNightPrice, currencyCode), ' / ').concat(perNightLabel);
|
|
13594
13594
|
case 3:
|
|
13595
13595
|
var perPersonPerNightPrice = price / duration;
|
|
13596
|
-
return ''.concat(formatPrice(perPersonPerNightPrice, currencyCode), ' / ').concat(perPersonPerNightLabel);
|
|
13596
|
+
return ''.concat(formatPrice$1(perPersonPerNightPrice, currencyCode), ' / ').concat(perPersonPerNightLabel);
|
|
13597
13597
|
}
|
|
13598
13598
|
};
|
|
13599
13599
|
|
|
@@ -22000,7 +22000,7 @@ var NoneOption = function (_a) {
|
|
|
22000
22000
|
return x.requirementType === 2;
|
|
22001
22001
|
});
|
|
22002
22002
|
var noneSelected = !selectedOption;
|
|
22003
|
-
var priceDifferencetext = selectedOption ? '- '.concat(formatPrice(Math.abs(selectedOption.line.price), currencyCode)) : '';
|
|
22003
|
+
var priceDifferencetext = selectedOption ? '- '.concat(formatPrice$1(Math.abs(selectedOption.line.price), currencyCode)) : '';
|
|
22004
22004
|
return React__default.createElement(
|
|
22005
22005
|
React__default.Fragment,
|
|
22006
22006
|
null,
|
|
@@ -23273,7 +23273,7 @@ var OptionRoom = function (_a) {
|
|
|
23273
23273
|
e.preventDefault();
|
|
23274
23274
|
};
|
|
23275
23275
|
var getPriceDifferenceText = function (price) {
|
|
23276
|
-
return price > 0 ? '+ '.concat(formatPrice(Math.abs(price), currencyCode)) : '- '.concat(formatPrice(Math.abs(price), currencyCode));
|
|
23276
|
+
return price > 0 ? '+ '.concat(formatPrice$1(Math.abs(price), currencyCode)) : '- '.concat(formatPrice$1(Math.abs(price), currencyCode));
|
|
23277
23277
|
};
|
|
23278
23278
|
var getAccommodationPriceDifference = function (accommodation) {
|
|
23279
23279
|
var _a;
|
|
@@ -24793,7 +24793,7 @@ var Sidebar = function (_a) {
|
|
|
24793
24793
|
{ className: 'pricing-summary__property' },
|
|
24794
24794
|
React__default.createElement('h6', { className: 'pricing-summary__title' }, translations.SIDEBAR.BASE_PRICE)
|
|
24795
24795
|
),
|
|
24796
|
-
React__default.createElement('div', { className: 'pricing-summary__value' }, formatPrice(basePrice, currencyCode))
|
|
24796
|
+
React__default.createElement('div', { className: 'pricing-summary__value' }, formatPrice$1(basePrice, currencyCode))
|
|
24797
24797
|
),
|
|
24798
24798
|
basePricePerPaxType &&
|
|
24799
24799
|
basePricePerPaxType.map(function (ppt, index) {
|
|
@@ -24810,7 +24810,7 @@ var Sidebar = function (_a) {
|
|
|
24810
24810
|
' ',
|
|
24811
24811
|
getPaxTypeTranslation(translations, ppt.paxType, ppt.numberOfPax)
|
|
24812
24812
|
),
|
|
24813
|
-
React__default.createElement('div', { className: 'pricing-summary__value' }, formatPrice(ppt.pricePerPaxType, currencyCode))
|
|
24813
|
+
React__default.createElement('div', { className: 'pricing-summary__value' }, formatPrice$1(ppt.pricePerPaxType, currencyCode))
|
|
24814
24814
|
),
|
|
24815
24815
|
ppt.details.map(function (detail, dIndex) {
|
|
24816
24816
|
return React__default.createElement(
|
|
@@ -24823,7 +24823,7 @@ var Sidebar = function (_a) {
|
|
|
24823
24823
|
React__default.createElement(
|
|
24824
24824
|
'div',
|
|
24825
24825
|
{ className: 'pricing-summary__value' },
|
|
24826
|
-
formatPrice(detail.price / detail.numberOfPax, currencyCode)
|
|
24826
|
+
formatPrice$1(detail.price / detail.numberOfPax, currencyCode)
|
|
24827
24827
|
)
|
|
24828
24828
|
);
|
|
24829
24829
|
})
|
|
@@ -24850,7 +24850,7 @@ var Sidebar = function (_a) {
|
|
|
24850
24850
|
React__default.createElement(
|
|
24851
24851
|
'div',
|
|
24852
24852
|
{ className: 'pricing-summary__value' },
|
|
24853
|
-
formatPrice(priceDetail.price * priceDetail.amount, currencyCode)
|
|
24853
|
+
formatPrice$1(priceDetail.price * priceDetail.amount, currencyCode)
|
|
24854
24854
|
)
|
|
24855
24855
|
),
|
|
24856
24856
|
React__default.createElement(
|
|
@@ -24885,7 +24885,7 @@ var Sidebar = function (_a) {
|
|
|
24885
24885
|
React__default.createElement(
|
|
24886
24886
|
'div',
|
|
24887
24887
|
{ className: 'pricing-summary__value' },
|
|
24888
|
-
formatPrice(priceDetail.price * priceDetail.amount, currencyCode)
|
|
24888
|
+
formatPrice$1(priceDetail.price * priceDetail.amount, currencyCode)
|
|
24889
24889
|
)
|
|
24890
24890
|
),
|
|
24891
24891
|
React__default.createElement(
|
|
@@ -24915,7 +24915,7 @@ var Sidebar = function (_a) {
|
|
|
24915
24915
|
React__default.createElement(
|
|
24916
24916
|
'div',
|
|
24917
24917
|
{ className: 'pricing-summary__value' },
|
|
24918
|
-
formatPrice(ppt.pricePerPaxType, currencyCode)
|
|
24918
|
+
formatPrice$1(ppt.pricePerPaxType, currencyCode)
|
|
24919
24919
|
)
|
|
24920
24920
|
),
|
|
24921
24921
|
ppt.details.map(function (detail, dIndex) {
|
|
@@ -24935,7 +24935,7 @@ var Sidebar = function (_a) {
|
|
|
24935
24935
|
React__default.createElement(
|
|
24936
24936
|
'div',
|
|
24937
24937
|
{ className: 'pricing-summary__value' },
|
|
24938
|
-
formatPrice(detail.price / detail.numberOfPax, currencyCode)
|
|
24938
|
+
formatPrice$1(detail.price / detail.numberOfPax, currencyCode)
|
|
24939
24939
|
)
|
|
24940
24940
|
);
|
|
24941
24941
|
})
|
|
@@ -24977,7 +24977,7 @@ var Sidebar = function (_a) {
|
|
|
24977
24977
|
React__default.createElement(
|
|
24978
24978
|
'div',
|
|
24979
24979
|
{ className: 'pricing' },
|
|
24980
|
-
React__default.createElement('div', { className: 'pricing__price' }, formatPrice(totalPrice, currencyCode))
|
|
24980
|
+
React__default.createElement('div', { className: 'pricing__price' }, formatPrice$1(totalPrice, currencyCode))
|
|
24981
24981
|
)
|
|
24982
24982
|
)
|
|
24983
24983
|
),
|
|
@@ -24995,7 +24995,7 @@ var Sidebar = function (_a) {
|
|
|
24995
24995
|
React__default.createElement(
|
|
24996
24996
|
'div',
|
|
24997
24997
|
{ className: 'pricing' },
|
|
24998
|
-
React__default.createElement('div', { className: 'pricing__price' }, formatPrice(deposit, currencyCode))
|
|
24998
|
+
React__default.createElement('div', { className: 'pricing__price' }, formatPrice$1(deposit, currencyCode))
|
|
24999
24999
|
)
|
|
25000
25000
|
)
|
|
25001
25001
|
),
|
|
@@ -25011,7 +25011,7 @@ var Sidebar = function (_a) {
|
|
|
25011
25011
|
translations.SIDEBAR.DEPOSIT_TEXT1,
|
|
25012
25012
|
React__default.createElement('strong', null, translations.SIDEBAR.DEPOSIT_TEXT2),
|
|
25013
25013
|
translations.SIDEBAR.DEPOSIT_TEXT3,
|
|
25014
|
-
formatPrice(remainingAmount, currencyCode),
|
|
25014
|
+
formatPrice$1(remainingAmount, currencyCode),
|
|
25015
25015
|
translations.SIDEBAR.DEPOSIT_TEXT4,
|
|
25016
25016
|
React__default.createElement('strong', null, translations.SIDEBAR.DEPOSIT_TEXT5),
|
|
25017
25017
|
translations.SIDEBAR.DEPOSIT_TEXT6
|
|
@@ -25038,7 +25038,7 @@ var Sidebar = function (_a) {
|
|
|
25038
25038
|
React__default.createElement(
|
|
25039
25039
|
'div',
|
|
25040
25040
|
{ className: 'pricing' },
|
|
25041
|
-
React__default.createElement('div', { className: 'pricing__price' }, formatPrice(totalPrice, currencyCode))
|
|
25041
|
+
React__default.createElement('div', { className: 'pricing__price' }, formatPrice$1(totalPrice, currencyCode))
|
|
25042
25042
|
)
|
|
25043
25043
|
)
|
|
25044
25044
|
)
|
|
@@ -29830,6 +29830,7 @@ var Navbar = function (_a) {
|
|
|
29830
29830
|
var _b;
|
|
29831
29831
|
var currentPath = _a.currentPath,
|
|
29832
29832
|
logo = _a.logo,
|
|
29833
|
+
onLogoClick = _a.onLogoClick,
|
|
29833
29834
|
topLinks = _a.topLinks,
|
|
29834
29835
|
items = _a.items,
|
|
29835
29836
|
language = _a.language,
|
|
@@ -30122,7 +30123,7 @@ var Navbar = function (_a) {
|
|
|
30122
30123
|
React__default.createElement(
|
|
30123
30124
|
'div',
|
|
30124
30125
|
{ className: 'nav__container' },
|
|
30125
|
-
React__default.createElement('div', { className: 'nav__logo' }, logo),
|
|
30126
|
+
React__default.createElement('div', { className: 'nav__logo', onClick: onLogoClick }, logo),
|
|
30126
30127
|
React__default.createElement(
|
|
30127
30128
|
'div',
|
|
30128
30129
|
{ className: 'nav__wrapper' },
|
|
@@ -30368,6 +30369,7 @@ var defaultPayments = [
|
|
|
30368
30369
|
var Footer = function (_a) {
|
|
30369
30370
|
var className = _a.className,
|
|
30370
30371
|
logo = _a.logo,
|
|
30372
|
+
onLogoClick = _a.onLogoClick,
|
|
30371
30373
|
_b = _a.social,
|
|
30372
30374
|
social = _b === void 0 ? defaultSocial : _b,
|
|
30373
30375
|
_c = _a.columns,
|
|
@@ -30387,7 +30389,7 @@ var Footer = function (_a) {
|
|
|
30387
30389
|
{ className: 'footer__top' },
|
|
30388
30390
|
React__default.createElement(
|
|
30389
30391
|
'div',
|
|
30390
|
-
{ className: 'footer__logo' },
|
|
30392
|
+
{ className: 'footer__logo', onClick: onLogoClick },
|
|
30391
30393
|
logo !== null && logo !== void 0 ? logo : React__default.createElement(DefaultLogo, null)
|
|
30392
30394
|
),
|
|
30393
30395
|
React__default.createElement(
|
|
@@ -32921,16 +32923,16 @@ var ItemPicker$1 = function (_a) {
|
|
|
32921
32923
|
label = _a.label,
|
|
32922
32924
|
placeholder = _a.placeholder,
|
|
32923
32925
|
classModifier = _a.classModifier,
|
|
32926
|
+
valueFormatter = _a.valueFormatter,
|
|
32924
32927
|
onPick = _a.onPick;
|
|
32925
|
-
var dispatch = useDispatch();
|
|
32926
32928
|
var _b = useState(false),
|
|
32927
32929
|
isDropdownOpen = _b[0],
|
|
32928
32930
|
setIsDropdownOpen = _b[1];
|
|
32929
32931
|
var dropdownRef = useRef(null);
|
|
32930
32932
|
var toggleButtonRef = useRef(null);
|
|
32931
|
-
var handlePick = function (picked) {
|
|
32933
|
+
var handlePick = function (picked, id) {
|
|
32932
32934
|
setIsDropdownOpen(false);
|
|
32933
|
-
|
|
32935
|
+
onPick(picked, id);
|
|
32934
32936
|
};
|
|
32935
32937
|
useEffect(function () {
|
|
32936
32938
|
var handleClickOutside = function (event) {
|
|
@@ -32969,20 +32971,21 @@ var ItemPicker$1 = function (_a) {
|
|
|
32969
32971
|
'ul',
|
|
32970
32972
|
{ className: 'dropdown-menu' },
|
|
32971
32973
|
items.map(function (_a) {
|
|
32972
|
-
var
|
|
32974
|
+
var id = _a.id,
|
|
32975
|
+
label = _a.label,
|
|
32973
32976
|
icon = _a.icon;
|
|
32974
32977
|
return React__default.createElement(
|
|
32975
32978
|
'li',
|
|
32976
32979
|
{
|
|
32977
32980
|
key: label,
|
|
32978
32981
|
onClick: function (e) {
|
|
32979
|
-
handlePick(label);
|
|
32982
|
+
handlePick(label, id);
|
|
32980
32983
|
e.stopPropagation();
|
|
32981
32984
|
},
|
|
32982
32985
|
className: 'dropdown-menu__item'.concat(selection === label ? ' dropdown-menu__item--selected' : '')
|
|
32983
32986
|
},
|
|
32984
32987
|
icon && React__default.createElement('span', { className: 'travel-class-icon' }, icon),
|
|
32985
|
-
label
|
|
32988
|
+
valueFormatter ? valueFormatter(id, label) : label
|
|
32986
32989
|
);
|
|
32987
32990
|
})
|
|
32988
32991
|
)
|
|
@@ -32999,13 +33002,16 @@ var TravelClassPicker = function () {
|
|
|
32999
33002
|
var selectedTravelClass = useSelector(function (state) {
|
|
33000
33003
|
return state.qsm;
|
|
33001
33004
|
}).selectedTravelClass;
|
|
33005
|
+
var dispatch = useDispatch();
|
|
33002
33006
|
return React__default.createElement(ItemPicker$1, {
|
|
33003
33007
|
items: travelClasses,
|
|
33004
33008
|
selection: selectedTravelClass,
|
|
33005
33009
|
label: translations.QSM.TRAVEL_CLASS_LABEL,
|
|
33006
33010
|
placeholder: translations.QSM.TRAVEL_CLASS_PLACEHOLDER,
|
|
33007
33011
|
classModifier: 'travel-class-picker__items',
|
|
33008
|
-
onPick:
|
|
33012
|
+
onPick: function (picked) {
|
|
33013
|
+
return dispatch(setSelectedTravelClass(picked));
|
|
33014
|
+
}
|
|
33009
33015
|
});
|
|
33010
33016
|
};
|
|
33011
33017
|
|
|
@@ -33018,13 +33024,16 @@ var TravelTypePicker = function () {
|
|
|
33018
33024
|
var selectedTravelType = useSelector(function (state) {
|
|
33019
33025
|
return state.qsm;
|
|
33020
33026
|
}).selectedTravelType;
|
|
33027
|
+
var dispatch = useDispatch();
|
|
33021
33028
|
return React__default.createElement(ItemPicker$1, {
|
|
33022
33029
|
items: travelTypes,
|
|
33023
33030
|
selection: selectedTravelType,
|
|
33024
33031
|
label: translations.QSM.TRAVEL_TYPE_LABEL,
|
|
33025
33032
|
placeholder: translations.QSM.TRAVEL_TYPE_PLACEHOLDER,
|
|
33026
33033
|
classModifier: 'travel-type-picker__items',
|
|
33027
|
-
onPick:
|
|
33034
|
+
onPick: function (picked) {
|
|
33035
|
+
return dispatch(setSelectedTravelType(picked));
|
|
33036
|
+
}
|
|
33028
33037
|
});
|
|
33029
33038
|
};
|
|
33030
33039
|
|
|
@@ -33037,13 +33046,16 @@ var TravelNationalityPicker = function () {
|
|
|
33037
33046
|
var selectedNationality = useSelector(function (state) {
|
|
33038
33047
|
return state.qsm;
|
|
33039
33048
|
}).selectedNationality;
|
|
33049
|
+
var dispatch = useDispatch();
|
|
33040
33050
|
return React__default.createElement(ItemPicker$1, {
|
|
33041
33051
|
items: nationalities,
|
|
33042
33052
|
selection: selectedNationality,
|
|
33043
33053
|
label: translations.QSM.NATIONALITY_LABEL,
|
|
33044
33054
|
placeholder: translations.QSM.NATIONALITY_PLACEHOLDER,
|
|
33045
33055
|
classModifier: 'travel-class-picker__items',
|
|
33046
|
-
onPick:
|
|
33056
|
+
onPick: function (picked) {
|
|
33057
|
+
return dispatch(setSelectedNationality(picked));
|
|
33058
|
+
}
|
|
33047
33059
|
});
|
|
33048
33060
|
};
|
|
33049
33061
|
|
|
@@ -33525,6 +33537,7 @@ var initialState$1 = {
|
|
|
33525
33537
|
selectedSearchResultId: null,
|
|
33526
33538
|
packagingAccoResults: [],
|
|
33527
33539
|
filteredPackagingAccoResults: [],
|
|
33540
|
+
packagingAccoSearchDetails: [],
|
|
33528
33541
|
selectedPackagingAccoResultCode: null,
|
|
33529
33542
|
selectedFlight: null,
|
|
33530
33543
|
selectedFlightDetails: null,
|
|
@@ -33556,6 +33569,9 @@ var searchResultsSlice = createSlice({
|
|
|
33556
33569
|
setFilteredPackagingAccoResults: function (state, action) {
|
|
33557
33570
|
state.filteredPackagingAccoResults = action.payload;
|
|
33558
33571
|
},
|
|
33572
|
+
setPackagingAccoSearchDetails: function (state, action) {
|
|
33573
|
+
state.packagingAccoSearchDetails = action.payload;
|
|
33574
|
+
},
|
|
33559
33575
|
setSelectedPackagingAccoResult: function (state, action) {
|
|
33560
33576
|
state.selectedPackagingAccoResultCode = action.payload;
|
|
33561
33577
|
},
|
|
@@ -33627,6 +33643,7 @@ var setResults = ((_a = searchResultsSlice.actions), _a.setResults),
|
|
|
33627
33643
|
setSelectedSearchResult = _a.setSelectedSearchResult,
|
|
33628
33644
|
setPackagingAccoResults = _a.setPackagingAccoResults,
|
|
33629
33645
|
setFilteredPackagingAccoResults = _a.setFilteredPackagingAccoResults,
|
|
33646
|
+
setPackagingAccoSearchDetails = _a.setPackagingAccoSearchDetails,
|
|
33630
33647
|
setSelectedPackagingAccoResult = _a.setSelectedPackagingAccoResult,
|
|
33631
33648
|
setSelectedFlight = _a.setSelectedFlight,
|
|
33632
33649
|
setSelectedFlightDetails = _a.setSelectedFlightDetails,
|
|
@@ -34823,7 +34840,7 @@ var Itinerary = function (_a) {
|
|
|
34823
34840
|
React__default.createElement(
|
|
34824
34841
|
'h3',
|
|
34825
34842
|
{ className: 'search__filter__prices--amount' },
|
|
34826
|
-
formatPrice(
|
|
34843
|
+
formatPrice$1(
|
|
34827
34844
|
((entry === null || entry === void 0 ? void 0 : entry.sellingPrice) || 0) /
|
|
34828
34845
|
((entry === null || entry === void 0 ? void 0 : entry.numberOfPax) || 1),
|
|
34829
34846
|
(entry === null || entry === void 0 ? void 0 : entry.currencyCode) || 'EUR'
|
|
@@ -34837,7 +34854,7 @@ var Itinerary = function (_a) {
|
|
|
34837
34854
|
'strong',
|
|
34838
34855
|
null,
|
|
34839
34856
|
'(',
|
|
34840
|
-
formatPrice(
|
|
34857
|
+
formatPrice$1(
|
|
34841
34858
|
(entry === null || entry === void 0 ? void 0 : entry.sellingPrice) || 0,
|
|
34842
34859
|
(entry === null || entry === void 0 ? void 0 : entry.currencyCode) || 'EUR'
|
|
34843
34860
|
),
|
|
@@ -37872,295 +37889,441 @@ var FlightsFlyIn = function (_a) {
|
|
|
37872
37889
|
);
|
|
37873
37890
|
};
|
|
37874
37891
|
|
|
37875
|
-
var
|
|
37876
|
-
|
|
37877
|
-
|
|
37878
|
-
|
|
37879
|
-
|
|
37880
|
-
|
|
37881
|
-
|
|
37892
|
+
var formatPrice = function (price, currencyCode) {
|
|
37893
|
+
if (currencyCode === void 0) {
|
|
37894
|
+
currencyCode = 'EUR';
|
|
37895
|
+
}
|
|
37896
|
+
if (typeof price !== 'number') return '';
|
|
37897
|
+
return new Intl.NumberFormat('nl-BE', {
|
|
37898
|
+
style: 'currency',
|
|
37899
|
+
currency: currencyCode
|
|
37900
|
+
}).format(price);
|
|
37901
|
+
};
|
|
37882
37902
|
var AccommodationFlyIn = function (_a) {
|
|
37883
37903
|
var _b;
|
|
37884
37904
|
_a.isLoading;
|
|
37885
37905
|
var isOpen = _a.isOpen,
|
|
37886
37906
|
setIsOpen = _a.setIsOpen;
|
|
37907
|
+
var dispatch = useDispatch();
|
|
37887
37908
|
var context = useContext(SearchResultsConfigurationContext);
|
|
37888
37909
|
var language = (_b = context === null || context === void 0 ? void 0 : context.languageCode) !== null && _b !== void 0 ? _b : 'en-GB';
|
|
37889
37910
|
var translations = getTranslations(language);
|
|
37890
|
-
useSelector(function (state) {
|
|
37891
|
-
|
|
37892
|
-
|
|
37893
|
-
|
|
37894
|
-
|
|
37895
|
-
|
|
37911
|
+
var _c = useSelector(function (state) {
|
|
37912
|
+
return state.searchResults;
|
|
37913
|
+
}),
|
|
37914
|
+
packagingAccoSearchDetails = _c.packagingAccoSearchDetails,
|
|
37915
|
+
selectedPackagingAccoResultCode = _c.selectedPackagingAccoResultCode;
|
|
37916
|
+
var selectedPackagingAccoSearchDetails = useMemo(
|
|
37917
|
+
function () {
|
|
37918
|
+
return packagingAccoSearchDetails === null || packagingAccoSearchDetails === void 0
|
|
37919
|
+
? void 0
|
|
37920
|
+
: packagingAccoSearchDetails.find(function (x) {
|
|
37921
|
+
return x.code === selectedPackagingAccoResultCode;
|
|
37922
|
+
});
|
|
37923
|
+
},
|
|
37924
|
+
[packagingAccoSearchDetails, selectedPackagingAccoResultCode]
|
|
37925
|
+
);
|
|
37926
|
+
var groupedRooms = useMemo(
|
|
37927
|
+
function () {
|
|
37928
|
+
if (!(selectedPackagingAccoSearchDetails === null || selectedPackagingAccoSearchDetails === void 0 ? void 0 : selectedPackagingAccoSearchDetails.rooms))
|
|
37929
|
+
return [];
|
|
37930
|
+
return selectedPackagingAccoSearchDetails.rooms.map(function (room) {
|
|
37931
|
+
var groupedMap = new Map();
|
|
37932
|
+
room.options.forEach(function (option) {
|
|
37933
|
+
var _a;
|
|
37934
|
+
var key = option.accommodationCode;
|
|
37935
|
+
if (!groupedMap.has(key)) {
|
|
37936
|
+
groupedMap.set(key, {
|
|
37937
|
+
accommodationCode: option.accommodationCode,
|
|
37938
|
+
accommodationName: option.accommodationName,
|
|
37939
|
+
regimes: []
|
|
37940
|
+
});
|
|
37941
|
+
}
|
|
37942
|
+
(_a = groupedMap.get(key)) === null || _a === void 0
|
|
37943
|
+
? void 0
|
|
37944
|
+
: _a.regimes.push({
|
|
37945
|
+
id: option.guid,
|
|
37946
|
+
label: option.regimeName
|
|
37947
|
+
});
|
|
37948
|
+
});
|
|
37949
|
+
return Array.from(groupedMap.values());
|
|
37950
|
+
});
|
|
37951
|
+
},
|
|
37952
|
+
[selectedPackagingAccoSearchDetails]
|
|
37953
|
+
);
|
|
37954
|
+
var getSelectedOptionForRoom = function (roomIndex) {
|
|
37955
|
+
var _a, _b, _c;
|
|
37956
|
+
return (_c =
|
|
37957
|
+
(_b =
|
|
37958
|
+
(_a =
|
|
37959
|
+
selectedPackagingAccoSearchDetails === null || selectedPackagingAccoSearchDetails === void 0 ? void 0 : selectedPackagingAccoSearchDetails.rooms) ===
|
|
37960
|
+
null || _a === void 0
|
|
37961
|
+
? void 0
|
|
37962
|
+
: _a[roomIndex]) === null || _b === void 0
|
|
37963
|
+
? void 0
|
|
37964
|
+
: _b.options) === null || _c === void 0
|
|
37965
|
+
? void 0
|
|
37966
|
+
: _c.find(function (option) {
|
|
37967
|
+
return option.isSelected;
|
|
37968
|
+
});
|
|
37969
|
+
};
|
|
37970
|
+
var getSelectedOptionForAccommodation = function (roomIndex, accommodationCode) {
|
|
37971
|
+
var _a, _b, _c;
|
|
37972
|
+
return (_c =
|
|
37973
|
+
(_b =
|
|
37974
|
+
(_a =
|
|
37975
|
+
selectedPackagingAccoSearchDetails === null || selectedPackagingAccoSearchDetails === void 0 ? void 0 : selectedPackagingAccoSearchDetails.rooms) ===
|
|
37976
|
+
null || _a === void 0
|
|
37977
|
+
? void 0
|
|
37978
|
+
: _a[roomIndex]) === null || _b === void 0
|
|
37979
|
+
? void 0
|
|
37980
|
+
: _b.options) === null || _c === void 0
|
|
37981
|
+
? void 0
|
|
37982
|
+
: _c.find(function (option) {
|
|
37983
|
+
return option.accommodationCode === accommodationCode && option.isSelected;
|
|
37984
|
+
});
|
|
37985
|
+
};
|
|
37986
|
+
var handlePick = function (roomIndex, selectedGuid) {
|
|
37987
|
+
if (!packagingAccoSearchDetails || !selectedPackagingAccoSearchDetails) return;
|
|
37988
|
+
var updatedPackagingAccoSearchDetails = packagingAccoSearchDetails.map(function (product) {
|
|
37989
|
+
if (product.code !== selectedPackagingAccoSearchDetails.code) {
|
|
37990
|
+
return product;
|
|
37991
|
+
}
|
|
37992
|
+
var updatedRooms = product.rooms.map(function (room, currentRoomIndex) {
|
|
37993
|
+
if (currentRoomIndex !== roomIndex) {
|
|
37994
|
+
return room;
|
|
37995
|
+
}
|
|
37996
|
+
return __assign(__assign({}, room), {
|
|
37997
|
+
options: room.options.map(function (option) {
|
|
37998
|
+
return __assign(__assign({}, option), { isSelected: option.guid === selectedGuid });
|
|
37999
|
+
})
|
|
38000
|
+
});
|
|
38001
|
+
});
|
|
38002
|
+
return __assign(__assign({}, product), { rooms: updatedRooms });
|
|
38003
|
+
});
|
|
38004
|
+
dispatch(setPackagingAccoSearchDetails(updatedPackagingAccoSearchDetails));
|
|
38005
|
+
};
|
|
37896
38006
|
var handleConfirm = function () {
|
|
37897
38007
|
if (isOpen) {
|
|
37898
38008
|
setIsOpen(false);
|
|
37899
38009
|
}
|
|
37900
38010
|
};
|
|
38011
|
+
if (!selectedPackagingAccoSearchDetails) {
|
|
38012
|
+
return null;
|
|
38013
|
+
}
|
|
38014
|
+
var calculateTotalPrice = function () {
|
|
38015
|
+
var selectedOptions = selectedPackagingAccoSearchDetails.rooms.flatMap(function (room) {
|
|
38016
|
+
return room.options.filter(function (option) {
|
|
38017
|
+
return option.isSelected;
|
|
38018
|
+
});
|
|
38019
|
+
});
|
|
38020
|
+
var totalPrice = selectedOptions.reduce(function (total, option) {
|
|
38021
|
+
return total + (option.price || 0);
|
|
38022
|
+
}, 0);
|
|
38023
|
+
return formatPrice(totalPrice, selectedPackagingAccoSearchDetails.currencyCode);
|
|
38024
|
+
};
|
|
38025
|
+
var getPriceDifference = function (currentSelectedPrice, roomIndex, accommodationCode, regimeId) {
|
|
38026
|
+
var targetPrice = 0;
|
|
38027
|
+
var selectedOption = getSelectedOptionForAccommodation(roomIndex, accommodationCode);
|
|
38028
|
+
if (selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.price) {
|
|
38029
|
+
targetPrice = selectedOption.price;
|
|
38030
|
+
} else {
|
|
38031
|
+
var firstOption = selectedPackagingAccoSearchDetails.rooms[roomIndex].options.find(function (option) {
|
|
38032
|
+
return option.accommodationCode === accommodationCode;
|
|
38033
|
+
});
|
|
38034
|
+
targetPrice = (firstOption === null || firstOption === void 0 ? void 0 : firstOption.price) || 0;
|
|
38035
|
+
}
|
|
38036
|
+
if (regimeId) {
|
|
38037
|
+
var regimeOption = selectedPackagingAccoSearchDetails.rooms[roomIndex].options.find(function (option) {
|
|
38038
|
+
return option.guid === regimeId;
|
|
38039
|
+
});
|
|
38040
|
+
targetPrice = (regimeOption === null || regimeOption === void 0 ? void 0 : regimeOption.price) || 0;
|
|
38041
|
+
}
|
|
38042
|
+
return targetPrice - (currentSelectedPrice || 0);
|
|
38043
|
+
};
|
|
38044
|
+
var formatPriceDifference = function (difference, currencyCode) {
|
|
38045
|
+
if (difference === 0) {
|
|
38046
|
+
return null;
|
|
38047
|
+
}
|
|
38048
|
+
var formattedAbsoluteValue = formatPrice(Math.abs(difference), currencyCode);
|
|
38049
|
+
return ''.concat(difference > 0 ? '+' : '-', ' ').concat(formattedAbsoluteValue);
|
|
38050
|
+
};
|
|
38051
|
+
var getPriceDifferenceClassName = function (difference) {
|
|
38052
|
+
if (difference < 0) {
|
|
38053
|
+
return 'flyin__acco__price flyin__acco__price--decrease';
|
|
38054
|
+
}
|
|
38055
|
+
if (difference > 0) {
|
|
38056
|
+
return 'flyin__acco__price flyin__acco__price--increase';
|
|
38057
|
+
}
|
|
38058
|
+
return 'flyin__acco__price';
|
|
38059
|
+
};
|
|
38060
|
+
var regimeFormatter = function (roomIndex, accommodation, regimeId, label) {
|
|
38061
|
+
var roomOption = getSelectedOptionForRoom(roomIndex);
|
|
38062
|
+
var difference = getPriceDifference(
|
|
38063
|
+
roomOption === null || roomOption === void 0 ? void 0 : roomOption.price,
|
|
38064
|
+
roomIndex,
|
|
38065
|
+
accommodation.accommodationCode,
|
|
38066
|
+
regimeId
|
|
38067
|
+
);
|
|
38068
|
+
return ''
|
|
38069
|
+
.concat(label, ' ')
|
|
38070
|
+
.concat(difference !== 0 ? '('.concat(formatPriceDifference(difference, selectedPackagingAccoSearchDetails.currencyCode), ')') : '');
|
|
38071
|
+
};
|
|
37901
38072
|
return React__default.createElement(
|
|
37902
38073
|
React__default.Fragment,
|
|
37903
38074
|
null,
|
|
37904
38075
|
React__default.createElement(
|
|
37905
38076
|
'div',
|
|
37906
38077
|
{ className: 'flyin__content' },
|
|
37907
|
-
|
|
37908
|
-
|
|
37909
|
-
|
|
37910
|
-
React__default.createElement(
|
|
38078
|
+
groupedRooms.map(function (roomAccommodations, roomIndex) {
|
|
38079
|
+
var selectedRoomOption = getSelectedOptionForRoom(roomIndex);
|
|
38080
|
+
return React__default.createElement(
|
|
37911
38081
|
'div',
|
|
37912
|
-
{ className: '
|
|
38082
|
+
{ className: 'flyin__acco', key: 'room-'.concat(roomIndex) },
|
|
38083
|
+
React__default.createElement('h3', { className: 'flyin__acco__room-title' }, 'Room ', roomIndex + 1),
|
|
37913
38084
|
React__default.createElement(
|
|
37914
38085
|
'div',
|
|
37915
|
-
{ className: '
|
|
37916
|
-
|
|
37917
|
-
|
|
37918
|
-
|
|
37919
|
-
|
|
37920
|
-
|
|
37921
|
-
|
|
37922
|
-
|
|
37923
|
-
|
|
37924
|
-
React__default.createElement(
|
|
37925
|
-
'div',
|
|
37926
|
-
{ className: 'flyin__acco__price__wrapper' },
|
|
37927
|
-
React__default.createElement(
|
|
37928
|
-
'span',
|
|
37929
|
-
{ className: 'flyin__acco__price__label' },
|
|
37930
|
-
translations === null || translations === void 0 ? void 0 : translations.SHARED.TOTAL_PRICE
|
|
37931
|
-
),
|
|
37932
|
-
React__default.createElement('span', { className: 'flyin__acco__price flyin__acco__price--increase' }, '+1.764,00')
|
|
37933
|
-
)
|
|
37934
|
-
),
|
|
37935
|
-
React__default.createElement(
|
|
37936
|
-
'div',
|
|
37937
|
-
{ className: 'flyin__acco__content' },
|
|
37938
|
-
React__default.createElement(
|
|
37939
|
-
'div',
|
|
37940
|
-
{ className: 'flyin__acco__header' },
|
|
37941
|
-
React__default.createElement('h4', { className: 'flyin__acco__title' }, 'Deluxe Balcony Room'),
|
|
37942
|
-
React__default.createElement(
|
|
37943
|
-
'div',
|
|
37944
|
-
{ className: 'flyin__acco__usps' },
|
|
37945
|
-
React__default.createElement(
|
|
37946
|
-
'div',
|
|
37947
|
-
{ className: 'flyin__acco__usp' },
|
|
37948
|
-
React__default.createElement(Icon, { name: 'ui-check', width: 16 }),
|
|
37949
|
-
React__default.createElement('span', { className: 'flyin__acco__usp__text' }, 'Sea sight')
|
|
37950
|
-
),
|
|
37951
|
-
React__default.createElement(
|
|
37952
|
-
'div',
|
|
37953
|
-
{ className: 'flyin__acco__usp' },
|
|
37954
|
-
React__default.createElement(Icon, { name: 'ui-check', width: 16 }),
|
|
37955
|
-
React__default.createElement('span', { className: 'flyin__acco__usp__text' }, 'Free wifi')
|
|
37956
|
-
),
|
|
37957
|
-
React__default.createElement(
|
|
37958
|
-
'div',
|
|
37959
|
-
{ className: 'flyin__acco__usp' },
|
|
37960
|
-
React__default.createElement(Icon, { name: 'ui-check', width: 16 }),
|
|
37961
|
-
React__default.createElement('span', { className: 'flyin__acco__usp__text' }, 'Breakfast included')
|
|
37962
|
-
),
|
|
37963
|
-
React__default.createElement(
|
|
37964
|
-
'div',
|
|
37965
|
-
{ className: 'flyin__acco__usp' },
|
|
37966
|
-
React__default.createElement(Icon, { name: 'ui-check', width: 16 }),
|
|
37967
|
-
React__default.createElement('span', { className: 'flyin__acco__usp__text' }, 'Air conditioning')
|
|
37968
|
-
),
|
|
37969
|
-
React__default.createElement(
|
|
37970
|
-
'div',
|
|
37971
|
-
{ className: 'flyin__acco__usp' },
|
|
37972
|
-
React__default.createElement(Icon, { name: 'ui-check', width: 16 }),
|
|
37973
|
-
React__default.createElement('span', { className: 'flyin__acco__usp__text' }, 'Private bathroom')
|
|
37974
|
-
)
|
|
37975
|
-
)
|
|
37976
|
-
)
|
|
37977
|
-
),
|
|
37978
|
-
React__default.createElement(
|
|
37979
|
-
'div',
|
|
37980
|
-
{ className: 'flyin__acco__footer' },
|
|
37981
|
-
React__default.createElement(ItemPicker$1, {
|
|
37982
|
-
items: travelClasses,
|
|
37983
|
-
selection: selectedTravelClass,
|
|
37984
|
-
label: ' ',
|
|
37985
|
-
placeholder: translations.QSM.TRAVEL_CLASS_PLACEHOLDER,
|
|
37986
|
-
classModifier: 'travel-class-picker__items',
|
|
37987
|
-
onPick: setSelectedTravelClass
|
|
37988
|
-
}),
|
|
37989
|
-
React__default.createElement(
|
|
37990
|
-
'button',
|
|
37991
|
-
{ className: 'cta cta--select' },
|
|
37992
|
-
translations === null || translations === void 0 ? void 0 : translations.SHARED.SELECT
|
|
37993
|
-
)
|
|
37994
|
-
)
|
|
37995
|
-
),
|
|
37996
|
-
React__default.createElement(
|
|
37997
|
-
'div',
|
|
37998
|
-
{ className: 'flyin__acco__card' },
|
|
37999
|
-
React__default.createElement(
|
|
38000
|
-
'div',
|
|
38001
|
-
{ className: 'flyin__acco__img__wrapper' },
|
|
38002
|
-
React__default.createElement('img', {
|
|
38003
|
-
src: 'https://cdn.pixabay.com/photo/2024/05/15/12/31/lake-8763490_1280.jpg',
|
|
38004
|
-
alt: 'river',
|
|
38005
|
-
className: 'flyin__acco__img'
|
|
38006
|
-
}),
|
|
38007
|
-
React__default.createElement(
|
|
38008
|
-
'div',
|
|
38009
|
-
{ className: 'flyin__acco__price__wrapper' },
|
|
38010
|
-
React__default.createElement(
|
|
38011
|
-
'span',
|
|
38012
|
-
{ className: 'flyin__acco__price__label' },
|
|
38013
|
-
translations === null || translations === void 0 ? void 0 : translations.SHARED.TOTAL_PRICE
|
|
38014
|
-
),
|
|
38015
|
-
React__default.createElement('span', { className: 'flyin__acco__price flyin__acco__price--increase' }, '+1.764,00')
|
|
38016
|
-
)
|
|
38017
|
-
),
|
|
38018
|
-
React__default.createElement(
|
|
38019
|
-
'div',
|
|
38020
|
-
{ className: 'flyin__acco__content' },
|
|
38021
|
-
React__default.createElement(
|
|
38086
|
+
{ className: 'flyin__acco__cards' },
|
|
38087
|
+
roomAccommodations.map(function (accommodation) {
|
|
38088
|
+
var selectedOption = getSelectedOptionForAccommodation(roomIndex, accommodation.accommodationCode);
|
|
38089
|
+
var priceDifference = getPriceDifference(
|
|
38090
|
+
selectedRoomOption === null || selectedRoomOption === void 0 ? void 0 : selectedRoomOption.price,
|
|
38091
|
+
roomIndex,
|
|
38092
|
+
accommodation.accommodationCode
|
|
38093
|
+
);
|
|
38094
|
+
return React__default.createElement(
|
|
38022
38095
|
'div',
|
|
38023
|
-
{ className: '
|
|
38024
|
-
React__default.createElement('h4', { className: 'flyin__acco__title' }, 'Standard Room'),
|
|
38096
|
+
{ className: 'flyin__acco__card', key: ''.concat(roomIndex, '-').concat(accommodation.accommodationCode) },
|
|
38025
38097
|
React__default.createElement(
|
|
38026
38098
|
'div',
|
|
38027
|
-
{ className: '
|
|
38028
|
-
React__default.createElement(
|
|
38029
|
-
'div',
|
|
38030
|
-
{ className: 'flyin__acco__usp' },
|
|
38031
|
-
React__default.createElement(Icon, { name: 'ui-check', width: 16 }),
|
|
38032
|
-
React__default.createElement('span', { className: 'flyin__acco__usp__text' }, 'Garden view')
|
|
38033
|
-
),
|
|
38034
|
-
React__default.createElement(
|
|
38035
|
-
'div',
|
|
38036
|
-
{ className: 'flyin__acco__usp' },
|
|
38037
|
-
React__default.createElement(Icon, { name: 'ui-check', width: 16 }),
|
|
38038
|
-
React__default.createElement('span', { className: 'flyin__acco__usp__text' }, 'Free wifi')
|
|
38039
|
-
),
|
|
38040
|
-
React__default.createElement(
|
|
38041
|
-
'div',
|
|
38042
|
-
{ className: 'flyin__acco__usp' },
|
|
38043
|
-
React__default.createElement(Icon, { name: 'ui-check', width: 16 }),
|
|
38044
|
-
React__default.createElement('span', { className: 'flyin__acco__usp__text' }, 'Double bed')
|
|
38045
|
-
)
|
|
38046
|
-
)
|
|
38047
|
-
)
|
|
38048
|
-
),
|
|
38049
|
-
React__default.createElement(
|
|
38050
|
-
'div',
|
|
38051
|
-
{ className: 'flyin__acco__footer' },
|
|
38052
|
-
React__default.createElement(ItemPicker$1, {
|
|
38053
|
-
items: travelClasses,
|
|
38054
|
-
selection: selectedTravelClass,
|
|
38055
|
-
label: ' ',
|
|
38056
|
-
placeholder: translations.QSM.TRAVEL_CLASS_PLACEHOLDER,
|
|
38057
|
-
classModifier: 'travel-class-picker__items',
|
|
38058
|
-
onPick: setSelectedTravelClass
|
|
38059
|
-
}),
|
|
38060
|
-
React__default.createElement(
|
|
38061
|
-
'button',
|
|
38062
|
-
{ className: 'cta cta--select' },
|
|
38063
|
-
translations === null || translations === void 0 ? void 0 : translations.SHARED.SELECT
|
|
38064
|
-
)
|
|
38065
|
-
)
|
|
38066
|
-
),
|
|
38067
|
-
React__default.createElement(
|
|
38068
|
-
'div',
|
|
38069
|
-
{ className: 'flyin__acco__card' },
|
|
38070
|
-
React__default.createElement(
|
|
38071
|
-
'div',
|
|
38072
|
-
{ className: 'flyin__acco__img__wrapper' },
|
|
38073
|
-
React__default.createElement('img', {
|
|
38074
|
-
src: 'https://cdn.pixabay.com/photo/2024/05/15/12/31/lake-8763490_1280.jpg',
|
|
38075
|
-
alt: 'river',
|
|
38076
|
-
className: 'flyin__acco__img'
|
|
38077
|
-
}),
|
|
38078
|
-
React__default.createElement(
|
|
38079
|
-
'div',
|
|
38080
|
-
{ className: 'flyin__acco__price__wrapper' },
|
|
38081
|
-
React__default.createElement(
|
|
38082
|
-
'span',
|
|
38083
|
-
{ className: 'flyin__acco__price__label' },
|
|
38084
|
-
translations === null || translations === void 0 ? void 0 : translations.SHARED.TOTAL_PRICE
|
|
38099
|
+
{ className: 'flyin__acco__content' },
|
|
38100
|
+
React__default.createElement('h4', { className: 'flyin__acco__title' }, accommodation.accommodationName)
|
|
38085
38101
|
),
|
|
38086
|
-
React__default.createElement('span', { className: 'flyin__acco__price flyin__acco__price--increase' }, '+1.764,00')
|
|
38087
|
-
)
|
|
38088
|
-
),
|
|
38089
|
-
React__default.createElement(
|
|
38090
|
-
'div',
|
|
38091
|
-
{ className: 'flyin__acco__content' },
|
|
38092
|
-
React__default.createElement(
|
|
38093
|
-
'div',
|
|
38094
|
-
{ className: 'flyin__acco__header' },
|
|
38095
|
-
React__default.createElement('h4', { className: 'flyin__acco__title' }, 'Suite'),
|
|
38096
38102
|
React__default.createElement(
|
|
38097
38103
|
'div',
|
|
38098
|
-
{ className: '
|
|
38099
|
-
React__default.createElement(
|
|
38100
|
-
|
|
38101
|
-
|
|
38102
|
-
|
|
38103
|
-
|
|
38104
|
-
|
|
38105
|
-
|
|
38106
|
-
|
|
38107
|
-
|
|
38108
|
-
|
|
38109
|
-
|
|
38110
|
-
|
|
38111
|
-
|
|
38112
|
-
'div',
|
|
38113
|
-
{ className: 'flyin__acco__usp' },
|
|
38114
|
-
React__default.createElement(Icon, { name: 'ui-check', width: 16 }),
|
|
38115
|
-
React__default.createElement('span', { className: 'flyin__acco__usp__text' }, 'Breakfast included')
|
|
38116
|
-
),
|
|
38117
|
-
React__default.createElement(
|
|
38118
|
-
'div',
|
|
38119
|
-
{ className: 'flyin__acco__usp' },
|
|
38120
|
-
React__default.createElement(Icon, { name: 'ui-check', width: 16 }),
|
|
38121
|
-
React__default.createElement('span', { className: 'flyin__acco__usp__text' }, 'Jacuzzi')
|
|
38122
|
-
),
|
|
38104
|
+
{ className: 'flyin__acco__footer' },
|
|
38105
|
+
React__default.createElement(ItemPicker$1, {
|
|
38106
|
+
items: accommodation.regimes,
|
|
38107
|
+
selection: selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.regimeName,
|
|
38108
|
+
label: '',
|
|
38109
|
+
placeholder: 'Select regime',
|
|
38110
|
+
classModifier: '',
|
|
38111
|
+
onPick: function (selected, selectedGuid) {
|
|
38112
|
+
return handlePick(roomIndex, selectedGuid);
|
|
38113
|
+
},
|
|
38114
|
+
valueFormatter: function (id, label) {
|
|
38115
|
+
return regimeFormatter(roomIndex, accommodation, id, label);
|
|
38116
|
+
}
|
|
38117
|
+
}),
|
|
38123
38118
|
React__default.createElement(
|
|
38124
38119
|
'div',
|
|
38125
|
-
{ className: '
|
|
38126
|
-
React__default.createElement(
|
|
38127
|
-
|
|
38120
|
+
{ className: 'flyin__acco__footer__actions' },
|
|
38121
|
+
React__default.createElement(
|
|
38122
|
+
'button',
|
|
38123
|
+
{
|
|
38124
|
+
className:
|
|
38125
|
+
(selectedRoomOption === null || selectedRoomOption === void 0 ? void 0 : selectedRoomOption.accommodationCode) ==
|
|
38126
|
+
accommodation.accommodationCode
|
|
38127
|
+
? 'cta cta--select cta--selected'
|
|
38128
|
+
: 'cta cta--select',
|
|
38129
|
+
onClick: function () {
|
|
38130
|
+
var _a;
|
|
38131
|
+
handlePick(
|
|
38132
|
+
roomIndex,
|
|
38133
|
+
selectedOption ? selectedOption.guid : (_a = first(accommodation.regimes)) === null || _a === void 0 ? void 0 : _a.id
|
|
38134
|
+
);
|
|
38135
|
+
}
|
|
38136
|
+
},
|
|
38137
|
+
(selectedRoomOption === null || selectedRoomOption === void 0 ? void 0 : selectedRoomOption.accommodationCode) ==
|
|
38138
|
+
accommodation.accommodationCode
|
|
38139
|
+
? translations === null || translations === void 0
|
|
38140
|
+
? void 0
|
|
38141
|
+
: translations.SHARED.SELECTED
|
|
38142
|
+
: translations === null || translations === void 0
|
|
38143
|
+
? void 0
|
|
38144
|
+
: translations.SHARED.SELECT
|
|
38145
|
+
),
|
|
38146
|
+
React__default.createElement(
|
|
38147
|
+
'div',
|
|
38148
|
+
{ className: 'flyin__acco__price__wrapper' },
|
|
38149
|
+
React__default.createElement(
|
|
38150
|
+
'span',
|
|
38151
|
+
{ className: getPriceDifferenceClassName(priceDifference) },
|
|
38152
|
+
formatPriceDifference(priceDifference, selectedPackagingAccoSearchDetails.currencyCode)
|
|
38153
|
+
)
|
|
38154
|
+
)
|
|
38128
38155
|
)
|
|
38129
38156
|
)
|
|
38130
|
-
)
|
|
38131
|
-
)
|
|
38132
|
-
React__default.createElement(
|
|
38133
|
-
'div',
|
|
38134
|
-
{ className: 'flyin__acco__footer' },
|
|
38135
|
-
React__default.createElement(ItemPicker$1, {
|
|
38136
|
-
items: travelClasses,
|
|
38137
|
-
selection: selectedTravelClass,
|
|
38138
|
-
label: ' ',
|
|
38139
|
-
placeholder: translations.QSM.TRAVEL_CLASS_PLACEHOLDER,
|
|
38140
|
-
classModifier: 'travel-class-picker__items',
|
|
38141
|
-
onPick: setSelectedTravelClass
|
|
38142
|
-
}),
|
|
38143
|
-
React__default.createElement(
|
|
38144
|
-
'button',
|
|
38145
|
-
{ className: 'cta cta--select' },
|
|
38146
|
-
translations === null || translations === void 0 ? void 0 : translations.SHARED.SELECT
|
|
38147
|
-
)
|
|
38148
|
-
)
|
|
38157
|
+
);
|
|
38158
|
+
})
|
|
38149
38159
|
)
|
|
38150
|
-
)
|
|
38151
|
-
)
|
|
38160
|
+
);
|
|
38161
|
+
})
|
|
38152
38162
|
),
|
|
38153
38163
|
React__default.createElement(
|
|
38154
38164
|
'div',
|
|
38155
38165
|
{ className: 'flyin__footer' },
|
|
38156
|
-
React__default.createElement('div', { className: 'flyin__footer__price' }, 'Total price:
|
|
38166
|
+
React__default.createElement('div', { className: 'flyin__footer__price' }, 'Total price: ', calculateTotalPrice()),
|
|
38157
38167
|
React__default.createElement(
|
|
38158
38168
|
'div',
|
|
38159
38169
|
{ className: 'flyin__button-wrapper' },
|
|
38160
|
-
React__default.createElement('button', { className: 'cta cta--select', onClick: handleConfirm },
|
|
38170
|
+
React__default.createElement('button', { className: 'cta cta--select', onClick: handleConfirm }, translations.PRODUCT.BOOK_NOW)
|
|
38161
38171
|
)
|
|
38162
38172
|
)
|
|
38163
38173
|
);
|
|
38174
|
+
// Slicing with image and usps, not available in the current API response.
|
|
38175
|
+
// <>
|
|
38176
|
+
// <div className="flyin__content">
|
|
38177
|
+
// <div className="flyin__acco">
|
|
38178
|
+
// <div className="flyin__acco__cards">
|
|
38179
|
+
// <div className="flyin__acco__card">
|
|
38180
|
+
// <div className="flyin__acco__img__wrapper">
|
|
38181
|
+
// <img src="https://cdn.pixabay.com/photo/2024/05/15/12/31/lake-8763490_1280.jpg" alt="river" className="flyin__acco__img" />
|
|
38182
|
+
// <div className="flyin__acco__price__wrapper">
|
|
38183
|
+
// <span className="flyin__acco__price__label">{translations?.SHARED.TOTAL_PRICE}</span>
|
|
38184
|
+
// <span className="flyin__acco__price flyin__acco__price--increase">+1.764,00</span>
|
|
38185
|
+
// </div>
|
|
38186
|
+
// </div>
|
|
38187
|
+
// <div className="flyin__acco__content">
|
|
38188
|
+
// <div className="flyin__acco__header">
|
|
38189
|
+
// <h4 className="flyin__acco__title">Deluxe Balcony Room</h4>
|
|
38190
|
+
// <div className="flyin__acco__usps">
|
|
38191
|
+
// <div className="flyin__acco__usp">
|
|
38192
|
+
// <Icon name="ui-check" width={16} />
|
|
38193
|
+
// <span className="flyin__acco__usp__text">Sea sight</span>
|
|
38194
|
+
// </div>
|
|
38195
|
+
// <div className="flyin__acco__usp">
|
|
38196
|
+
// <Icon name="ui-check" width={16} />
|
|
38197
|
+
// <span className="flyin__acco__usp__text">Free wifi</span>
|
|
38198
|
+
// </div>
|
|
38199
|
+
// <div className="flyin__acco__usp">
|
|
38200
|
+
// <Icon name="ui-check" width={16} />
|
|
38201
|
+
// <span className="flyin__acco__usp__text">Breakfast included</span>
|
|
38202
|
+
// </div>
|
|
38203
|
+
// <div className="flyin__acco__usp">
|
|
38204
|
+
// <Icon name="ui-check" width={16} />
|
|
38205
|
+
// <span className="flyin__acco__usp__text">Air conditioning</span>
|
|
38206
|
+
// </div>
|
|
38207
|
+
// <div className="flyin__acco__usp">
|
|
38208
|
+
// <Icon name="ui-check" width={16} />
|
|
38209
|
+
// <span className="flyin__acco__usp__text">Private bathroom</span>
|
|
38210
|
+
// </div>
|
|
38211
|
+
// </div>
|
|
38212
|
+
// </div>
|
|
38213
|
+
// </div>
|
|
38214
|
+
// <div className="flyin__acco__footer">
|
|
38215
|
+
// <ItemPicker
|
|
38216
|
+
// items={travelClasses}
|
|
38217
|
+
// selection={selectedTravelClass}
|
|
38218
|
+
// label=" "
|
|
38219
|
+
// placeholder={translations.QSM.TRAVEL_CLASS_PLACEHOLDER}
|
|
38220
|
+
// classModifier="travel-class-picker__items"
|
|
38221
|
+
// onPick={(item) => setSelectedTravelClass(item)}
|
|
38222
|
+
// />
|
|
38223
|
+
// <button className="cta cta--select">{translations?.SHARED.SELECT}</button>
|
|
38224
|
+
// </div>
|
|
38225
|
+
// </div>
|
|
38226
|
+
// <div className="flyin__acco__card">
|
|
38227
|
+
// <div className="flyin__acco__img__wrapper">
|
|
38228
|
+
// <img src="https://cdn.pixabay.com/photo/2024/05/15/12/31/lake-8763490_1280.jpg" alt="river" className="flyin__acco__img" />
|
|
38229
|
+
// <div className="flyin__acco__price__wrapper">
|
|
38230
|
+
// <span className="flyin__acco__price__label">{translations?.SHARED.TOTAL_PRICE}</span>
|
|
38231
|
+
// <span className="flyin__acco__price flyin__acco__price--increase">+1.764,00</span>
|
|
38232
|
+
// </div>
|
|
38233
|
+
// </div>
|
|
38234
|
+
// <div className="flyin__acco__content">
|
|
38235
|
+
// <div className="flyin__acco__header">
|
|
38236
|
+
// <h4 className="flyin__acco__title">Standard Room</h4>
|
|
38237
|
+
// <div className="flyin__acco__usps">
|
|
38238
|
+
// <div className="flyin__acco__usp">
|
|
38239
|
+
// <Icon name="ui-check" width={16} />
|
|
38240
|
+
// <span className="flyin__acco__usp__text">Garden view</span>
|
|
38241
|
+
// </div>
|
|
38242
|
+
// <div className="flyin__acco__usp">
|
|
38243
|
+
// <Icon name="ui-check" width={16} />
|
|
38244
|
+
// <span className="flyin__acco__usp__text">Free wifi</span>
|
|
38245
|
+
// </div>
|
|
38246
|
+
// <div className="flyin__acco__usp">
|
|
38247
|
+
// <Icon name="ui-check" width={16} />
|
|
38248
|
+
// <span className="flyin__acco__usp__text">Double bed</span>
|
|
38249
|
+
// </div>
|
|
38250
|
+
// </div>
|
|
38251
|
+
// </div>
|
|
38252
|
+
// </div>
|
|
38253
|
+
// <div className="flyin__acco__footer">
|
|
38254
|
+
// <ItemPicker
|
|
38255
|
+
// items={travelClasses}
|
|
38256
|
+
// selection={selectedTravelClass}
|
|
38257
|
+
// label=" "
|
|
38258
|
+
// placeholder={translations.QSM.TRAVEL_CLASS_PLACEHOLDER}
|
|
38259
|
+
// classModifier="travel-class-picker__items"
|
|
38260
|
+
// onPick={setSelectedTravelClass}
|
|
38261
|
+
// />
|
|
38262
|
+
// <button className="cta cta--select">{translations?.SHARED.SELECT}</button>
|
|
38263
|
+
// </div>
|
|
38264
|
+
// </div>
|
|
38265
|
+
// <div className="flyin__acco__card">
|
|
38266
|
+
// <div className="flyin__acco__img__wrapper">
|
|
38267
|
+
// <img src="https://cdn.pixabay.com/photo/2024/05/15/12/31/lake-8763490_1280.jpg" alt="river" className="flyin__acco__img" />
|
|
38268
|
+
// <div className="flyin__acco__price__wrapper">
|
|
38269
|
+
// <span className="flyin__acco__price__label">{translations?.SHARED.TOTAL_PRICE}</span>
|
|
38270
|
+
// <span className="flyin__acco__price flyin__acco__price--increase">+1.764,00</span>
|
|
38271
|
+
// </div>
|
|
38272
|
+
// </div>
|
|
38273
|
+
// <div className="flyin__acco__content">
|
|
38274
|
+
// <div className="flyin__acco__header">
|
|
38275
|
+
// <h4 className="flyin__acco__title">Suite</h4>
|
|
38276
|
+
// <div className="flyin__acco__usps">
|
|
38277
|
+
// <div className="flyin__acco__usp">
|
|
38278
|
+
// <Icon name="ui-check" width={16} />
|
|
38279
|
+
// <span className="flyin__acco__usp__text">Sea sight</span>
|
|
38280
|
+
// </div>
|
|
38281
|
+
// <div className="flyin__acco__usp">
|
|
38282
|
+
// <Icon name="ui-check" width={16} />
|
|
38283
|
+
// <span className="flyin__acco__usp__text">Free wifi</span>
|
|
38284
|
+
// </div>
|
|
38285
|
+
// <div className="flyin__acco__usp">
|
|
38286
|
+
// <Icon name="ui-check" width={16} />
|
|
38287
|
+
// <span className="flyin__acco__usp__text">Breakfast included</span>
|
|
38288
|
+
// </div>
|
|
38289
|
+
// <div className="flyin__acco__usp">
|
|
38290
|
+
// <Icon name="ui-check" width={16} />
|
|
38291
|
+
// <span className="flyin__acco__usp__text">Jacuzzi</span>
|
|
38292
|
+
// </div>
|
|
38293
|
+
// <div className="flyin__acco__usp">
|
|
38294
|
+
// <Icon name="ui-check" width={16} />
|
|
38295
|
+
// <span className="flyin__acco__usp__text">Private terrace</span>
|
|
38296
|
+
// </div>
|
|
38297
|
+
// </div>
|
|
38298
|
+
// </div>
|
|
38299
|
+
// </div>
|
|
38300
|
+
// <div className="flyin__acco__footer">
|
|
38301
|
+
// <ItemPicker
|
|
38302
|
+
// items={travelClasses}
|
|
38303
|
+
// selection={selectedTravelClass}
|
|
38304
|
+
// label=" "
|
|
38305
|
+
// placeholder={translations.QSM.TRAVEL_CLASS_PLACEHOLDER}
|
|
38306
|
+
// classModifier="travel-class-picker__items"
|
|
38307
|
+
// onPick={setSelectedTravelClass}
|
|
38308
|
+
// />
|
|
38309
|
+
// <button className="cta cta--select">{translations?.SHARED.SELECT}</button>
|
|
38310
|
+
// </div>
|
|
38311
|
+
// </div>
|
|
38312
|
+
// </div>
|
|
38313
|
+
// </div>
|
|
38314
|
+
// {/* {isLoading && (
|
|
38315
|
+
// <Spinner />
|
|
38316
|
+
// )} */}
|
|
38317
|
+
// </div>
|
|
38318
|
+
// <div className="flyin__footer">
|
|
38319
|
+
// <div className="flyin__footer__price">Total price: €</div>
|
|
38320
|
+
// <div className="flyin__button-wrapper">
|
|
38321
|
+
// <button className="cta cta--select" onClick={handleConfirm}>
|
|
38322
|
+
// Toevoegen
|
|
38323
|
+
// </button>
|
|
38324
|
+
// </div>
|
|
38325
|
+
// </div>
|
|
38326
|
+
// </>
|
|
38164
38327
|
};
|
|
38165
38328
|
|
|
38166
38329
|
var FlyIn = function (_a) {
|
|
@@ -42557,7 +42720,7 @@ var getBaseHotelResult = function (searchResult, cmsItem, languageCode, translat
|
|
|
42557
42720
|
searchResult.countryName,
|
|
42558
42721
|
(_h = cmsItem === null || cmsItem === void 0 ? void 0 : cmsItem.parentItem) === null || _h === void 0 ? void 0 : _h.name
|
|
42559
42722
|
),
|
|
42560
|
-
price: formatPrice(searchResult.price, searchResult.currencyCode, languageCode),
|
|
42723
|
+
price: formatPrice$1(searchResult.price, searchResult.currencyCode, languageCode),
|
|
42561
42724
|
ctaText: translations === null || translations === void 0 ? void 0 : translations.SRP.VIEW_DETAILS
|
|
42562
42725
|
};
|
|
42563
42726
|
};
|
|
@@ -43316,7 +43479,7 @@ var PairedFlightOption = function (_a) {
|
|
|
43316
43479
|
React__default.createElement(
|
|
43317
43480
|
'span',
|
|
43318
43481
|
{ className: 'price' },
|
|
43319
|
-
formatPrice(
|
|
43482
|
+
formatPrice$1(
|
|
43320
43483
|
item.price,
|
|
43321
43484
|
'EUR',
|
|
43322
43485
|
(_c = context === null || context === void 0 ? void 0 : context.languageCode) !== null && _c !== void 0 ? _c : 'en-GB'
|
|
@@ -45135,8 +45298,8 @@ var FlightFilters = function (_a) {
|
|
|
45135
45298
|
};
|
|
45136
45299
|
|
|
45137
45300
|
var selectionTypes = [
|
|
45138
|
-
{ id:
|
|
45139
|
-
{ id:
|
|
45301
|
+
{ id: 'independent', label: 'Independent Selection' },
|
|
45302
|
+
{ id: 'paired', label: 'Paired Selection' }
|
|
45140
45303
|
];
|
|
45141
45304
|
var FlightResultsContainer = function (_a) {
|
|
45142
45305
|
var _b, _c;
|
|
@@ -45261,7 +45424,7 @@ var FlightResultsContainer = function (_a) {
|
|
|
45261
45424
|
items: selectionTypes,
|
|
45262
45425
|
selection:
|
|
45263
45426
|
((_c = selectionTypes.find(function (type) {
|
|
45264
|
-
return type.
|
|
45427
|
+
return type.id === flightSelectionType;
|
|
45265
45428
|
})) === null || _c === void 0
|
|
45266
45429
|
? void 0
|
|
45267
45430
|
: _c.label) || undefined,
|
|
@@ -45278,7 +45441,7 @@ var FlightResultsContainer = function (_a) {
|
|
|
45278
45441
|
return type.label === value;
|
|
45279
45442
|
})) === null || _a === void 0
|
|
45280
45443
|
? void 0
|
|
45281
|
-
: _a.
|
|
45444
|
+
: _a.id) || 'independent'
|
|
45282
45445
|
);
|
|
45283
45446
|
}
|
|
45284
45447
|
})
|
|
@@ -45676,7 +45839,7 @@ var GroupTourCard = function (_a) {
|
|
|
45676
45839
|
React__default.createElement(
|
|
45677
45840
|
'div',
|
|
45678
45841
|
{ className: 'search__result-card__allotment__price' },
|
|
45679
|
-
formatPrice(result.price, result.currencyCode, languageCode),
|
|
45842
|
+
formatPrice$1(result.price, result.currencyCode, languageCode),
|
|
45680
45843
|
' ',
|
|
45681
45844
|
translations.PRODUCT.PER_PERSON
|
|
45682
45845
|
)
|
|
@@ -46610,14 +46773,14 @@ var SearchResultsContainer = function () {
|
|
|
46610
46773
|
// Seperate detailsCall
|
|
46611
46774
|
useEffect(
|
|
46612
46775
|
function () {
|
|
46613
|
-
var
|
|
46776
|
+
var fetchDetails = function () {
|
|
46614
46777
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
46615
46778
|
var config, selectedItem, params, entryId, requestRooms, rooms, detailsRequest, detailsResponse, detailsWLResponse, err_3;
|
|
46616
46779
|
var _a, _b;
|
|
46617
46780
|
return __generator(this, function (_c) {
|
|
46618
46781
|
switch (_c.label) {
|
|
46619
46782
|
case 0:
|
|
46620
|
-
if (
|
|
46783
|
+
if (!selectedSearchResultId || !context) return [2 /*return*/];
|
|
46621
46784
|
if (
|
|
46622
46785
|
(context === null || context === void 0 ? void 0 : context.searchConfiguration.qsmType) === build.PortalQsmType.Accommodation ||
|
|
46623
46786
|
(context === null || context === void 0 ? void 0 : context.searchConfiguration.qsmType) === build.PortalQsmType.GroupTour
|
|
@@ -46708,7 +46871,126 @@ var SearchResultsContainer = function () {
|
|
|
46708
46871
|
});
|
|
46709
46872
|
});
|
|
46710
46873
|
};
|
|
46711
|
-
|
|
46874
|
+
var fetchPackagingAccoSearchDetails = function () {
|
|
46875
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
46876
|
+
var config,
|
|
46877
|
+
selectedItem,
|
|
46878
|
+
params,
|
|
46879
|
+
rooms,
|
|
46880
|
+
tagId,
|
|
46881
|
+
agentId,
|
|
46882
|
+
destinationAirport,
|
|
46883
|
+
destinationId,
|
|
46884
|
+
destinationIsCountry,
|
|
46885
|
+
destinationIsRegion,
|
|
46886
|
+
destinationIsOord,
|
|
46887
|
+
destinationIsLocation,
|
|
46888
|
+
destinationCode,
|
|
46889
|
+
destinationIsAirport,
|
|
46890
|
+
detailSearchRequest,
|
|
46891
|
+
packageAccoSearchDetails,
|
|
46892
|
+
err_4;
|
|
46893
|
+
var _a, _b;
|
|
46894
|
+
return __generator(this, function (_c) {
|
|
46895
|
+
switch (_c.label) {
|
|
46896
|
+
case 0:
|
|
46897
|
+
if (!selectedPackagingAccoResultCode || !context) return [2 /*return*/];
|
|
46898
|
+
if (
|
|
46899
|
+
(context === null || context === void 0 ? void 0 : context.searchConfiguration.qsmType) === build.PortalQsmType.Accommodation ||
|
|
46900
|
+
(context === null || context === void 0 ? void 0 : context.searchConfiguration.qsmType) === build.PortalQsmType.GroupTour
|
|
46901
|
+
) {
|
|
46902
|
+
handleFlyInToggle(true);
|
|
46903
|
+
}
|
|
46904
|
+
_c.label = 1;
|
|
46905
|
+
case 1:
|
|
46906
|
+
_c.trys.push([1, 3, , 4]);
|
|
46907
|
+
config = {
|
|
46908
|
+
host: context.tideConnection.host,
|
|
46909
|
+
apiKey: context.tideConnection.apiKey
|
|
46910
|
+
};
|
|
46911
|
+
console.log('selectedPackagingAccoResultCode', selectedPackagingAccoResultCode);
|
|
46912
|
+
selectedItem = packagingAccoResults.find(function (r) {
|
|
46913
|
+
return r.code === selectedPackagingAccoResultCode;
|
|
46914
|
+
});
|
|
46915
|
+
console.log('Selected packaging acco item', selectedItem);
|
|
46916
|
+
if (!selectedItem) {
|
|
46917
|
+
// TODO: handle this case better, show an error message to the user
|
|
46918
|
+
return [2 /*return*/];
|
|
46919
|
+
}
|
|
46920
|
+
params = new URLSearchParams(location.search);
|
|
46921
|
+
rooms = getRoomsFromParams(params, 'rooms');
|
|
46922
|
+
tagId = getNumberFromParams(params, 'tagId');
|
|
46923
|
+
agentId = getNumberFromParams(params, 'agentId');
|
|
46924
|
+
destinationAirport = getStringFromParams(params, 'destinationAirport');
|
|
46925
|
+
destinationId = null;
|
|
46926
|
+
destinationIsCountry = false;
|
|
46927
|
+
destinationIsRegion = false;
|
|
46928
|
+
destinationIsOord = false;
|
|
46929
|
+
destinationIsLocation = false;
|
|
46930
|
+
destinationCode = null;
|
|
46931
|
+
destinationIsAirport = false;
|
|
46932
|
+
if (selectedItem.countryId) {
|
|
46933
|
+
destinationId = selectedItem.countryId;
|
|
46934
|
+
destinationIsCountry = true;
|
|
46935
|
+
} else if (selectedItem.regionId) {
|
|
46936
|
+
destinationId = selectedItem.regionId;
|
|
46937
|
+
destinationIsRegion = true;
|
|
46938
|
+
} else if (selectedItem.oordId) {
|
|
46939
|
+
destinationId = selectedItem.oordId;
|
|
46940
|
+
destinationIsOord = true;
|
|
46941
|
+
} else if (selectedItem.locationId) {
|
|
46942
|
+
destinationId = selectedItem.locationId;
|
|
46943
|
+
destinationIsLocation = true;
|
|
46944
|
+
} else if (destinationAirport) {
|
|
46945
|
+
destinationCode = destinationAirport;
|
|
46946
|
+
destinationIsAirport = true;
|
|
46947
|
+
}
|
|
46948
|
+
detailSearchRequest = {
|
|
46949
|
+
officeId: 1,
|
|
46950
|
+
portalId: context.portalId,
|
|
46951
|
+
agentId: agentId !== null && agentId !== void 0 ? agentId : null,
|
|
46952
|
+
catalogueId: (_a = context.searchConfiguration.defaultCatalogueId) !== null && _a !== void 0 ? _a : 0,
|
|
46953
|
+
searchConfigurationId: context.searchConfiguration.id,
|
|
46954
|
+
vendorConfigurationId: selectedItem.vendorId,
|
|
46955
|
+
language: (_b = context.languageCode) !== null && _b !== void 0 ? _b : 'en-GB',
|
|
46956
|
+
serviceType: 3,
|
|
46957
|
+
fromDate: selectedItem.fromDate,
|
|
46958
|
+
toDate: selectedItem.toDate,
|
|
46959
|
+
destination: {
|
|
46960
|
+
id: Number(destinationId),
|
|
46961
|
+
isCountry: destinationIsCountry,
|
|
46962
|
+
isRegion: destinationIsRegion,
|
|
46963
|
+
isOord: destinationIsOord,
|
|
46964
|
+
isLocation: destinationIsLocation,
|
|
46965
|
+
isAirport: destinationIsAirport,
|
|
46966
|
+
code: destinationCode
|
|
46967
|
+
},
|
|
46968
|
+
productCode: selectedItem.code ? selectedItem.code : '',
|
|
46969
|
+
rooms: getPackagingRequestRooms(rooms),
|
|
46970
|
+
tagIds: tagId ? [tagId] : []
|
|
46971
|
+
};
|
|
46972
|
+
return [4 /*yield*/, build.searchPackagingAccommodations(config, detailSearchRequest)];
|
|
46973
|
+
case 2:
|
|
46974
|
+
packageAccoSearchDetails = _c.sent();
|
|
46975
|
+
console.log('Packaging Acco Search details', packageAccoSearchDetails);
|
|
46976
|
+
dispatch(setPackagingAccoSearchDetails(packageAccoSearchDetails));
|
|
46977
|
+
return [3 /*break*/, 4];
|
|
46978
|
+
case 3:
|
|
46979
|
+
err_4 = _c.sent();
|
|
46980
|
+
console.error('Failed to fetch package details', err_4);
|
|
46981
|
+
return [3 /*break*/, 4];
|
|
46982
|
+
case 4:
|
|
46983
|
+
return [2 /*return*/];
|
|
46984
|
+
}
|
|
46985
|
+
});
|
|
46986
|
+
});
|
|
46987
|
+
};
|
|
46988
|
+
if (selectedSearchResultId) {
|
|
46989
|
+
fetchDetails();
|
|
46990
|
+
}
|
|
46991
|
+
if (selectedPackagingAccoResultCode) {
|
|
46992
|
+
fetchPackagingAccoSearchDetails();
|
|
46993
|
+
}
|
|
46712
46994
|
},
|
|
46713
46995
|
[selectedSearchResultId, selectedPackagingAccoResultCode]
|
|
46714
46996
|
);
|