@qite/tide-booking-component 1.4.115 → 1.4.117
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 +83 -40
- package/build/build-cjs/src/booking-wizard/types.d.ts +1 -0
- package/build/build-esm/index.js +81 -39
- package/build/build-esm/src/booking-wizard/types.d.ts +1 -0
- package/package.json +2 -2
- package/src/booking-wizard/features/booking/booking-slice.ts +2 -1
- package/src/booking-wizard/features/booking/booking.tsx +2 -0
- package/src/booking-wizard/types.ts +1 -0
- package/src/search-results/components/search-results-container/search-results-container.tsx +8 -6
- package/src/shared/utils/tide-api-utils.ts +2 -2
package/build/build-cjs/index.js
CHANGED
|
@@ -13855,8 +13855,8 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
13855
13855
|
})(build);
|
|
13856
13856
|
|
|
13857
13857
|
var tideConnection = {
|
|
13858
|
-
host: 'https://localhost:44341',
|
|
13859
|
-
|
|
13858
|
+
// host: 'https://localhost:44341',
|
|
13859
|
+
host: 'https://preview-tide.tidesoftware.be',
|
|
13860
13860
|
apiKey: 'e9b95d79-de4c-41d6-ab7e-3dd429873058',
|
|
13861
13861
|
catalogueIds: [1],
|
|
13862
13862
|
officeId: 1
|
|
@@ -20287,7 +20287,8 @@ var fetchPackageDetails = toolkit.createAsyncThunk('booking/details', function (
|
|
|
20287
20287
|
routeId: bookingAttributes.flightRouteId,
|
|
20288
20288
|
outwardFlight: outwardFlight,
|
|
20289
20289
|
returnFlight: returnFlight,
|
|
20290
|
-
vendorConfigurationId: bookingAttributes.vendorConfigurationId
|
|
20290
|
+
vendorConfigurationId: bookingAttributes.vendorConfigurationId,
|
|
20291
|
+
searchConfigurationId: bookingAttributes.searchConfigurationId
|
|
20291
20292
|
}
|
|
20292
20293
|
};
|
|
20293
20294
|
return [4 /*yield*/, packageApi.fetchDetails(request, signal, languageCode, state.apiSettings)];
|
|
@@ -29346,6 +29347,7 @@ var Booking = function (_a) {
|
|
|
29346
29347
|
var flight = getFlightsFromParams(params, 'flight');
|
|
29347
29348
|
var flightRouteId = getStringFromParams(params, 'flightRouteId');
|
|
29348
29349
|
var vendorConfigurationId = getNumberFromParams(params, 'vendorConfigurationId');
|
|
29350
|
+
var searchConfigurationId = getNumberFromParams(params, 'searchConfigurationId');
|
|
29349
29351
|
var allotmentName = getStringFromParams(params, 'allotmentName');
|
|
29350
29352
|
var allotmentIds = getNumbersFromParams(params, 'allotmentId');
|
|
29351
29353
|
var tourCode = getStringFromParams(params, 'tourCode');
|
|
@@ -29376,6 +29378,7 @@ var Booking = function (_a) {
|
|
|
29376
29378
|
tourCode: tourCode,
|
|
29377
29379
|
flightRouteId: flightRouteId,
|
|
29378
29380
|
vendorConfigurationId: vendorConfigurationId,
|
|
29381
|
+
searchConfigurationId: searchConfigurationId,
|
|
29379
29382
|
productCode: productCode,
|
|
29380
29383
|
productName: productName
|
|
29381
29384
|
};
|
|
@@ -47986,7 +47989,7 @@ var SearchResultsContainer = function (_a) {
|
|
|
47986
47989
|
return requestRooms;
|
|
47987
47990
|
};
|
|
47988
47991
|
var buildSearchFromSeed = function (seed) {
|
|
47989
|
-
var _a;
|
|
47992
|
+
var _a, _b;
|
|
47990
47993
|
var country = seed.country;
|
|
47991
47994
|
var region = seed.region;
|
|
47992
47995
|
var oord = seed.oord;
|
|
@@ -48018,7 +48021,12 @@ var SearchResultsContainer = function (_a) {
|
|
|
48018
48021
|
officeId: 1,
|
|
48019
48022
|
agentId: context === null || context === void 0 ? void 0 : context.agentId,
|
|
48020
48023
|
payload: {
|
|
48021
|
-
catalogueIds:
|
|
48024
|
+
catalogueIds: context.searchConfiguration.defaultCatalogueId
|
|
48025
|
+
? [context.searchConfiguration.defaultCatalogueId]
|
|
48026
|
+
: (_b = (_a = context === null || context === void 0 ? void 0 : context.tideConnection) === null || _a === void 0 ? void 0 : _a.catalogueIds) !==
|
|
48027
|
+
null && _b !== void 0
|
|
48028
|
+
? _b
|
|
48029
|
+
: [1],
|
|
48022
48030
|
serviceType:
|
|
48023
48031
|
context.searchConfiguration.qsmType === build.PortalQsmType.Accommodation ||
|
|
48024
48032
|
context.searchConfiguration.qsmType === build.PortalQsmType.AccommodationAndFlight
|
|
@@ -48051,7 +48059,7 @@ var SearchResultsContainer = function (_a) {
|
|
|
48051
48059
|
};
|
|
48052
48060
|
};
|
|
48053
48061
|
var buildPackagingAccommodationRequestFromSeed = function (seed, currentTransactionId) {
|
|
48054
|
-
var _a, _b, _c, _d, _e, _f;
|
|
48062
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
48055
48063
|
var country = seed.country;
|
|
48056
48064
|
var region = seed.region;
|
|
48057
48065
|
var oord = seed.oord;
|
|
@@ -48093,9 +48101,17 @@ var SearchResultsContainer = function (_a) {
|
|
|
48093
48101
|
? _c
|
|
48094
48102
|
: 1,
|
|
48095
48103
|
agentId: (_d = context === null || context === void 0 ? void 0 : context.agentId) !== null && _d !== void 0 ? _d : null,
|
|
48096
|
-
catalogueId:
|
|
48104
|
+
catalogueId:
|
|
48105
|
+
(_g =
|
|
48106
|
+
(_e = context.searchConfiguration.defaultCatalogueId) !== null && _e !== void 0
|
|
48107
|
+
? _e
|
|
48108
|
+
: lodash.first(
|
|
48109
|
+
(_f = context === null || context === void 0 ? void 0 : context.tideConnection) === null || _f === void 0 ? void 0 : _f.catalogueIds
|
|
48110
|
+
)) !== null && _g !== void 0
|
|
48111
|
+
? _g
|
|
48112
|
+
: 1,
|
|
48097
48113
|
searchConfigurationId: context.searchConfiguration.id,
|
|
48098
|
-
language: (
|
|
48114
|
+
language: (_h = context.languageCode) !== null && _h !== void 0 ? _h : 'en-GB',
|
|
48099
48115
|
serviceType: ACCOMMODATION_SERVICE_TYPE,
|
|
48100
48116
|
fromDate: seed.fromDate,
|
|
48101
48117
|
toDate: seed.toDate,
|
|
@@ -48114,7 +48130,7 @@ var SearchResultsContainer = function (_a) {
|
|
|
48114
48130
|
};
|
|
48115
48131
|
};
|
|
48116
48132
|
var buildPackagingFlightRequestFromSeed = function (seed, currentTransactionId) {
|
|
48117
|
-
var _a, _b, _c, _d;
|
|
48133
|
+
var _a, _b, _c, _d, _e;
|
|
48118
48134
|
if (typeof window !== 'undefined') {
|
|
48119
48135
|
window.scrollTo(0, 0);
|
|
48120
48136
|
}
|
|
@@ -48147,11 +48163,14 @@ var SearchResultsContainer = function (_a) {
|
|
|
48147
48163
|
? _b
|
|
48148
48164
|
: 1,
|
|
48149
48165
|
catalogueId:
|
|
48150
|
-
(
|
|
48151
|
-
(_c = context
|
|
48152
|
-
|
|
48153
|
-
|
|
48154
|
-
|
|
48166
|
+
(_e =
|
|
48167
|
+
(_c = context.searchConfiguration.defaultCatalogueId) !== null && _c !== void 0
|
|
48168
|
+
? _c
|
|
48169
|
+
: lodash.first(
|
|
48170
|
+
(_d = context === null || context === void 0 ? void 0 : context.tideConnection) === null || _d === void 0 ? void 0 : _d.catalogueIds
|
|
48171
|
+
)) !== null && _e !== void 0
|
|
48172
|
+
? _e
|
|
48173
|
+
: 1,
|
|
48155
48174
|
departureAirportCode: seed.departureAirport,
|
|
48156
48175
|
arrivalAirportCode: seed.destinationAirport,
|
|
48157
48176
|
returnAirportCode: seed.returnAirport,
|
|
@@ -48797,9 +48816,9 @@ var SearchResultsContainer = function (_a) {
|
|
|
48797
48816
|
detailSearchRequest,
|
|
48798
48817
|
packageAccoSearchDetails,
|
|
48799
48818
|
err_6;
|
|
48800
|
-
var _a, _b, _c, _d, _e;
|
|
48801
|
-
return __generator(this, function (
|
|
48802
|
-
switch (
|
|
48819
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
48820
|
+
return __generator(this, function (_h) {
|
|
48821
|
+
switch (_h.label) {
|
|
48803
48822
|
case 0:
|
|
48804
48823
|
if (!selectedPackagingAccoResultCode || !context) return [2 /*return*/];
|
|
48805
48824
|
if (skipInitialPackagingAccoDetailsRef.current) {
|
|
@@ -48815,9 +48834,9 @@ var SearchResultsContainer = function (_a) {
|
|
|
48815
48834
|
handleFlyInToggle(true);
|
|
48816
48835
|
dispatch(setFlyInType('acco-details'));
|
|
48817
48836
|
}
|
|
48818
|
-
|
|
48837
|
+
_h.label = 1;
|
|
48819
48838
|
case 1:
|
|
48820
|
-
|
|
48839
|
+
_h.trys.push([1, 3, , 4]);
|
|
48821
48840
|
config = {
|
|
48822
48841
|
host: context.tideConnection.host,
|
|
48823
48842
|
apiKey: context.tideConnection.apiKey
|
|
@@ -48860,10 +48879,18 @@ var SearchResultsContainer = function (_a) {
|
|
|
48860
48879
|
officeId: 1,
|
|
48861
48880
|
portalId: context.portalId,
|
|
48862
48881
|
agentId: context.agentId,
|
|
48863
|
-
catalogueId:
|
|
48882
|
+
catalogueId:
|
|
48883
|
+
(_e =
|
|
48884
|
+
(_c = context.searchConfiguration.defaultCatalogueId) !== null && _c !== void 0
|
|
48885
|
+
? _c
|
|
48886
|
+
: lodash.first(
|
|
48887
|
+
(_d = context === null || context === void 0 ? void 0 : context.tideConnection) === null || _d === void 0 ? void 0 : _d.catalogueIds
|
|
48888
|
+
)) !== null && _e !== void 0
|
|
48889
|
+
? _e
|
|
48890
|
+
: 1,
|
|
48864
48891
|
searchConfigurationId: context.searchConfiguration.id,
|
|
48865
48892
|
vendorConfigurationId: selectedItem.vendorId,
|
|
48866
|
-
language: (
|
|
48893
|
+
language: (_f = context.languageCode) !== null && _f !== void 0 ? _f : 'en-GB',
|
|
48867
48894
|
serviceType: ACCOMMODATION_SERVICE_TYPE,
|
|
48868
48895
|
fromDate: selectedItem.fromDate,
|
|
48869
48896
|
toDate: selectedItem.toDate,
|
|
@@ -48878,18 +48905,18 @@ var SearchResultsContainer = function (_a) {
|
|
|
48878
48905
|
},
|
|
48879
48906
|
productCode: selectedItem.code ? selectedItem.code : '',
|
|
48880
48907
|
rooms: getPackagingRequestRoomsFromBookingRooms(
|
|
48881
|
-
(
|
|
48908
|
+
(_g = seed === null || seed === void 0 ? void 0 : seed.rooms) !== null && _g !== void 0 ? _g : null
|
|
48882
48909
|
),
|
|
48883
48910
|
tagIds: tagId ? [tagId] : []
|
|
48884
48911
|
};
|
|
48885
48912
|
return [4 /*yield*/, build.searchPackagingAccommodations(config, detailSearchRequest)];
|
|
48886
48913
|
case 2:
|
|
48887
|
-
packageAccoSearchDetails =
|
|
48914
|
+
packageAccoSearchDetails = _h.sent();
|
|
48888
48915
|
dispatch(setPackagingAccoSearchDetails(packageAccoSearchDetails));
|
|
48889
48916
|
setDetailsIsLoading(false);
|
|
48890
48917
|
return [3 /*break*/, 4];
|
|
48891
48918
|
case 3:
|
|
48892
|
-
err_6 =
|
|
48919
|
+
err_6 = _h.sent();
|
|
48893
48920
|
console.error('Failed to fetch package details', err_6);
|
|
48894
48921
|
setDetailsIsLoading(false);
|
|
48895
48922
|
return [3 /*break*/, 4];
|
|
@@ -48943,15 +48970,15 @@ var SearchResultsContainer = function (_a) {
|
|
|
48943
48970
|
var fetchPriceDetails = function () {
|
|
48944
48971
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
48945
48972
|
var config, request, priceDetails, err_7;
|
|
48946
|
-
var _a, _b;
|
|
48947
|
-
return __generator(this, function (
|
|
48948
|
-
switch (
|
|
48973
|
+
var _a, _b, _c, _d;
|
|
48974
|
+
return __generator(this, function (_e) {
|
|
48975
|
+
switch (_e.label) {
|
|
48949
48976
|
case 0:
|
|
48950
48977
|
if (!context || !editablePackagingEntry || lodash.isEmpty(editablePackagingEntry.lines)) return [2 /*return*/];
|
|
48951
48978
|
setPricesAreLoading(true);
|
|
48952
|
-
|
|
48979
|
+
_e.label = 1;
|
|
48953
48980
|
case 1:
|
|
48954
|
-
|
|
48981
|
+
_e.trys.push([1, 3, , 4]);
|
|
48955
48982
|
config = {
|
|
48956
48983
|
host: context.tideConnection.host,
|
|
48957
48984
|
apiKey: context.tideConnection.apiKey
|
|
@@ -48959,18 +48986,26 @@ var SearchResultsContainer = function (_a) {
|
|
|
48959
48986
|
request = {
|
|
48960
48987
|
language: (_a = context.languageCode) !== null && _a !== void 0 ? _a : 'en-GB',
|
|
48961
48988
|
officeId: context.tideConnection.officeId,
|
|
48962
|
-
catalogueId:
|
|
48989
|
+
catalogueId:
|
|
48990
|
+
(_d =
|
|
48991
|
+
(_b = context.searchConfiguration.defaultCatalogueId) !== null && _b !== void 0
|
|
48992
|
+
? _b
|
|
48993
|
+
: lodash.first(
|
|
48994
|
+
(_c = context === null || context === void 0 ? void 0 : context.tideConnection) === null || _c === void 0 ? void 0 : _c.catalogueIds
|
|
48995
|
+
)) !== null && _d !== void 0
|
|
48996
|
+
? _d
|
|
48997
|
+
: 1,
|
|
48963
48998
|
agentId: context.agentId,
|
|
48964
48999
|
payload: editablePackagingEntry
|
|
48965
49000
|
};
|
|
48966
49001
|
return [4 /*yield*/, build.getPriceDetails(config, request)];
|
|
48967
49002
|
case 2:
|
|
48968
|
-
priceDetails =
|
|
49003
|
+
priceDetails = _e.sent();
|
|
48969
49004
|
dispatch(setPriceDetails(priceDetails));
|
|
48970
49005
|
setPricesAreLoading(false);
|
|
48971
49006
|
return [3 /*break*/, 4];
|
|
48972
49007
|
case 3:
|
|
48973
|
-
err_7 =
|
|
49008
|
+
err_7 = _e.sent();
|
|
48974
49009
|
console.error('Error fetching price details', err_7);
|
|
48975
49010
|
setPricesAreLoading(false);
|
|
48976
49011
|
return [3 /*break*/, 4];
|
|
@@ -48983,15 +49018,15 @@ var SearchResultsContainer = function (_a) {
|
|
|
48983
49018
|
var fetchItinerary = function () {
|
|
48984
49019
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
48985
49020
|
var config, request, itinerary, err_8;
|
|
48986
|
-
var _a, _b;
|
|
48987
|
-
return __generator(this, function (
|
|
48988
|
-
switch (
|
|
49021
|
+
var _a, _b, _c, _d;
|
|
49022
|
+
return __generator(this, function (_e) {
|
|
49023
|
+
switch (_e.label) {
|
|
48989
49024
|
case 0:
|
|
48990
49025
|
if (!context || !context.packagingEntry || !editablePackagingEntry || lodash.isEmpty(editablePackagingEntry.lines)) return [2 /*return*/];
|
|
48991
49026
|
setItineraryIsLoading(true);
|
|
48992
|
-
|
|
49027
|
+
_e.label = 1;
|
|
48993
49028
|
case 1:
|
|
48994
|
-
|
|
49029
|
+
_e.trys.push([1, 3, , 4]);
|
|
48995
49030
|
config = {
|
|
48996
49031
|
host: context.tideConnection.host,
|
|
48997
49032
|
apiKey: context.tideConnection.apiKey
|
|
@@ -48999,18 +49034,26 @@ var SearchResultsContainer = function (_a) {
|
|
|
48999
49034
|
request = {
|
|
49000
49035
|
language: (_a = context.languageCode) !== null && _a !== void 0 ? _a : 'en-GB',
|
|
49001
49036
|
officeId: context.tideConnection.officeId,
|
|
49002
|
-
catalogueId:
|
|
49037
|
+
catalogueId:
|
|
49038
|
+
(_d =
|
|
49039
|
+
(_b = context.searchConfiguration.defaultCatalogueId) !== null && _b !== void 0
|
|
49040
|
+
? _b
|
|
49041
|
+
: lodash.first(
|
|
49042
|
+
(_c = context === null || context === void 0 ? void 0 : context.tideConnection) === null || _c === void 0 ? void 0 : _c.catalogueIds
|
|
49043
|
+
)) !== null && _d !== void 0
|
|
49044
|
+
? _d
|
|
49045
|
+
: 1,
|
|
49003
49046
|
agentId: context.agentId,
|
|
49004
49047
|
payload: editablePackagingEntry
|
|
49005
49048
|
};
|
|
49006
49049
|
return [4 /*yield*/, build.getItinerary(config, request)];
|
|
49007
49050
|
case 2:
|
|
49008
|
-
itinerary =
|
|
49051
|
+
itinerary = _e.sent();
|
|
49009
49052
|
dispatch(setItinerary(itinerary));
|
|
49010
49053
|
setItineraryIsLoading(false);
|
|
49011
49054
|
return [3 /*break*/, 4];
|
|
49012
49055
|
case 3:
|
|
49013
|
-
err_8 =
|
|
49056
|
+
err_8 = _e.sent();
|
|
49014
49057
|
console.error('Error fetching itinerary', err_8);
|
|
49015
49058
|
setItineraryIsLoading(false);
|
|
49016
49059
|
return [3 /*break*/, 4];
|
package/build/build-esm/index.js
CHANGED
|
@@ -13887,8 +13887,8 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
13887
13887
|
})(build);
|
|
13888
13888
|
|
|
13889
13889
|
var tideConnection = {
|
|
13890
|
-
host: 'https://localhost:44341',
|
|
13891
|
-
|
|
13890
|
+
// host: 'https://localhost:44341',
|
|
13891
|
+
host: 'https://preview-tide.tidesoftware.be',
|
|
13892
13892
|
apiKey: 'e9b95d79-de4c-41d6-ab7e-3dd429873058',
|
|
13893
13893
|
catalogueIds: [1],
|
|
13894
13894
|
officeId: 1
|
|
@@ -20294,7 +20294,8 @@ var fetchPackageDetails = createAsyncThunk('booking/details', function (_1, _a)
|
|
|
20294
20294
|
routeId: bookingAttributes.flightRouteId,
|
|
20295
20295
|
outwardFlight: outwardFlight,
|
|
20296
20296
|
returnFlight: returnFlight,
|
|
20297
|
-
vendorConfigurationId: bookingAttributes.vendorConfigurationId
|
|
20297
|
+
vendorConfigurationId: bookingAttributes.vendorConfigurationId,
|
|
20298
|
+
searchConfigurationId: bookingAttributes.searchConfigurationId
|
|
20298
20299
|
}
|
|
20299
20300
|
};
|
|
20300
20301
|
return [4 /*yield*/, packageApi.fetchDetails(request, signal, languageCode, state.apiSettings)];
|
|
@@ -29265,6 +29266,7 @@ var Booking = function (_a) {
|
|
|
29265
29266
|
var flight = getFlightsFromParams(params, 'flight');
|
|
29266
29267
|
var flightRouteId = getStringFromParams(params, 'flightRouteId');
|
|
29267
29268
|
var vendorConfigurationId = getNumberFromParams(params, 'vendorConfigurationId');
|
|
29269
|
+
var searchConfigurationId = getNumberFromParams(params, 'searchConfigurationId');
|
|
29268
29270
|
var allotmentName = getStringFromParams(params, 'allotmentName');
|
|
29269
29271
|
var allotmentIds = getNumbersFromParams(params, 'allotmentId');
|
|
29270
29272
|
var tourCode = getStringFromParams(params, 'tourCode');
|
|
@@ -29295,6 +29297,7 @@ var Booking = function (_a) {
|
|
|
29295
29297
|
tourCode: tourCode,
|
|
29296
29298
|
flightRouteId: flightRouteId,
|
|
29297
29299
|
vendorConfigurationId: vendorConfigurationId,
|
|
29300
|
+
searchConfigurationId: searchConfigurationId,
|
|
29298
29301
|
productCode: productCode,
|
|
29299
29302
|
productName: productName
|
|
29300
29303
|
};
|
|
@@ -47750,7 +47753,7 @@ var SearchResultsContainer = function (_a) {
|
|
|
47750
47753
|
return requestRooms;
|
|
47751
47754
|
};
|
|
47752
47755
|
var buildSearchFromSeed = function (seed) {
|
|
47753
|
-
var _a;
|
|
47756
|
+
var _a, _b;
|
|
47754
47757
|
var country = seed.country;
|
|
47755
47758
|
var region = seed.region;
|
|
47756
47759
|
var oord = seed.oord;
|
|
@@ -47782,7 +47785,12 @@ var SearchResultsContainer = function (_a) {
|
|
|
47782
47785
|
officeId: 1,
|
|
47783
47786
|
agentId: context === null || context === void 0 ? void 0 : context.agentId,
|
|
47784
47787
|
payload: {
|
|
47785
|
-
catalogueIds:
|
|
47788
|
+
catalogueIds: context.searchConfiguration.defaultCatalogueId
|
|
47789
|
+
? [context.searchConfiguration.defaultCatalogueId]
|
|
47790
|
+
: (_b = (_a = context === null || context === void 0 ? void 0 : context.tideConnection) === null || _a === void 0 ? void 0 : _a.catalogueIds) !==
|
|
47791
|
+
null && _b !== void 0
|
|
47792
|
+
? _b
|
|
47793
|
+
: [1],
|
|
47786
47794
|
serviceType:
|
|
47787
47795
|
context.searchConfiguration.qsmType === build.PortalQsmType.Accommodation ||
|
|
47788
47796
|
context.searchConfiguration.qsmType === build.PortalQsmType.AccommodationAndFlight
|
|
@@ -47815,7 +47823,7 @@ var SearchResultsContainer = function (_a) {
|
|
|
47815
47823
|
};
|
|
47816
47824
|
};
|
|
47817
47825
|
var buildPackagingAccommodationRequestFromSeed = function (seed, currentTransactionId) {
|
|
47818
|
-
var _a, _b, _c, _d, _e, _f;
|
|
47826
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
47819
47827
|
var country = seed.country;
|
|
47820
47828
|
var region = seed.region;
|
|
47821
47829
|
var oord = seed.oord;
|
|
@@ -47857,9 +47865,16 @@ var SearchResultsContainer = function (_a) {
|
|
|
47857
47865
|
? _c
|
|
47858
47866
|
: 1,
|
|
47859
47867
|
agentId: (_d = context === null || context === void 0 ? void 0 : context.agentId) !== null && _d !== void 0 ? _d : null,
|
|
47860
|
-
catalogueId:
|
|
47868
|
+
catalogueId:
|
|
47869
|
+
(_g =
|
|
47870
|
+
(_e = context.searchConfiguration.defaultCatalogueId) !== null && _e !== void 0
|
|
47871
|
+
? _e
|
|
47872
|
+
: first((_f = context === null || context === void 0 ? void 0 : context.tideConnection) === null || _f === void 0 ? void 0 : _f.catalogueIds)) !==
|
|
47873
|
+
null && _g !== void 0
|
|
47874
|
+
? _g
|
|
47875
|
+
: 1,
|
|
47861
47876
|
searchConfigurationId: context.searchConfiguration.id,
|
|
47862
|
-
language: (
|
|
47877
|
+
language: (_h = context.languageCode) !== null && _h !== void 0 ? _h : 'en-GB',
|
|
47863
47878
|
serviceType: ACCOMMODATION_SERVICE_TYPE,
|
|
47864
47879
|
fromDate: seed.fromDate,
|
|
47865
47880
|
toDate: seed.toDate,
|
|
@@ -47878,7 +47893,7 @@ var SearchResultsContainer = function (_a) {
|
|
|
47878
47893
|
};
|
|
47879
47894
|
};
|
|
47880
47895
|
var buildPackagingFlightRequestFromSeed = function (seed, currentTransactionId) {
|
|
47881
|
-
var _a, _b, _c, _d;
|
|
47896
|
+
var _a, _b, _c, _d, _e;
|
|
47882
47897
|
if (typeof window !== 'undefined') {
|
|
47883
47898
|
window.scrollTo(0, 0);
|
|
47884
47899
|
}
|
|
@@ -47911,10 +47926,13 @@ var SearchResultsContainer = function (_a) {
|
|
|
47911
47926
|
? _b
|
|
47912
47927
|
: 1,
|
|
47913
47928
|
catalogueId:
|
|
47914
|
-
(
|
|
47915
|
-
null &&
|
|
47916
|
-
|
|
47917
|
-
|
|
47929
|
+
(_e =
|
|
47930
|
+
(_c = context.searchConfiguration.defaultCatalogueId) !== null && _c !== void 0
|
|
47931
|
+
? _c
|
|
47932
|
+
: first((_d = context === null || context === void 0 ? void 0 : context.tideConnection) === null || _d === void 0 ? void 0 : _d.catalogueIds)) !==
|
|
47933
|
+
null && _e !== void 0
|
|
47934
|
+
? _e
|
|
47935
|
+
: 1,
|
|
47918
47936
|
departureAirportCode: seed.departureAirport,
|
|
47919
47937
|
arrivalAirportCode: seed.destinationAirport,
|
|
47920
47938
|
returnAirportCode: seed.returnAirport,
|
|
@@ -48560,9 +48578,9 @@ var SearchResultsContainer = function (_a) {
|
|
|
48560
48578
|
detailSearchRequest,
|
|
48561
48579
|
packageAccoSearchDetails,
|
|
48562
48580
|
err_6;
|
|
48563
|
-
var _a, _b, _c, _d, _e;
|
|
48564
|
-
return __generator(this, function (
|
|
48565
|
-
switch (
|
|
48581
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
48582
|
+
return __generator(this, function (_h) {
|
|
48583
|
+
switch (_h.label) {
|
|
48566
48584
|
case 0:
|
|
48567
48585
|
if (!selectedPackagingAccoResultCode || !context) return [2 /*return*/];
|
|
48568
48586
|
if (skipInitialPackagingAccoDetailsRef.current) {
|
|
@@ -48578,9 +48596,9 @@ var SearchResultsContainer = function (_a) {
|
|
|
48578
48596
|
handleFlyInToggle(true);
|
|
48579
48597
|
dispatch(setFlyInType('acco-details'));
|
|
48580
48598
|
}
|
|
48581
|
-
|
|
48599
|
+
_h.label = 1;
|
|
48582
48600
|
case 1:
|
|
48583
|
-
|
|
48601
|
+
_h.trys.push([1, 3, , 4]);
|
|
48584
48602
|
config = {
|
|
48585
48603
|
host: context.tideConnection.host,
|
|
48586
48604
|
apiKey: context.tideConnection.apiKey
|
|
@@ -48623,10 +48641,18 @@ var SearchResultsContainer = function (_a) {
|
|
|
48623
48641
|
officeId: 1,
|
|
48624
48642
|
portalId: context.portalId,
|
|
48625
48643
|
agentId: context.agentId,
|
|
48626
|
-
catalogueId:
|
|
48644
|
+
catalogueId:
|
|
48645
|
+
(_e =
|
|
48646
|
+
(_c = context.searchConfiguration.defaultCatalogueId) !== null && _c !== void 0
|
|
48647
|
+
? _c
|
|
48648
|
+
: first(
|
|
48649
|
+
(_d = context === null || context === void 0 ? void 0 : context.tideConnection) === null || _d === void 0 ? void 0 : _d.catalogueIds
|
|
48650
|
+
)) !== null && _e !== void 0
|
|
48651
|
+
? _e
|
|
48652
|
+
: 1,
|
|
48627
48653
|
searchConfigurationId: context.searchConfiguration.id,
|
|
48628
48654
|
vendorConfigurationId: selectedItem.vendorId,
|
|
48629
|
-
language: (
|
|
48655
|
+
language: (_f = context.languageCode) !== null && _f !== void 0 ? _f : 'en-GB',
|
|
48630
48656
|
serviceType: ACCOMMODATION_SERVICE_TYPE,
|
|
48631
48657
|
fromDate: selectedItem.fromDate,
|
|
48632
48658
|
toDate: selectedItem.toDate,
|
|
@@ -48641,18 +48667,18 @@ var SearchResultsContainer = function (_a) {
|
|
|
48641
48667
|
},
|
|
48642
48668
|
productCode: selectedItem.code ? selectedItem.code : '',
|
|
48643
48669
|
rooms: getPackagingRequestRoomsFromBookingRooms(
|
|
48644
|
-
(
|
|
48670
|
+
(_g = seed === null || seed === void 0 ? void 0 : seed.rooms) !== null && _g !== void 0 ? _g : null
|
|
48645
48671
|
),
|
|
48646
48672
|
tagIds: tagId ? [tagId] : []
|
|
48647
48673
|
};
|
|
48648
48674
|
return [4 /*yield*/, build.searchPackagingAccommodations(config, detailSearchRequest)];
|
|
48649
48675
|
case 2:
|
|
48650
|
-
packageAccoSearchDetails =
|
|
48676
|
+
packageAccoSearchDetails = _h.sent();
|
|
48651
48677
|
dispatch(setPackagingAccoSearchDetails(packageAccoSearchDetails));
|
|
48652
48678
|
setDetailsIsLoading(false);
|
|
48653
48679
|
return [3 /*break*/, 4];
|
|
48654
48680
|
case 3:
|
|
48655
|
-
err_6 =
|
|
48681
|
+
err_6 = _h.sent();
|
|
48656
48682
|
console.error('Failed to fetch package details', err_6);
|
|
48657
48683
|
setDetailsIsLoading(false);
|
|
48658
48684
|
return [3 /*break*/, 4];
|
|
@@ -48706,15 +48732,15 @@ var SearchResultsContainer = function (_a) {
|
|
|
48706
48732
|
var fetchPriceDetails = function () {
|
|
48707
48733
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
48708
48734
|
var config, request, priceDetails, err_7;
|
|
48709
|
-
var _a, _b;
|
|
48710
|
-
return __generator(this, function (
|
|
48711
|
-
switch (
|
|
48735
|
+
var _a, _b, _c, _d;
|
|
48736
|
+
return __generator(this, function (_e) {
|
|
48737
|
+
switch (_e.label) {
|
|
48712
48738
|
case 0:
|
|
48713
48739
|
if (!context || !editablePackagingEntry || isEmpty(editablePackagingEntry.lines)) return [2 /*return*/];
|
|
48714
48740
|
setPricesAreLoading(true);
|
|
48715
|
-
|
|
48741
|
+
_e.label = 1;
|
|
48716
48742
|
case 1:
|
|
48717
|
-
|
|
48743
|
+
_e.trys.push([1, 3, , 4]);
|
|
48718
48744
|
config = {
|
|
48719
48745
|
host: context.tideConnection.host,
|
|
48720
48746
|
apiKey: context.tideConnection.apiKey
|
|
@@ -48722,18 +48748,26 @@ var SearchResultsContainer = function (_a) {
|
|
|
48722
48748
|
request = {
|
|
48723
48749
|
language: (_a = context.languageCode) !== null && _a !== void 0 ? _a : 'en-GB',
|
|
48724
48750
|
officeId: context.tideConnection.officeId,
|
|
48725
|
-
catalogueId:
|
|
48751
|
+
catalogueId:
|
|
48752
|
+
(_d =
|
|
48753
|
+
(_b = context.searchConfiguration.defaultCatalogueId) !== null && _b !== void 0
|
|
48754
|
+
? _b
|
|
48755
|
+
: first(
|
|
48756
|
+
(_c = context === null || context === void 0 ? void 0 : context.tideConnection) === null || _c === void 0 ? void 0 : _c.catalogueIds
|
|
48757
|
+
)) !== null && _d !== void 0
|
|
48758
|
+
? _d
|
|
48759
|
+
: 1,
|
|
48726
48760
|
agentId: context.agentId,
|
|
48727
48761
|
payload: editablePackagingEntry
|
|
48728
48762
|
};
|
|
48729
48763
|
return [4 /*yield*/, build.getPriceDetails(config, request)];
|
|
48730
48764
|
case 2:
|
|
48731
|
-
priceDetails =
|
|
48765
|
+
priceDetails = _e.sent();
|
|
48732
48766
|
dispatch(setPriceDetails(priceDetails));
|
|
48733
48767
|
setPricesAreLoading(false);
|
|
48734
48768
|
return [3 /*break*/, 4];
|
|
48735
48769
|
case 3:
|
|
48736
|
-
err_7 =
|
|
48770
|
+
err_7 = _e.sent();
|
|
48737
48771
|
console.error('Error fetching price details', err_7);
|
|
48738
48772
|
setPricesAreLoading(false);
|
|
48739
48773
|
return [3 /*break*/, 4];
|
|
@@ -48746,15 +48780,15 @@ var SearchResultsContainer = function (_a) {
|
|
|
48746
48780
|
var fetchItinerary = function () {
|
|
48747
48781
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
48748
48782
|
var config, request, itinerary, err_8;
|
|
48749
|
-
var _a, _b;
|
|
48750
|
-
return __generator(this, function (
|
|
48751
|
-
switch (
|
|
48783
|
+
var _a, _b, _c, _d;
|
|
48784
|
+
return __generator(this, function (_e) {
|
|
48785
|
+
switch (_e.label) {
|
|
48752
48786
|
case 0:
|
|
48753
48787
|
if (!context || !context.packagingEntry || !editablePackagingEntry || isEmpty(editablePackagingEntry.lines)) return [2 /*return*/];
|
|
48754
48788
|
setItineraryIsLoading(true);
|
|
48755
|
-
|
|
48789
|
+
_e.label = 1;
|
|
48756
48790
|
case 1:
|
|
48757
|
-
|
|
48791
|
+
_e.trys.push([1, 3, , 4]);
|
|
48758
48792
|
config = {
|
|
48759
48793
|
host: context.tideConnection.host,
|
|
48760
48794
|
apiKey: context.tideConnection.apiKey
|
|
@@ -48762,18 +48796,26 @@ var SearchResultsContainer = function (_a) {
|
|
|
48762
48796
|
request = {
|
|
48763
48797
|
language: (_a = context.languageCode) !== null && _a !== void 0 ? _a : 'en-GB',
|
|
48764
48798
|
officeId: context.tideConnection.officeId,
|
|
48765
|
-
catalogueId:
|
|
48799
|
+
catalogueId:
|
|
48800
|
+
(_d =
|
|
48801
|
+
(_b = context.searchConfiguration.defaultCatalogueId) !== null && _b !== void 0
|
|
48802
|
+
? _b
|
|
48803
|
+
: first(
|
|
48804
|
+
(_c = context === null || context === void 0 ? void 0 : context.tideConnection) === null || _c === void 0 ? void 0 : _c.catalogueIds
|
|
48805
|
+
)) !== null && _d !== void 0
|
|
48806
|
+
? _d
|
|
48807
|
+
: 1,
|
|
48766
48808
|
agentId: context.agentId,
|
|
48767
48809
|
payload: editablePackagingEntry
|
|
48768
48810
|
};
|
|
48769
48811
|
return [4 /*yield*/, build.getItinerary(config, request)];
|
|
48770
48812
|
case 2:
|
|
48771
|
-
itinerary =
|
|
48813
|
+
itinerary = _e.sent();
|
|
48772
48814
|
dispatch(setItinerary(itinerary));
|
|
48773
48815
|
setItineraryIsLoading(false);
|
|
48774
48816
|
return [3 /*break*/, 4];
|
|
48775
48817
|
case 3:
|
|
48776
|
-
err_8 =
|
|
48818
|
+
err_8 = _e.sent();
|
|
48777
48819
|
console.error('Error fetching itinerary', err_8);
|
|
48778
48820
|
setItineraryIsLoading(false);
|
|
48779
48821
|
return [3 /*break*/, 4];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qite/tide-booking-component",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.117",
|
|
4
4
|
"description": "React Booking wizard & Booking product component for Tide",
|
|
5
5
|
"main": "build/build-cjs/index.js",
|
|
6
6
|
"types": "build/build-cjs/src/index.d.ts",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@jsonurl/jsonurl": "^1.1.4",
|
|
31
31
|
"@popperjs/core": "^2.10.2",
|
|
32
|
-
"@qite/tide-client": "^1.1.
|
|
32
|
+
"@qite/tide-client": "^1.1.174",
|
|
33
33
|
"@reduxjs/toolkit": "^2.8.2",
|
|
34
34
|
"@rollup/plugin-commonjs": "^19.0.1",
|
|
35
35
|
"@rollup/plugin-json": "^4.1.0",
|
|
@@ -225,7 +225,8 @@ const fetchPackageDetails = createAsyncThunk('booking/details', async (_, { disp
|
|
|
225
225
|
routeId: bookingAttributes.flightRouteId,
|
|
226
226
|
outwardFlight: outwardFlight,
|
|
227
227
|
returnFlight: returnFlight,
|
|
228
|
-
vendorConfigurationId: bookingAttributes.vendorConfigurationId
|
|
228
|
+
vendorConfigurationId: bookingAttributes.vendorConfigurationId,
|
|
229
|
+
searchConfigurationId: bookingAttributes.searchConfigurationId
|
|
229
230
|
} as BookingPackageDetailsRequest
|
|
230
231
|
} as BookingPackageRequest<BookingPackageDetailsRequest>;
|
|
231
232
|
|
|
@@ -139,6 +139,7 @@ const Booking: React.FC<BookingProps> = ({ productCode, productName, thumbnailUr
|
|
|
139
139
|
const flight = getFlightsFromParams(params, 'flight');
|
|
140
140
|
const flightRouteId = getStringFromParams(params, 'flightRouteId');
|
|
141
141
|
const vendorConfigurationId = getNumberFromParams(params, 'vendorConfigurationId');
|
|
142
|
+
const searchConfigurationId = getNumberFromParams(params, 'searchConfigurationId');
|
|
142
143
|
const allotmentName = getStringFromParams(params, 'allotmentName');
|
|
143
144
|
const allotmentIds = getNumbersFromParams(params, 'allotmentId');
|
|
144
145
|
const tourCode = getStringFromParams(params, 'tourCode');
|
|
@@ -167,6 +168,7 @@ const Booking: React.FC<BookingProps> = ({ productCode, productName, thumbnailUr
|
|
|
167
168
|
tourCode,
|
|
168
169
|
flightRouteId,
|
|
169
170
|
vendorConfigurationId,
|
|
171
|
+
searchConfigurationId,
|
|
170
172
|
productCode,
|
|
171
173
|
productName
|
|
172
174
|
} as BookingAttributes;
|
|
@@ -266,7 +266,9 @@ const SearchResultsContainer: React.FC<SearchResultsContainerProps> = ({ onBooki
|
|
|
266
266
|
officeId: 1,
|
|
267
267
|
agentId: context?.agentId,
|
|
268
268
|
payload: {
|
|
269
|
-
catalogueIds: context!.
|
|
269
|
+
catalogueIds: context!.searchConfiguration.defaultCatalogueId
|
|
270
|
+
? [context!.searchConfiguration.defaultCatalogueId]
|
|
271
|
+
: context?.tideConnection?.catalogueIds ?? [1],
|
|
270
272
|
serviceType:
|
|
271
273
|
context!.searchConfiguration.qsmType === PortalQsmType.Accommodation || context!.searchConfiguration.qsmType === PortalQsmType.AccommodationAndFlight
|
|
272
274
|
? ACCOMMODATION_SERVICE_TYPE
|
|
@@ -340,7 +342,7 @@ const SearchResultsContainer: React.FC<SearchResultsContainerProps> = ({ onBooki
|
|
|
340
342
|
transactionId: currentTransactionId,
|
|
341
343
|
officeId: context?.tideConnection?.officeId ?? 1,
|
|
342
344
|
agentId: context?.agentId ?? null,
|
|
343
|
-
catalogueId: context!.searchConfiguration.defaultCatalogueId ??
|
|
345
|
+
catalogueId: context!.searchConfiguration.defaultCatalogueId ?? first(context?.tideConnection?.catalogueIds) ?? 1,
|
|
344
346
|
searchConfigurationId: context!.searchConfiguration.id,
|
|
345
347
|
language: context!.languageCode ?? 'en-GB',
|
|
346
348
|
serviceType: ACCOMMODATION_SERVICE_TYPE,
|
|
@@ -372,7 +374,7 @@ const SearchResultsContainer: React.FC<SearchResultsContainerProps> = ({ onBooki
|
|
|
372
374
|
return {
|
|
373
375
|
transactionId: currentTransactionId,
|
|
374
376
|
officeId: context?.tideConnection?.officeId ?? 1,
|
|
375
|
-
catalogueId: first(context?.tideConnection?.catalogueIds) ??
|
|
377
|
+
catalogueId: context!.searchConfiguration.defaultCatalogueId ?? first(context?.tideConnection?.catalogueIds) ?? 1,
|
|
376
378
|
departureAirportCode: seed.departureAirport,
|
|
377
379
|
arrivalAirportCode: seed.destinationAirport,
|
|
378
380
|
returnAirportCode: seed.returnAirport,
|
|
@@ -946,7 +948,7 @@ const SearchResultsContainer: React.FC<SearchResultsContainerProps> = ({ onBooki
|
|
|
946
948
|
officeId: 1,
|
|
947
949
|
portalId: context.portalId,
|
|
948
950
|
agentId: context.agentId,
|
|
949
|
-
catalogueId: context!.searchConfiguration.defaultCatalogueId ??
|
|
951
|
+
catalogueId: context!.searchConfiguration.defaultCatalogueId ?? first(context?.tideConnection?.catalogueIds) ?? 1,
|
|
950
952
|
searchConfigurationId: context!.searchConfiguration.id,
|
|
951
953
|
vendorConfigurationId: selectedItem.vendorId,
|
|
952
954
|
language: context!.languageCode ?? 'en-GB',
|
|
@@ -1018,7 +1020,7 @@ const SearchResultsContainer: React.FC<SearchResultsContainerProps> = ({ onBooki
|
|
|
1018
1020
|
const request = {
|
|
1019
1021
|
language: context.languageCode ?? 'en-GB',
|
|
1020
1022
|
officeId: context.tideConnection.officeId,
|
|
1021
|
-
catalogueId: context
|
|
1023
|
+
catalogueId: context!.searchConfiguration.defaultCatalogueId ?? first(context?.tideConnection?.catalogueIds) ?? 1,
|
|
1022
1024
|
agentId: context.agentId,
|
|
1023
1025
|
payload: editablePackagingEntry
|
|
1024
1026
|
} as PackagingRequestBase<PackagingEntry>;
|
|
@@ -1044,7 +1046,7 @@ const SearchResultsContainer: React.FC<SearchResultsContainerProps> = ({ onBooki
|
|
|
1044
1046
|
const request = {
|
|
1045
1047
|
language: context.languageCode ?? 'en-GB',
|
|
1046
1048
|
officeId: context.tideConnection.officeId,
|
|
1047
|
-
catalogueId: context
|
|
1049
|
+
catalogueId: context!.searchConfiguration.defaultCatalogueId ?? first(context?.tideConnection?.catalogueIds) ?? 1,
|
|
1048
1050
|
agentId: context.agentId,
|
|
1049
1051
|
payload: editablePackagingEntry
|
|
1050
1052
|
} as PackagingRequestBase<PackagingEntry>;
|
|
@@ -3,8 +3,8 @@ import { isNil } from 'lodash';
|
|
|
3
3
|
import { ApiSettingsState } from '../types';
|
|
4
4
|
|
|
5
5
|
export const tideConnection = {
|
|
6
|
-
host: 'https://localhost:44341',
|
|
7
|
-
|
|
6
|
+
// host: 'https://localhost:44341',
|
|
7
|
+
host: 'https://preview-tide.tidesoftware.be',
|
|
8
8
|
apiKey: 'e9b95d79-de4c-41d6-ab7e-3dd429873058',
|
|
9
9
|
catalogueIds: [1],
|
|
10
10
|
officeId: 1
|