@qite/tide-booking-component 1.4.88 → 1.4.89
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 +32 -13
- package/build/build-cjs/src/shared/components/flyin/flyin.d.ts +1 -0
- package/build/build-esm/index.js +33 -13
- package/build/build-esm/src/shared/components/flyin/flyin.d.ts +1 -0
- package/package.json +1 -1
- package/src/search-results/components/search-results-container/search-results-container.tsx +7 -0
- package/src/shared/components/flyin/flyin.tsx +3 -2
- package/src/shared/components/flyin/group-tour-flyin.tsx +8 -3
package/build/build-cjs/index.js
CHANGED
|
@@ -38514,13 +38514,22 @@ var formatPrice = function (price, currencyCode) {
|
|
|
38514
38514
|
}).format(price);
|
|
38515
38515
|
};
|
|
38516
38516
|
var GroupTourFlyIn = function (_a) {
|
|
38517
|
-
var _b;
|
|
38518
|
-
_a.isLoading
|
|
38519
|
-
|
|
38517
|
+
var _b, _c;
|
|
38518
|
+
var isLoading = _a.isLoading,
|
|
38519
|
+
isOpen = _a.isOpen,
|
|
38520
38520
|
setIsOpen = _a.setIsOpen;
|
|
38521
38521
|
var dispatch = reactRedux.useDispatch();
|
|
38522
38522
|
var context = React.useContext(SearchResultsConfigurationContext);
|
|
38523
|
-
|
|
38523
|
+
if (isLoading) {
|
|
38524
|
+
return React__default['default'].createElement(
|
|
38525
|
+
React__default['default'].Fragment,
|
|
38526
|
+
null,
|
|
38527
|
+
(_b = context === null || context === void 0 ? void 0 : context.customSpinner) !== null && _b !== void 0
|
|
38528
|
+
? _b
|
|
38529
|
+
: React__default['default'].createElement(Spinner, null)
|
|
38530
|
+
);
|
|
38531
|
+
}
|
|
38532
|
+
var language = (_c = context === null || context === void 0 ? void 0 : context.languageCode) !== null && _c !== void 0 ? _c : 'en-GB';
|
|
38524
38533
|
var translations = getTranslations(language);
|
|
38525
38534
|
var bookingPackageDetails = reactRedux.useSelector(function (state) {
|
|
38526
38535
|
return state.searchResults;
|
|
@@ -38542,7 +38551,7 @@ var GroupTourFlyIn = function (_a) {
|
|
|
38542
38551
|
return selectedBookingPackageDetails.rooms.map(function (room) {
|
|
38543
38552
|
var groupedMap = new Map();
|
|
38544
38553
|
room.options.forEach(function (option) {
|
|
38545
|
-
var _a;
|
|
38554
|
+
var _a, _b;
|
|
38546
38555
|
var key = option.accommodationCode;
|
|
38547
38556
|
if (!groupedMap.has(key)) {
|
|
38548
38557
|
groupedMap.set(key, {
|
|
@@ -38555,7 +38564,7 @@ var GroupTourFlyIn = function (_a) {
|
|
|
38555
38564
|
? void 0
|
|
38556
38565
|
: _a.regimes.push({
|
|
38557
38566
|
id: option.entryLineGuid,
|
|
38558
|
-
label: option.regimeName
|
|
38567
|
+
label: (_b = option.regimeName) !== null && _b !== void 0 ? _b : 'No regime'
|
|
38559
38568
|
});
|
|
38560
38569
|
});
|
|
38561
38570
|
return Array.from(groupedMap.values());
|
|
@@ -38712,6 +38721,7 @@ var GroupTourFlyIn = function (_a) {
|
|
|
38712
38721
|
'div',
|
|
38713
38722
|
{ className: 'flyin__acco__cards' },
|
|
38714
38723
|
roomAccommodations.map(function (accommodation) {
|
|
38724
|
+
var _a;
|
|
38715
38725
|
var selectedOption = getSelectedOptionForAccommodation(roomIndex, accommodation.accommodationCode);
|
|
38716
38726
|
var priceDifference = getPriceDifference(
|
|
38717
38727
|
selectedRoomOption === null || selectedRoomOption === void 0 ? void 0 : selectedRoomOption.price,
|
|
@@ -38731,7 +38741,7 @@ var GroupTourFlyIn = function (_a) {
|
|
|
38731
38741
|
{ className: 'flyin__acco__footer' },
|
|
38732
38742
|
React__default['default'].createElement(ItemPicker$1, {
|
|
38733
38743
|
items: accommodation.regimes,
|
|
38734
|
-
selection: selectedOption
|
|
38744
|
+
selection: selectedOption != null ? ((_a = selectedOption.regimeName) !== null && _a !== void 0 ? _a : 'No regime') : undefined,
|
|
38735
38745
|
label: '',
|
|
38736
38746
|
placeholder: 'Select regime',
|
|
38737
38747
|
classModifier: '',
|
|
@@ -38814,7 +38824,8 @@ var FlyIn = function (_a) {
|
|
|
38814
38824
|
setIsOpen = _a.setIsOpen,
|
|
38815
38825
|
_b = _a.className,
|
|
38816
38826
|
className = _b === void 0 ? '' : _b,
|
|
38817
|
-
onPanelRef = _a.onPanelRef
|
|
38827
|
+
onPanelRef = _a.onPanelRef,
|
|
38828
|
+
detailsLoading = _a.detailsLoading;
|
|
38818
38829
|
var dispatch = reactRedux.useDispatch();
|
|
38819
38830
|
var onCancelSearch = useFlightSearch().onCancelSearch;
|
|
38820
38831
|
var panelRef = React.useRef(null);
|
|
@@ -38892,7 +38903,7 @@ var FlyIn = function (_a) {
|
|
|
38892
38903
|
srpType === build.PortalQsmType.Accommodation &&
|
|
38893
38904
|
React__default['default'].createElement(AccommodationFlyIn, { isLoading: true, isOpen: isOpen, setIsOpen: setIsOpen }),
|
|
38894
38905
|
srpType === build.PortalQsmType.GroupTour &&
|
|
38895
|
-
React__default['default'].createElement(GroupTourFlyIn, { isLoading:
|
|
38906
|
+
React__default['default'].createElement(GroupTourFlyIn, { isLoading: detailsLoading, isOpen: isOpen, setIsOpen: setIsOpen })
|
|
38896
38907
|
)
|
|
38897
38908
|
);
|
|
38898
38909
|
};
|
|
@@ -46821,8 +46832,11 @@ var SearchResultsContainer = function () {
|
|
|
46821
46832
|
filtersOpen = _e[0],
|
|
46822
46833
|
setFiltersOpen = _e[1];
|
|
46823
46834
|
var _f = React.useState(false),
|
|
46824
|
-
|
|
46825
|
-
|
|
46835
|
+
detailsIsLoading = _f[0],
|
|
46836
|
+
setDetailsIsLoading = _f[1];
|
|
46837
|
+
var _g = React.useState(false),
|
|
46838
|
+
itineraryOpen = _g[0],
|
|
46839
|
+
setItineraryOpen = _g[1];
|
|
46826
46840
|
var panelRef = React.useRef(null);
|
|
46827
46841
|
var sortByTypes = [
|
|
46828
46842
|
{ direction: 'asc', label: 'default' },
|
|
@@ -47337,6 +47351,7 @@ var SearchResultsContainer = function () {
|
|
|
47337
47351
|
return __generator(this, function (_a) {
|
|
47338
47352
|
switch (_a.label) {
|
|
47339
47353
|
case 0:
|
|
47354
|
+
setDetailsIsLoading(true);
|
|
47340
47355
|
console.log('Fetching details for selected search result', selectedSearchResult);
|
|
47341
47356
|
if (!selectedSearchResult || !context) return [2 /*return*/];
|
|
47342
47357
|
if (
|
|
@@ -47400,12 +47415,14 @@ var SearchResultsContainer = function () {
|
|
|
47400
47415
|
case 4:
|
|
47401
47416
|
detailsResponse = _a.sent();
|
|
47402
47417
|
dispatch(setBookingPackageDetails({ details: detailsResponse === null || detailsResponse === void 0 ? void 0 : detailsResponse.payload }));
|
|
47418
|
+
setDetailsIsLoading(false);
|
|
47403
47419
|
_a.label = 5;
|
|
47404
47420
|
case 5:
|
|
47405
47421
|
return [3 /*break*/, 7];
|
|
47406
47422
|
case 6:
|
|
47407
47423
|
err_3 = _a.sent();
|
|
47408
47424
|
console.error('Failed to fetch package details', err_3);
|
|
47425
|
+
setDetailsIsLoading(false);
|
|
47409
47426
|
return [3 /*break*/, 7];
|
|
47410
47427
|
case 7:
|
|
47411
47428
|
return [2 /*return*/];
|
|
@@ -47570,7 +47587,8 @@ var SearchResultsContainer = function () {
|
|
|
47570
47587
|
setIsOpen: handleFlyInToggle,
|
|
47571
47588
|
onPanelRef: function (el) {
|
|
47572
47589
|
return (panelRef.current = el);
|
|
47573
|
-
}
|
|
47590
|
+
},
|
|
47591
|
+
detailsLoading: detailsIsLoading
|
|
47574
47592
|
})
|
|
47575
47593
|
),
|
|
47576
47594
|
(context.searchConfiguration.qsmType === build.PortalQsmType.AccommodationAndFlight ||
|
|
@@ -47734,7 +47752,8 @@ var SearchResultsContainer = function () {
|
|
|
47734
47752
|
setIsOpen: handleFlyInToggle,
|
|
47735
47753
|
onPanelRef: function (el) {
|
|
47736
47754
|
return (panelRef.current = el);
|
|
47737
|
-
}
|
|
47755
|
+
},
|
|
47756
|
+
detailsLoading: detailsIsLoading
|
|
47738
47757
|
})
|
|
47739
47758
|
)
|
|
47740
47759
|
)
|
package/build/build-esm/index.js
CHANGED
|
@@ -38337,13 +38337,22 @@ var formatPrice = function (price, currencyCode) {
|
|
|
38337
38337
|
}).format(price);
|
|
38338
38338
|
};
|
|
38339
38339
|
var GroupTourFlyIn = function (_a) {
|
|
38340
|
-
var _b;
|
|
38341
|
-
_a.isLoading
|
|
38342
|
-
|
|
38340
|
+
var _b, _c;
|
|
38341
|
+
var isLoading = _a.isLoading,
|
|
38342
|
+
isOpen = _a.isOpen,
|
|
38343
38343
|
setIsOpen = _a.setIsOpen;
|
|
38344
38344
|
var dispatch = useDispatch();
|
|
38345
38345
|
var context = useContext(SearchResultsConfigurationContext);
|
|
38346
|
-
|
|
38346
|
+
if (isLoading) {
|
|
38347
|
+
return React__default.createElement(
|
|
38348
|
+
React__default.Fragment,
|
|
38349
|
+
null,
|
|
38350
|
+
(_b = context === null || context === void 0 ? void 0 : context.customSpinner) !== null && _b !== void 0
|
|
38351
|
+
? _b
|
|
38352
|
+
: React__default.createElement(Spinner, null)
|
|
38353
|
+
);
|
|
38354
|
+
}
|
|
38355
|
+
var language = (_c = context === null || context === void 0 ? void 0 : context.languageCode) !== null && _c !== void 0 ? _c : 'en-GB';
|
|
38347
38356
|
var translations = getTranslations(language);
|
|
38348
38357
|
var bookingPackageDetails = useSelector(function (state) {
|
|
38349
38358
|
return state.searchResults;
|
|
@@ -38365,7 +38374,7 @@ var GroupTourFlyIn = function (_a) {
|
|
|
38365
38374
|
return selectedBookingPackageDetails.rooms.map(function (room) {
|
|
38366
38375
|
var groupedMap = new Map();
|
|
38367
38376
|
room.options.forEach(function (option) {
|
|
38368
|
-
var _a;
|
|
38377
|
+
var _a, _b;
|
|
38369
38378
|
var key = option.accommodationCode;
|
|
38370
38379
|
if (!groupedMap.has(key)) {
|
|
38371
38380
|
groupedMap.set(key, {
|
|
@@ -38378,7 +38387,7 @@ var GroupTourFlyIn = function (_a) {
|
|
|
38378
38387
|
? void 0
|
|
38379
38388
|
: _a.regimes.push({
|
|
38380
38389
|
id: option.entryLineGuid,
|
|
38381
|
-
label: option.regimeName
|
|
38390
|
+
label: (_b = option.regimeName) !== null && _b !== void 0 ? _b : 'No regime'
|
|
38382
38391
|
});
|
|
38383
38392
|
});
|
|
38384
38393
|
return Array.from(groupedMap.values());
|
|
@@ -38535,6 +38544,7 @@ var GroupTourFlyIn = function (_a) {
|
|
|
38535
38544
|
'div',
|
|
38536
38545
|
{ className: 'flyin__acco__cards' },
|
|
38537
38546
|
roomAccommodations.map(function (accommodation) {
|
|
38547
|
+
var _a;
|
|
38538
38548
|
var selectedOption = getSelectedOptionForAccommodation(roomIndex, accommodation.accommodationCode);
|
|
38539
38549
|
var priceDifference = getPriceDifference(
|
|
38540
38550
|
selectedRoomOption === null || selectedRoomOption === void 0 ? void 0 : selectedRoomOption.price,
|
|
@@ -38554,7 +38564,7 @@ var GroupTourFlyIn = function (_a) {
|
|
|
38554
38564
|
{ className: 'flyin__acco__footer' },
|
|
38555
38565
|
React__default.createElement(ItemPicker$1, {
|
|
38556
38566
|
items: accommodation.regimes,
|
|
38557
|
-
selection: selectedOption
|
|
38567
|
+
selection: selectedOption != null ? ((_a = selectedOption.regimeName) !== null && _a !== void 0 ? _a : 'No regime') : undefined,
|
|
38558
38568
|
label: '',
|
|
38559
38569
|
placeholder: 'Select regime',
|
|
38560
38570
|
classModifier: '',
|
|
@@ -38633,7 +38643,8 @@ var FlyIn = function (_a) {
|
|
|
38633
38643
|
setIsOpen = _a.setIsOpen,
|
|
38634
38644
|
_b = _a.className,
|
|
38635
38645
|
className = _b === void 0 ? '' : _b,
|
|
38636
|
-
onPanelRef = _a.onPanelRef
|
|
38646
|
+
onPanelRef = _a.onPanelRef,
|
|
38647
|
+
detailsLoading = _a.detailsLoading;
|
|
38637
38648
|
var dispatch = useDispatch();
|
|
38638
38649
|
var onCancelSearch = useFlightSearch().onCancelSearch;
|
|
38639
38650
|
var panelRef = useRef(null);
|
|
@@ -38710,7 +38721,8 @@ var FlyIn = function (_a) {
|
|
|
38710
38721
|
srpType === build.PortalQsmType.Flight && React__default.createElement(FlightsFlyIn, { isOpen: isOpen, setIsOpen: setIsOpen }),
|
|
38711
38722
|
srpType === build.PortalQsmType.Accommodation &&
|
|
38712
38723
|
React__default.createElement(AccommodationFlyIn, { isLoading: true, isOpen: isOpen, setIsOpen: setIsOpen }),
|
|
38713
|
-
srpType === build.PortalQsmType.GroupTour &&
|
|
38724
|
+
srpType === build.PortalQsmType.GroupTour &&
|
|
38725
|
+
React__default.createElement(GroupTourFlyIn, { isLoading: detailsLoading, isOpen: isOpen, setIsOpen: setIsOpen })
|
|
38714
38726
|
)
|
|
38715
38727
|
);
|
|
38716
38728
|
};
|
|
@@ -46568,8 +46580,11 @@ var SearchResultsContainer = function () {
|
|
|
46568
46580
|
filtersOpen = _e[0],
|
|
46569
46581
|
setFiltersOpen = _e[1];
|
|
46570
46582
|
var _f = useState(false),
|
|
46571
|
-
|
|
46572
|
-
|
|
46583
|
+
detailsIsLoading = _f[0],
|
|
46584
|
+
setDetailsIsLoading = _f[1];
|
|
46585
|
+
var _g = useState(false),
|
|
46586
|
+
itineraryOpen = _g[0],
|
|
46587
|
+
setItineraryOpen = _g[1];
|
|
46573
46588
|
var panelRef = useRef(null);
|
|
46574
46589
|
var sortByTypes = [
|
|
46575
46590
|
{ direction: 'asc', label: 'default' },
|
|
@@ -47084,6 +47099,7 @@ var SearchResultsContainer = function () {
|
|
|
47084
47099
|
return __generator(this, function (_a) {
|
|
47085
47100
|
switch (_a.label) {
|
|
47086
47101
|
case 0:
|
|
47102
|
+
setDetailsIsLoading(true);
|
|
47087
47103
|
console.log('Fetching details for selected search result', selectedSearchResult);
|
|
47088
47104
|
if (!selectedSearchResult || !context) return [2 /*return*/];
|
|
47089
47105
|
if (
|
|
@@ -47147,12 +47163,14 @@ var SearchResultsContainer = function () {
|
|
|
47147
47163
|
case 4:
|
|
47148
47164
|
detailsResponse = _a.sent();
|
|
47149
47165
|
dispatch(setBookingPackageDetails({ details: detailsResponse === null || detailsResponse === void 0 ? void 0 : detailsResponse.payload }));
|
|
47166
|
+
setDetailsIsLoading(false);
|
|
47150
47167
|
_a.label = 5;
|
|
47151
47168
|
case 5:
|
|
47152
47169
|
return [3 /*break*/, 7];
|
|
47153
47170
|
case 6:
|
|
47154
47171
|
err_3 = _a.sent();
|
|
47155
47172
|
console.error('Failed to fetch package details', err_3);
|
|
47173
|
+
setDetailsIsLoading(false);
|
|
47156
47174
|
return [3 /*break*/, 7];
|
|
47157
47175
|
case 7:
|
|
47158
47176
|
return [2 /*return*/];
|
|
@@ -47317,7 +47335,8 @@ var SearchResultsContainer = function () {
|
|
|
47317
47335
|
setIsOpen: handleFlyInToggle,
|
|
47318
47336
|
onPanelRef: function (el) {
|
|
47319
47337
|
return (panelRef.current = el);
|
|
47320
|
-
}
|
|
47338
|
+
},
|
|
47339
|
+
detailsLoading: detailsIsLoading
|
|
47321
47340
|
})
|
|
47322
47341
|
),
|
|
47323
47342
|
(context.searchConfiguration.qsmType === build.PortalQsmType.AccommodationAndFlight ||
|
|
@@ -47481,7 +47500,8 @@ var SearchResultsContainer = function () {
|
|
|
47481
47500
|
setIsOpen: handleFlyInToggle,
|
|
47482
47501
|
onPanelRef: function (el) {
|
|
47483
47502
|
return (panelRef.current = el);
|
|
47484
|
-
}
|
|
47503
|
+
},
|
|
47504
|
+
detailsLoading: detailsIsLoading
|
|
47485
47505
|
})
|
|
47486
47506
|
)
|
|
47487
47507
|
)
|
package/package.json
CHANGED
|
@@ -89,6 +89,8 @@ const SearchResultsContainer: React.FC = () => {
|
|
|
89
89
|
const [initialFilters, setInitialFilters] = useState<Filter[]>([]);
|
|
90
90
|
const [filtersOpen, setFiltersOpen] = useState(false);
|
|
91
91
|
|
|
92
|
+
const [detailsIsLoading, setDetailsIsLoading] = useState(false);
|
|
93
|
+
|
|
92
94
|
const [itineraryOpen, setItineraryOpen] = useState(false);
|
|
93
95
|
|
|
94
96
|
const panelRef = useRef<HTMLDivElement | null>(null);
|
|
@@ -577,6 +579,7 @@ const SearchResultsContainer: React.FC = () => {
|
|
|
577
579
|
// Seperate detailsCall
|
|
578
580
|
useEffect(() => {
|
|
579
581
|
const fetchDetails = async () => {
|
|
582
|
+
setDetailsIsLoading(true);
|
|
580
583
|
console.log('Fetching details for selected search result', selectedSearchResult);
|
|
581
584
|
if (!selectedSearchResult || !context) return;
|
|
582
585
|
if (context?.searchConfiguration.qsmType === PortalQsmType.Accommodation || context?.searchConfiguration.qsmType === PortalQsmType.GroupTour) {
|
|
@@ -639,9 +642,11 @@ const SearchResultsContainer: React.FC = () => {
|
|
|
639
642
|
|
|
640
643
|
const detailsResponse = await details(config, detailsRequest);
|
|
641
644
|
dispatch(setBookingPackageDetails({ details: detailsResponse?.payload }));
|
|
645
|
+
setDetailsIsLoading(false);
|
|
642
646
|
}
|
|
643
647
|
} catch (err) {
|
|
644
648
|
console.error('Failed to fetch package details', err);
|
|
649
|
+
setDetailsIsLoading(false);
|
|
645
650
|
}
|
|
646
651
|
};
|
|
647
652
|
|
|
@@ -763,6 +768,7 @@ const SearchResultsContainer: React.FC = () => {
|
|
|
763
768
|
isOpen={flyInIsOpen}
|
|
764
769
|
setIsOpen={handleFlyInToggle}
|
|
765
770
|
onPanelRef={(el) => (panelRef.current = el)}
|
|
771
|
+
detailsLoading={detailsIsLoading}
|
|
766
772
|
/>
|
|
767
773
|
</FlightSearchProvider>
|
|
768
774
|
)}
|
|
@@ -871,6 +877,7 @@ const SearchResultsContainer: React.FC = () => {
|
|
|
871
877
|
isOpen={flyInIsOpen}
|
|
872
878
|
setIsOpen={handleFlyInToggle}
|
|
873
879
|
onPanelRef={(el) => (panelRef.current = el)}
|
|
880
|
+
detailsLoading={detailsIsLoading}
|
|
874
881
|
/>
|
|
875
882
|
</>
|
|
876
883
|
)}
|
|
@@ -15,9 +15,10 @@ type FlyInProps = {
|
|
|
15
15
|
setIsOpen: (open: boolean) => void;
|
|
16
16
|
className?: string;
|
|
17
17
|
onPanelRef?: (el: HTMLDivElement | null) => void;
|
|
18
|
+
detailsLoading: boolean;
|
|
18
19
|
};
|
|
19
20
|
|
|
20
|
-
const FlyIn: React.FC<FlyInProps> = ({ title, srpType, isOpen, setIsOpen, className = '', onPanelRef }) => {
|
|
21
|
+
const FlyIn: React.FC<FlyInProps> = ({ title, srpType, isOpen, setIsOpen, className = '', onPanelRef, detailsLoading }) => {
|
|
21
22
|
const dispatch = useDispatch();
|
|
22
23
|
const { onCancelSearch } = useFlightSearch();
|
|
23
24
|
const panelRef = useRef<HTMLDivElement>(null);
|
|
@@ -72,7 +73,7 @@ const FlyIn: React.FC<FlyInProps> = ({ title, srpType, isOpen, setIsOpen, classN
|
|
|
72
73
|
</div>
|
|
73
74
|
{srpType === PortalQsmType.Flight && <FlightsFlyIn isOpen={isOpen} setIsOpen={setIsOpen} />}
|
|
74
75
|
{srpType === PortalQsmType.Accommodation && <AccommodationFlyIn isLoading={true} isOpen={isOpen} setIsOpen={setIsOpen} />}
|
|
75
|
-
{srpType === PortalQsmType.GroupTour && <GroupTourFlyIn isLoading={
|
|
76
|
+
{srpType === PortalQsmType.GroupTour && <GroupTourFlyIn isLoading={detailsLoading} isOpen={isOpen} setIsOpen={setIsOpen} />}
|
|
76
77
|
</div>
|
|
77
78
|
</div>
|
|
78
79
|
);
|
|
@@ -8,6 +8,7 @@ import { setBookingPackageDetails } from '../../../search-results/store/search-r
|
|
|
8
8
|
import { BookingPackageOption } from '@qite/tide-client';
|
|
9
9
|
import { PickerItem } from '../../types';
|
|
10
10
|
import { first } from 'lodash';
|
|
11
|
+
import Spinner from '../../../search-results/components/spinner/spinner';
|
|
11
12
|
|
|
12
13
|
type GroupTourFlyInProps = {
|
|
13
14
|
isLoading: boolean;
|
|
@@ -33,6 +34,11 @@ const formatPrice = (price?: number, currencyCode = 'EUR') => {
|
|
|
33
34
|
const GroupTourFlyIn: React.FC<GroupTourFlyInProps> = ({ isLoading, isOpen, setIsOpen }) => {
|
|
34
35
|
const dispatch = useDispatch();
|
|
35
36
|
const context = useContext(SearchResultsConfigurationContext);
|
|
37
|
+
|
|
38
|
+
if (isLoading) {
|
|
39
|
+
return <>{context?.customSpinner ?? <Spinner />}</>;
|
|
40
|
+
}
|
|
41
|
+
|
|
36
42
|
const language = context?.languageCode ?? 'en-GB';
|
|
37
43
|
const translations = getTranslations(language);
|
|
38
44
|
|
|
@@ -61,7 +67,7 @@ const GroupTourFlyIn: React.FC<GroupTourFlyInProps> = ({ isLoading, isOpen, setI
|
|
|
61
67
|
|
|
62
68
|
groupedMap.get(key)?.regimes.push({
|
|
63
69
|
id: option.entryLineGuid,
|
|
64
|
-
label: option.regimeName
|
|
70
|
+
label: option.regimeName ?? 'No regime'
|
|
65
71
|
});
|
|
66
72
|
});
|
|
67
73
|
|
|
@@ -190,7 +196,6 @@ const GroupTourFlyIn: React.FC<GroupTourFlyInProps> = ({ isLoading, isOpen, setI
|
|
|
190
196
|
<div className="flyin__acco__cards">
|
|
191
197
|
{roomAccommodations.map((accommodation) => {
|
|
192
198
|
const selectedOption = getSelectedOptionForAccommodation(roomIndex, accommodation.accommodationCode);
|
|
193
|
-
|
|
194
199
|
const priceDifference = getPriceDifference(selectedRoomOption?.price, roomIndex, accommodation.accommodationCode);
|
|
195
200
|
return (
|
|
196
201
|
<div className="flyin__acco__card" key={`${roomIndex}-${accommodation.accommodationCode}`}>
|
|
@@ -201,7 +206,7 @@ const GroupTourFlyIn: React.FC<GroupTourFlyInProps> = ({ isLoading, isOpen, setI
|
|
|
201
206
|
<div className="flyin__acco__footer">
|
|
202
207
|
<ItemPicker
|
|
203
208
|
items={accommodation.regimes}
|
|
204
|
-
selection={selectedOption
|
|
209
|
+
selection={selectedOption != null ? selectedOption.regimeName ?? 'No regime' : undefined}
|
|
205
210
|
label={''}
|
|
206
211
|
placeholder={'Select regime'}
|
|
207
212
|
classModifier=""
|