@sabstravtech/obtservices 0.0.22041208 → 0.0.22042501
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/angular/fetchers.d.ts +1 -0
- package/angular/lib/vendor/fetchers/email-basket.fetcher.d.ts +7 -0
- package/angular/lib/vendor/services/search.service.d.ts +4 -3
- package/angular/lib/vendor/services/user.service.d.ts +4 -3
- package/angular/lib/vendor/types/graphql.angular.types.d.ts +507 -9
- package/angular/sabstravtech-obtservices-angular.metadata.json +1 -1
- package/base/fetchers.d.ts +1 -0
- package/base/lib/vendor/classes/eurostar-enterprise-search.d.ts +2 -1
- package/base/lib/vendor/classes/hotel-enterprise-search.d.ts +1 -1
- package/base/lib/vendor/classes/modal-types.enum.d.ts +1 -0
- package/base/lib/vendor/classes/rail-enterprise-search.d.ts +2 -0
- package/base/lib/vendor/classes/supplementary-booking-info-impl.d.ts +1 -1
- package/base/lib/vendor/classes/user-favourite.enum.d.ts +1 -0
- package/base/lib/vendor/fetchers/email-basket.fetcher.d.ts +20 -0
- package/base/lib/vendor/interfaces/Ieurostar-enterprise-search.d.ts +1 -0
- package/base/lib/vendor/interfaces/Ihotel-enterprise-search.d.ts +1 -1
- package/base/lib/vendor/interfaces/Isearch.service.d.ts +3 -3
- package/base/lib/vendor/interfaces/Isupplementary-booking-info-impl.d.ts +1 -1
- package/base/lib/vendor/services/search.service.d.ts +7 -5
- package/base/lib/vendor/services/url.service.d.ts +2 -1
- package/base/lib/vendor/services/user.service.d.ts +8 -2
- package/base/lib/vendor/types/graphql.types.d.ts +502 -9
- package/base/lib/vendor/types/types.d.ts +2 -2
- package/base/sabstravtech-obtservices-base.metadata.json +1 -1
- package/bundles/sabstravtech-obtservices-angular.umd.js +136 -84
- package/bundles/sabstravtech-obtservices-angular.umd.js.map +1 -1
- package/bundles/sabstravtech-obtservices-angular.umd.min.js +1 -1
- package/bundles/sabstravtech-obtservices-angular.umd.min.js.map +1 -1
- package/bundles/sabstravtech-obtservices-base.umd.js +206 -49
- package/bundles/sabstravtech-obtservices-base.umd.js.map +1 -1
- package/bundles/sabstravtech-obtservices-base.umd.min.js +2 -2
- package/bundles/sabstravtech-obtservices-base.umd.min.js.map +1 -1
- package/esm2015/angular/fetchers.js +2 -1
- package/esm2015/angular/lib/vendor/fetchers/email-basket.fetcher.js +25 -0
- package/esm2015/angular/lib/vendor/services/search.service.js +8 -5
- package/esm2015/angular/lib/vendor/services/user.service.js +13 -10
- package/esm2015/angular/lib/vendor/types/graphql.angular.types.js +1006 -2
- package/esm2015/base/fetchers.js +2 -1
- package/esm2015/base/lib/vendor/classes/carhire-enterprise-search.js +34 -8
- package/esm2015/base/lib/vendor/classes/eurostar-enterprise-search.js +15 -12
- package/esm2015/base/lib/vendor/classes/flight-enterprise-search.js +6 -1
- package/esm2015/base/lib/vendor/classes/hotel-enterprise-search.js +31 -4
- package/esm2015/base/lib/vendor/classes/lounges-enterprise-search.js +10 -2
- package/esm2015/base/lib/vendor/classes/modal-types.enum.js +2 -1
- package/esm2015/base/lib/vendor/classes/parking-enterprise-search.js +12 -2
- package/esm2015/base/lib/vendor/classes/rail-enterprise-search.js +35 -19
- package/esm2015/base/lib/vendor/classes/supplementary-booking-info-impl.js +3 -3
- package/esm2015/base/lib/vendor/classes/user-favourite.enum.js +2 -1
- package/esm2015/base/lib/vendor/data/euro-stations.json +8 -0
- package/esm2015/base/lib/vendor/fetchers/email-basket.fetcher.js +11 -0
- package/esm2015/base/lib/vendor/interfaces/Ieurostar-enterprise-search.js +1 -1
- package/esm2015/base/lib/vendor/interfaces/Ihotel-enterprise-search.js +1 -1
- package/esm2015/base/lib/vendor/interfaces/Isearch.service.js +1 -1
- package/esm2015/base/lib/vendor/interfaces/Isupplementary-booking-info-impl.js +1 -1
- package/esm2015/base/lib/vendor/services/hotel-avallibility.service.js +2 -1
- package/esm2015/base/lib/vendor/services/search.service.js +8 -3
- package/esm2015/base/lib/vendor/services/url.service.js +2 -1
- package/esm2015/base/lib/vendor/services/user.service.js +19 -2
- package/esm2015/base/lib/vendor/types/graphql.types.js +11 -1
- package/esm2015/base/lib/vendor/types/types.js +3 -3
- package/fesm2015/sabstravtech-obtservices-angular.js +1048 -26
- package/fesm2015/sabstravtech-obtservices-angular.js.map +1 -1
- package/fesm2015/sabstravtech-obtservices-base.js +199 -50
- package/fesm2015/sabstravtech-obtservices-base.js.map +1 -1
- package/package.json +1 -1
|
@@ -172,7 +172,8 @@
|
|
|
172
172
|
ModalTypes.AlternativeRailModalComponent = new ModalTypes('AlternativeRailModalComponent');
|
|
173
173
|
ModalTypes.WarningRemoveModalComponent = new ModalTypes('WarningRemoveModalComponent');
|
|
174
174
|
ModalTypes.RailTicketsDialogComponent = new ModalTypes('RailTicketsDialogComponent');
|
|
175
|
-
ModalTypes.ModalFlightFareComponent = new ModalTypes('ModalFlightFareComponent');
|
|
175
|
+
ModalTypes.ModalFlightFareComponent = new ModalTypes('ModalFlightFareComponent');
|
|
176
|
+
ModalTypes.FlightExtrasDialogComponent = new ModalTypes('FlightExtrasDialogComponent');
|
|
176
177
|
|
|
177
178
|
var BaseNetworkCall = /** @class */ (function () {
|
|
178
179
|
function BaseNetworkCall(modelService) {
|
|
@@ -899,6 +900,16 @@
|
|
|
899
900
|
IrlTravellerStatus["Placeholder"] = "placeholder";
|
|
900
901
|
IrlTravellerStatus["Complete"] = "complete";
|
|
901
902
|
})(IrlTravellerStatus || (IrlTravellerStatus = {}));
|
|
903
|
+
var LogLevelType;
|
|
904
|
+
(function (LogLevelType) {
|
|
905
|
+
LogLevelType["Error"] = "ERROR";
|
|
906
|
+
LogLevelType["Warn"] = "WARN";
|
|
907
|
+
LogLevelType["Info"] = "INFO";
|
|
908
|
+
LogLevelType["Http"] = "HTTP";
|
|
909
|
+
LogLevelType["Verbose"] = "VERBOSE";
|
|
910
|
+
LogLevelType["Debug"] = "DEBUG";
|
|
911
|
+
LogLevelType["Silly"] = "SILLY";
|
|
912
|
+
})(LogLevelType || (LogLevelType = {}));
|
|
902
913
|
var MessageTarget;
|
|
903
914
|
(function (MessageTarget) {
|
|
904
915
|
MessageTarget["Login"] = "LOGIN";
|
|
@@ -1360,8 +1371,8 @@
|
|
|
1360
1371
|
SchemaFormat["string"] = "string";
|
|
1361
1372
|
SchemaFormat["boolean"] = "boolean";
|
|
1362
1373
|
SchemaFormat["countryCode"] = "countryCode";
|
|
1363
|
-
SchemaFormat["additionalSeatPreference"] = "
|
|
1364
|
-
SchemaFormat["seatPrefGroups"] = "
|
|
1374
|
+
SchemaFormat["additionalSeatPreference"] = "t_additionalSeatPreference";
|
|
1375
|
+
SchemaFormat["seatPrefGroups"] = "a_seatPrefGroups";
|
|
1365
1376
|
SchemaFormat["railSeating"] = "railSeating";
|
|
1366
1377
|
})(exports.SchemaFormat || (exports.SchemaFormat = {}));
|
|
1367
1378
|
(function (Widgets) {
|
|
@@ -5114,12 +5125,20 @@
|
|
|
5114
5125
|
: this.dropoff_location.gateway;
|
|
5115
5126
|
break;
|
|
5116
5127
|
case exports.LocationTypes.City:
|
|
5117
|
-
query.
|
|
5118
|
-
|
|
5119
|
-
|
|
5120
|
-
|
|
5121
|
-
|
|
5128
|
+
query.depot = {
|
|
5129
|
+
vendorCode: this.cityPickupDepot.vendorCode,
|
|
5130
|
+
pickupLocationCode: this.cityPickupDepot.locationCode,
|
|
5131
|
+
pickupExtendedLocationCode: this.cityPickupDepot.extendedLocationCode,
|
|
5132
|
+
dropOffLocationCode: this.cityDropoffDepot.locationCode,
|
|
5133
|
+
dropOffExtendedLocationCode: this.cityDropoffDepot.extendedLocationCode
|
|
5122
5134
|
};
|
|
5135
|
+
// OLD payload for city, asked to change
|
|
5136
|
+
// query.city = {
|
|
5137
|
+
// pickupCountryCode: this.cityPickup.countryCode,
|
|
5138
|
+
// pickupCity: this.cityPickup.id.toString(),
|
|
5139
|
+
// dropoffCountryCode: this.cityDropoff.countryCode,
|
|
5140
|
+
// dropoffCity: this.cityDropoff.id.toString()
|
|
5141
|
+
// };
|
|
5123
5142
|
break;
|
|
5124
5143
|
case exports.LocationTypes.Postcode:
|
|
5125
5144
|
query.depot = {
|
|
@@ -5135,7 +5154,9 @@
|
|
|
5135
5154
|
query.pickupDateTime = this.helpers.formatGraphQLDateTime(this.pickup_datetime);
|
|
5136
5155
|
query.aircon = this.airCon;
|
|
5137
5156
|
// now for the optional fields - nullify these if they are '-' (Any)
|
|
5138
|
-
|
|
5157
|
+
if (this.locationType === exports.LocationTypes.Airport) {
|
|
5158
|
+
query.vendor = this.chosenVendor === '-' ? null : this.chosenVendor;
|
|
5159
|
+
}
|
|
5139
5160
|
query.transmission = this.transmission || null;
|
|
5140
5161
|
query.class = this.carClass || null;
|
|
5141
5162
|
query.type = this.carType || null;
|
|
@@ -5381,9 +5402,25 @@
|
|
|
5381
5402
|
};
|
|
5382
5403
|
CarhireEnterpriseSearch.prototype.updateFromPreviousSearches = function (previousItems) {
|
|
5383
5404
|
var _a;
|
|
5405
|
+
console.log("PREPOPULATING CARHIRE FORM");
|
|
5384
5406
|
var flightItem = (_a = previousItems[ServiceType.Flight]) === null || _a === void 0 ? void 0 : _a.searchQuery;
|
|
5385
5407
|
if (flightItem) {
|
|
5386
|
-
|
|
5408
|
+
try {
|
|
5409
|
+
var startDate = this.searchService.searches[ServiceType.Flight].outBoundDate.toDate();
|
|
5410
|
+
var endDate = this.searchService.searches[ServiceType.Flight].inboundDate.toDate();
|
|
5411
|
+
this.locationType = exports.LocationTypes.Airport;
|
|
5412
|
+
this.pickup_datetime = this.searchService.searches[ServiceType.Flight].outBoundDate;
|
|
5413
|
+
this.dropoff_datetime = this.searchService.searches[ServiceType.Flight].inboundDate;
|
|
5414
|
+
this.pickup_date = { day: startDate.getUTCDate(), month: startDate.getUTCMonth() + 1, year: startDate.getUTCFullYear() };
|
|
5415
|
+
this.dropoff_date = { day: endDate.getUTCDate(), month: endDate.getUTCMonth() + 1, year: endDate.getUTCFullYear() };
|
|
5416
|
+
this.pickup_location = this.searchService.searches[ServiceType.Flight].arriveLocation;
|
|
5417
|
+
this.dropoff_location = this.searchService.searches[ServiceType.Flight].arriveLocation;
|
|
5418
|
+
this.pickup_country = this.searchService.searches[ServiceType.Flight].arriveLocation.countryCode;
|
|
5419
|
+
this.dropoff_country = this.searchService.searches[ServiceType.Flight].arriveLocation.countryCode;
|
|
5420
|
+
}
|
|
5421
|
+
catch (_b) {
|
|
5422
|
+
console.error("Error trying to prepopulate carhire from flight item");
|
|
5423
|
+
}
|
|
5387
5424
|
}
|
|
5388
5425
|
};
|
|
5389
5426
|
// !date and time is handled differently for LU
|
|
@@ -5699,6 +5736,7 @@
|
|
|
5699
5736
|
UserFavorurite.HideFlightCabinClasses = new UserFavorurite('hideFlightCabinClasses');
|
|
5700
5737
|
UserFavorurite.AlternativeRailItineraryEnabled = new UserFavorurite('alternativeRailItineraryEnabled');
|
|
5701
5738
|
UserFavorurite.riskMinimumLevel = new UserFavorurite('riskMinimumLevel');
|
|
5739
|
+
UserFavorurite.ENABLE_CHATBOT = new UserFavorurite('enableChatbot');
|
|
5702
5740
|
var Suppliers = /** @class */ (function () {
|
|
5703
5741
|
function Suppliers(value) {
|
|
5704
5742
|
this.value = value;
|
|
@@ -7232,7 +7270,12 @@
|
|
|
7232
7270
|
if (basket &&
|
|
7233
7271
|
this.originalUserSearch.chosenSearchType === exports.FlightSearchType.oneWay &&
|
|
7234
7272
|
direction === exports.FlightDirectionEnum.Outbound) {
|
|
7273
|
+
// TODO becouse pop-up is not ready I commented the code.
|
|
7274
|
+
// this.modalService.open( ModalTypes.FlightExtrasDialogComponent, { centered: true }, { flight: selectedFlight }).then(result => {
|
|
7275
|
+
// if (result) {
|
|
7235
7276
|
this.bookSingleFlight(intBasket, selectedFlight);
|
|
7277
|
+
// }
|
|
7278
|
+
// });
|
|
7236
7279
|
return [2 /*return*/];
|
|
7237
7280
|
}
|
|
7238
7281
|
if (basket &&
|
|
@@ -7610,6 +7653,7 @@
|
|
|
7610
7653
|
URLS["CONFIRMA_INFO_URL"] = "/confermainfo/Info.aspx?mode=hotel&key=MICROSSABS&id=";
|
|
7611
7654
|
URLS["RECOVER_PASSWORD_URL"] = "password/getResetToken";
|
|
7612
7655
|
URLS["RESET_PASSWORD"] = "password/resetByToken";
|
|
7656
|
+
URLS["ADMIN_USER_PANEL"] = "https://admin-staging.ctmlightning.co.uk/user";
|
|
7613
7657
|
})(exports.URLS || (exports.URLS = {}));
|
|
7614
7658
|
|
|
7615
7659
|
var HotelFilters = /** @class */ (function () {
|
|
@@ -8647,10 +8691,35 @@
|
|
|
8647
8691
|
this.localFilters.breakfastType = [];
|
|
8648
8692
|
};
|
|
8649
8693
|
HotelEnterpriseSearch.prototype.updateFromPreviousSearches = function (previousItems) {
|
|
8650
|
-
var _a;
|
|
8694
|
+
var _a, _b;
|
|
8695
|
+
console.log("PREPOPULATING HOTEL FORM");
|
|
8651
8696
|
var flightItem = (_a = previousItems[ServiceType.Flight]) === null || _a === void 0 ? void 0 : _a.searchQuery;
|
|
8697
|
+
var railItem = (_b = previousItems[ServiceType.Rail]) === null || _b === void 0 ? void 0 : _b.searchQuery;
|
|
8652
8698
|
if (flightItem) {
|
|
8653
|
-
|
|
8699
|
+
try {
|
|
8700
|
+
this.location_type_select = exports.LocationTypes.Airport;
|
|
8701
|
+
this.checkin_date = this.searchService.searches[ServiceType.Flight].outBoundDate;
|
|
8702
|
+
this.checkout_date = this.searchService.searches[ServiceType.Flight].inboundDate;
|
|
8703
|
+
this.location = {
|
|
8704
|
+
name: this.searchService.searches[ServiceType.Flight].arriveLocation.destination,
|
|
8705
|
+
type: 'Airport',
|
|
8706
|
+
airport: this.searchService.searches[ServiceType.Flight].arriveLocation
|
|
8707
|
+
};
|
|
8708
|
+
}
|
|
8709
|
+
catch (_c) {
|
|
8710
|
+
console.error("Error trying to prepopulate hotel from flight item");
|
|
8711
|
+
}
|
|
8712
|
+
}
|
|
8713
|
+
else if (railItem) {
|
|
8714
|
+
try {
|
|
8715
|
+
this.location_type_select = exports.LocationTypes.TrainStation;
|
|
8716
|
+
this.checkin_date = this.searchService.searches[ServiceType.Rail].outBoundDateTime;
|
|
8717
|
+
this.checkout_date = this.searchService.searches[ServiceType.Rail].inBoundDateTime;
|
|
8718
|
+
this.trainsStation = this.searchService.searches[ServiceType.Rail].travellingTo;
|
|
8719
|
+
}
|
|
8720
|
+
catch (_d) {
|
|
8721
|
+
console.error("Error trying to prepopulate hotel from rail item");
|
|
8722
|
+
}
|
|
8654
8723
|
}
|
|
8655
8724
|
};
|
|
8656
8725
|
HotelEnterpriseSearch.prototype.hasPreferred = function (hotel) {
|
|
@@ -8923,10 +8992,13 @@
|
|
|
8923
8992
|
}
|
|
8924
8993
|
];
|
|
8925
8994
|
};
|
|
8926
|
-
HotelEnterpriseSearch.prototype.saveSearch = function () {
|
|
8995
|
+
HotelEnterpriseSearch.prototype.saveSearch = function (hotelName) {
|
|
8996
|
+
if (hotelName === void 0) { hotelName = null; }
|
|
8927
8997
|
if (this.isValid.value) {
|
|
8928
8998
|
var query = this.getSearchQuery();
|
|
8929
8999
|
var favouriteSearchQuery = this.updateSerchQuery(query);
|
|
9000
|
+
if (hotelName)
|
|
9001
|
+
favouriteSearchQuery.hotelName = hotelName;
|
|
8930
9002
|
var searchInfo = {
|
|
8931
9003
|
name: "" + moment__default['default'](),
|
|
8932
9004
|
serviceType: ServiceType.Hotel,
|
|
@@ -9258,9 +9330,17 @@
|
|
|
9258
9330
|
};
|
|
9259
9331
|
LoungesEnterpriseSearch.prototype.updateFromPreviousSearches = function (previousItems) {
|
|
9260
9332
|
var _a;
|
|
9333
|
+
console.log("PREPOPULATING LOUNGE FORM");
|
|
9261
9334
|
var flightItem = (_a = previousItems[ServiceType.Flight]) === null || _a === void 0 ? void 0 : _a.searchQuery;
|
|
9262
9335
|
if (flightItem) {
|
|
9263
|
-
|
|
9336
|
+
try {
|
|
9337
|
+
var date = this.searchService.searches[ServiceType.Flight].outBoundDate.toDate();
|
|
9338
|
+
this.date = { day: date.getUTCDate(), month: date.getUTCMonth() + 1, year: date.getUTCFullYear() };
|
|
9339
|
+
this.locationCode = this.searchService.searches[ServiceType.Flight].arriveLocation;
|
|
9340
|
+
}
|
|
9341
|
+
catch (_b) {
|
|
9342
|
+
console.error("Error trying to prepopulate parking from lounge item");
|
|
9343
|
+
}
|
|
9264
9344
|
}
|
|
9265
9345
|
};
|
|
9266
9346
|
LoungesEnterpriseSearch.prototype.addLoungeToBasket = function (loungeQuote, loungeQuery) {
|
|
@@ -9821,9 +9901,19 @@
|
|
|
9821
9901
|
};
|
|
9822
9902
|
ParkingEnterpriseSearch.prototype.updateFromPreviousSearches = function (previousItems) {
|
|
9823
9903
|
var _a;
|
|
9904
|
+
console.log("PREPOPULATING PARKING FORM");
|
|
9824
9905
|
var flightItem = (_a = previousItems[ServiceType.Flight]) === null || _a === void 0 ? void 0 : _a.searchQuery;
|
|
9825
9906
|
if (flightItem) {
|
|
9826
|
-
|
|
9907
|
+
try {
|
|
9908
|
+
var startDate = this.searchService.searches[ServiceType.Flight].outBoundDate.toDate();
|
|
9909
|
+
var endDate = this.searchService.searches[ServiceType.Flight].inboundDate.toDate();
|
|
9910
|
+
this.outdate = { day: startDate.getUTCDate(), month: startDate.getUTCMonth() + 1, year: startDate.getUTCFullYear() };
|
|
9911
|
+
this.indate = { day: endDate.getUTCDate(), month: endDate.getUTCMonth() + 1, year: endDate.getUTCFullYear() };
|
|
9912
|
+
this.locationCode = this.searchService.searches[ServiceType.Flight].arriveLocation;
|
|
9913
|
+
}
|
|
9914
|
+
catch (_b) {
|
|
9915
|
+
console.error("Error trying to prepopulate parking from flight item");
|
|
9916
|
+
}
|
|
9827
9917
|
}
|
|
9828
9918
|
};
|
|
9829
9919
|
ParkingEnterpriseSearch.prototype.addParkingToBasket = function (parkingQuote, parkingQuery) {
|
|
@@ -10081,7 +10171,7 @@
|
|
|
10081
10171
|
item: null,
|
|
10082
10172
|
direction: null
|
|
10083
10173
|
};
|
|
10084
|
-
_this.
|
|
10174
|
+
_this._selectedEurostarFare = {
|
|
10085
10175
|
item: null,
|
|
10086
10176
|
direction: null
|
|
10087
10177
|
};
|
|
@@ -10146,10 +10236,17 @@
|
|
|
10146
10236
|
enumerable: false,
|
|
10147
10237
|
configurable: true
|
|
10148
10238
|
});
|
|
10239
|
+
Object.defineProperty(EurostarEnterpriseSearch.prototype, "selectedEurostarFare", {
|
|
10240
|
+
get: function () {
|
|
10241
|
+
return this._selectedEurostarFare.item;
|
|
10242
|
+
},
|
|
10243
|
+
enumerable: false,
|
|
10244
|
+
configurable: true
|
|
10245
|
+
});
|
|
10149
10246
|
Object.defineProperty(EurostarEnterpriseSearch.prototype, "selectedFareClass", {
|
|
10150
10247
|
get: function () {
|
|
10151
10248
|
var _a, _b;
|
|
10152
|
-
return (_b = (_a = this.
|
|
10249
|
+
return (_b = (_a = this._selectedEurostarFare) === null || _a === void 0 ? void 0 : _a.item) === null || _b === void 0 ? void 0 : _b.class;
|
|
10153
10250
|
},
|
|
10154
10251
|
enumerable: false,
|
|
10155
10252
|
configurable: true
|
|
@@ -11214,12 +11311,12 @@
|
|
|
11214
11311
|
if (direction === exports.FlightDirectionEnum.Outbound) {
|
|
11215
11312
|
// given the outbound but we already have inbound selected
|
|
11216
11313
|
if (((_a = this.selectedGroupEurostar) === null || _a === void 0 ? void 0 : _a.direction) === exports.FlightDirectionEnum.Inbound) {
|
|
11217
|
-
price = this.
|
|
11218
|
-
? this.
|
|
11314
|
+
price = this._selectedEurostarFare.item.price > fare.price
|
|
11315
|
+
? this._selectedEurostarFare.item.price
|
|
11219
11316
|
: fare.price;
|
|
11220
11317
|
this.doBooking(intBasket, selectedEurostar, {
|
|
11221
11318
|
inboundFlights: [
|
|
11222
|
-
this.makeSchemaFlights(this.
|
|
11319
|
+
this.makeSchemaFlights(this._selectedEurostarFare.item.fare, 'inbound', 0)
|
|
11223
11320
|
],
|
|
11224
11321
|
outboundFlights: [
|
|
11225
11322
|
this.makeSchemaFlights(fare.fare, 'outbound', 0)
|
|
@@ -11241,7 +11338,7 @@
|
|
|
11241
11338
|
item: selectedEurostar,
|
|
11242
11339
|
direction: direction
|
|
11243
11340
|
};
|
|
11244
|
-
this.
|
|
11341
|
+
this._selectedEurostarFare = {
|
|
11245
11342
|
item: fare,
|
|
11246
11343
|
direction: direction
|
|
11247
11344
|
};
|
|
@@ -11255,12 +11352,12 @@
|
|
|
11255
11352
|
}
|
|
11256
11353
|
else if (direction === exports.FlightDirectionEnum.Inbound) {
|
|
11257
11354
|
if (((_c = this.selectedGroupEurostar) === null || _c === void 0 ? void 0 : _c.direction) === exports.FlightDirectionEnum.Outbound) {
|
|
11258
|
-
price = this.
|
|
11259
|
-
? this.
|
|
11355
|
+
price = this._selectedEurostarFare.item.price > fare.price
|
|
11356
|
+
? this._selectedEurostarFare.item.price
|
|
11260
11357
|
: fare.price;
|
|
11261
11358
|
this.doBooking(intBasket, selectedEurostar, {
|
|
11262
11359
|
outboundFlights: [
|
|
11263
|
-
this.makeSchemaFlights(this.
|
|
11360
|
+
this.makeSchemaFlights(this._selectedEurostarFare.item.fare, 'outbound', 0)
|
|
11264
11361
|
],
|
|
11265
11362
|
inboundFlights: [this.makeSchemaFlights(fare.fare, 'inbound', 0)],
|
|
11266
11363
|
journeyType: 'roundtrip'
|
|
@@ -11278,7 +11375,7 @@
|
|
|
11278
11375
|
item: selectedEurostar,
|
|
11279
11376
|
direction: direction
|
|
11280
11377
|
};
|
|
11281
|
-
this.
|
|
11378
|
+
this._selectedEurostarFare = {
|
|
11282
11379
|
item: fare,
|
|
11283
11380
|
direction: direction
|
|
11284
11381
|
};
|
|
@@ -11301,7 +11398,7 @@
|
|
|
11301
11398
|
direction: null,
|
|
11302
11399
|
item: null
|
|
11303
11400
|
};
|
|
11304
|
-
this.
|
|
11401
|
+
this._selectedEurostarFare = {
|
|
11305
11402
|
direction: null,
|
|
11306
11403
|
item: null
|
|
11307
11404
|
};
|
|
@@ -11774,6 +11871,18 @@
|
|
|
11774
11871
|
firstClassFare: { price: 0, journey: null, fare: null },
|
|
11775
11872
|
inboundStandardClassFare: { price: 0, journey: null, fare: null },
|
|
11776
11873
|
inboundFirstClassFare: { price: 0, journey: null, fare: null }
|
|
11874
|
+
},
|
|
11875
|
+
cheapestClassTicketReturn: {
|
|
11876
|
+
standardClassFare: { price: 0, journey: null, fare: null },
|
|
11877
|
+
firstClassFare: { price: 0, journey: null, fare: null },
|
|
11878
|
+
inboundStandardClassFare: { price: 0, journey: null, fare: null },
|
|
11879
|
+
inboundFirstClassFare: { price: 0, journey: null, fare: null }
|
|
11880
|
+
},
|
|
11881
|
+
cheapestClassTicketDual: {
|
|
11882
|
+
standardClassFare: { price: 0, journey: null, fare: null },
|
|
11883
|
+
firstClassFare: { price: 0, journey: null, fare: null },
|
|
11884
|
+
inboundStandardClassFare: { price: 0, journey: null, fare: null },
|
|
11885
|
+
inboundFirstClassFare: { price: 0, journey: null, fare: null }
|
|
11777
11886
|
}
|
|
11778
11887
|
});
|
|
11779
11888
|
_this.minOutboundDate = {
|
|
@@ -12351,7 +12460,9 @@
|
|
|
12351
12460
|
_this.cheapest.next({
|
|
12352
12461
|
outboundCheapest: outPrices.cheapestTickets,
|
|
12353
12462
|
inboundCheapest: inPrices.cheapestTickets,
|
|
12354
|
-
cheapestClassTicket: inPrices.cheapestClassTicket
|
|
12463
|
+
cheapestClassTicket: inPrices.cheapestClassTicket,
|
|
12464
|
+
cheapestClassTicketReturn: outPrices.outboundClassTicket,
|
|
12465
|
+
cheapestClassTicketDual: inPrices.outboundClassTicket,
|
|
12355
12466
|
});
|
|
12356
12467
|
return Object.assign(Object.assign({}, railResult), { outbound: outbound, return: inbound });
|
|
12357
12468
|
});
|
|
@@ -12424,21 +12535,24 @@
|
|
|
12424
12535
|
prices1.cheapestTickets.openReturnJourneyFares = min(prices1.cheapestTickets.openReturnJourneyFares, ___default['default'].flatten(Object.values(journey.openReturnJourneyFares)).filter(function (journey1) { return !!journey1; }), journey);
|
|
12425
12536
|
prices1.cheapestTickets.returnJourneyFares = min(prices1.cheapestTickets.returnJourneyFares, ___default['default'].flatten(Object.values(journey.returnJourneyFares)).filter(function (journey1) { return !!journey1; }), journey);
|
|
12426
12537
|
if (isReturn) {
|
|
12538
|
+
prices1.cheapestClassTicket.inboundStandardClassFare = min(prices1.cheapestClassTicket.inboundStandardClassFare, allStandard, journey);
|
|
12539
|
+
prices1.cheapestClassTicket.inboundFirstClassFare = min(prices1.cheapestClassTicket.inboundFirstClassFare, allFirst, journey);
|
|
12540
|
+
prices1.outboundClassTicket.inboundStandardClassFare = min(prices1.outboundClassTicket.inboundStandardClassFare, noDualStandard, journey);
|
|
12541
|
+
prices1.outboundClassTicket.inboundFirstClassFare = min(prices1.outboundClassTicket.inboundFirstClassFare, noDualFirst, journey);
|
|
12427
12542
|
var isStandardClassSingle = ((_b = (_a = prices1.cheapestClassTicket.standardClassFare) === null || _a === void 0 ? void 0 : _a.fare) === null || _b === void 0 ? void 0 : _b.singleOrReturn) === exports.RailJourneyFareType.Single;
|
|
12428
12543
|
if (isStandardClassSingle) {
|
|
12429
12544
|
var inboundPrice = min(prices1.cheapestClassTicket.inboundStandardClassFare, dualSingleStandardJourneys, journey);
|
|
12430
|
-
var
|
|
12431
|
-
|
|
12432
|
-
if (totalPrice > prices1.outboundClassTicket.standardClassFare.price) {
|
|
12545
|
+
var outboundTotalPrice = prices1.cheapestClassTicket.standardClassFare.price;
|
|
12546
|
+
if (outboundTotalPrice > prices1.outboundClassTicket.standardClassFare.price) {
|
|
12433
12547
|
prices1.cheapestClassTicket.standardClassFare =
|
|
12434
12548
|
prices1.outboundClassTicket.standardClassFare;
|
|
12435
|
-
prices1.cheapestClassTicket.inboundStandardClassFare = {
|
|
12436
|
-
|
|
12437
|
-
|
|
12438
|
-
|
|
12439
|
-
};
|
|
12549
|
+
// prices1.cheapestClassTicket.inboundStandardClassFare = {
|
|
12550
|
+
// price: 0,
|
|
12551
|
+
// journey: null,
|
|
12552
|
+
// fare: null
|
|
12553
|
+
// };
|
|
12440
12554
|
}
|
|
12441
|
-
else {
|
|
12555
|
+
else if (inboundPrice.price > prices1.cheapestClassTicket.inboundStandardClassFare.price) {
|
|
12442
12556
|
prices1.cheapestClassTicket.inboundStandardClassFare =
|
|
12443
12557
|
inboundPrice;
|
|
12444
12558
|
}
|
|
@@ -12447,18 +12561,17 @@
|
|
|
12447
12561
|
exports.RailJourneyFareType.Single;
|
|
12448
12562
|
if (isFirstClassSingle) {
|
|
12449
12563
|
var inboundPrice = min(prices1.cheapestClassTicket.inboundFirstClassFare, dualSingleFirstJourneys, journey);
|
|
12450
|
-
var totalPrice = prices1.cheapestClassTicket.firstClassFare.price
|
|
12451
|
-
inboundPrice.price;
|
|
12564
|
+
var totalPrice = prices1.cheapestClassTicket.firstClassFare.price;
|
|
12452
12565
|
if (totalPrice > prices1.outboundClassTicket.firstClassFare.price) {
|
|
12453
12566
|
prices1.cheapestClassTicket.firstClassFare =
|
|
12454
12567
|
prices1.outboundClassTicket.firstClassFare;
|
|
12455
|
-
prices1.cheapestClassTicket.inboundFirstClassFare = {
|
|
12456
|
-
|
|
12457
|
-
|
|
12458
|
-
|
|
12459
|
-
};
|
|
12568
|
+
// prices1.cheapestClassTicket.inboundFirstClassFare = {
|
|
12569
|
+
// price: 0,
|
|
12570
|
+
// journey: null,
|
|
12571
|
+
// fare: null
|
|
12572
|
+
// };
|
|
12460
12573
|
}
|
|
12461
|
-
else {
|
|
12574
|
+
else if (inboundPrice.price > prices1.cheapestClassTicket.inboundFirstClassFare.price) {
|
|
12462
12575
|
prices1.cheapestClassTicket.inboundFirstClassFare = inboundPrice;
|
|
12463
12576
|
}
|
|
12464
12577
|
}
|
|
@@ -14648,11 +14761,11 @@
|
|
|
14648
14761
|
number: '',
|
|
14649
14762
|
extension: ''
|
|
14650
14763
|
};
|
|
14651
|
-
this.
|
|
14764
|
+
this.bookingPhoneNumber = new rxjs.BehaviorSubject([]);
|
|
14652
14765
|
}
|
|
14653
14766
|
PhoneNumberImpl.prototype.updateDetails = function (values) {
|
|
14654
14767
|
var _this = this;
|
|
14655
|
-
this.
|
|
14768
|
+
this.bookingPhoneNumber.next(values.map(function (value) {
|
|
14656
14769
|
return _this.helpers.sanatizeReturns(_this.details, value);
|
|
14657
14770
|
}));
|
|
14658
14771
|
};
|
|
@@ -15536,6 +15649,18 @@
|
|
|
15536
15649
|
return BaseGetConfermaRoomImagesFetcher;
|
|
15537
15650
|
}(FetchableList));
|
|
15538
15651
|
|
|
15652
|
+
var BaseEmailBasketFetcher = /** @class */ (function (_super) {
|
|
15653
|
+
__extends(BaseEmailBasketFetcher, _super);
|
|
15654
|
+
function BaseEmailBasketFetcher(gql, helpers, modalService) {
|
|
15655
|
+
return _super.call(this, gql, helpers, modalService) || this;
|
|
15656
|
+
}
|
|
15657
|
+
BaseEmailBasketFetcher.prototype.getDataFromResult = function (results) {
|
|
15658
|
+
var _a;
|
|
15659
|
+
return (_a = results === null || results === void 0 ? void 0 : results.data) === null || _a === void 0 ? void 0 : _a.emailBasket;
|
|
15660
|
+
};
|
|
15661
|
+
return BaseEmailBasketFetcher;
|
|
15662
|
+
}(FetchableList));
|
|
15663
|
+
|
|
15539
15664
|
// | 'fareTypes';
|
|
15540
15665
|
|
|
15541
15666
|
;
|
|
@@ -16446,6 +16571,7 @@
|
|
|
16446
16571
|
this.behaviours[hotel.hotel] = new rxjs.BehaviorSubject(null);
|
|
16447
16572
|
var newBehaviourObject = fullHotel.availableRates;
|
|
16448
16573
|
newBehaviourObject.minprice = fullHotel.availableRates.rooms[0] ? fullHotel.availableRates.rooms[0].total : 0;
|
|
16574
|
+
newBehaviourObject.maxprice = newBehaviourObject.minprice ? fullHotel.availableRates.rooms[fullHotel.availableRates.rooms.length - 1].total : 0;
|
|
16449
16575
|
this.behaviours[hotel.hotel].next(newBehaviourObject);
|
|
16450
16576
|
return (this.behaviours[hotel.hotel]);
|
|
16451
16577
|
}
|
|
@@ -16637,7 +16763,8 @@
|
|
|
16637
16763
|
var USER_SIGNEDOUT = 'USER_SIGNEDOUT';
|
|
16638
16764
|
var USER_SIGNEDIN = 'USER_SIGNEDIN';
|
|
16639
16765
|
var BaseUserService = /** @class */ (function () {
|
|
16640
|
-
function BaseUserService(userUiConfigsFetcher, userProductsFetcher, userMessagesFetcher, baseConfirmMessagesUpdater, storageService, helpers) {
|
|
16766
|
+
function BaseUserService(getUserFetcher, userUiConfigsFetcher, userProductsFetcher, userMessagesFetcher, baseConfirmMessagesUpdater, storageService, helpers) {
|
|
16767
|
+
this.getUserFetcher = getUserFetcher;
|
|
16641
16768
|
this.userUiConfigsFetcher = userUiConfigsFetcher;
|
|
16642
16769
|
this.userProductsFetcher = userProductsFetcher;
|
|
16643
16770
|
this.userMessagesFetcher = userMessagesFetcher;
|
|
@@ -16730,6 +16857,18 @@
|
|
|
16730
16857
|
var user = this.getfullUserDetails();
|
|
16731
16858
|
return user && user.userData ? user.userData.value.title : '';
|
|
16732
16859
|
};
|
|
16860
|
+
BaseUserService.prototype.getUserForename = function () {
|
|
16861
|
+
var user = this.getfullUserDetails();
|
|
16862
|
+
return user && user.userData ? user.userData.value.forename : '';
|
|
16863
|
+
};
|
|
16864
|
+
BaseUserService.prototype.getUserSurname = function () {
|
|
16865
|
+
var user = this.getfullUserDetails();
|
|
16866
|
+
return user && user.userData ? user.userData.value.surname : '';
|
|
16867
|
+
};
|
|
16868
|
+
BaseUserService.prototype.getFullPhoneNumber = function () {
|
|
16869
|
+
var user = this.getfullUserDetails();
|
|
16870
|
+
return '';
|
|
16871
|
+
};
|
|
16733
16872
|
BaseUserService.prototype.getUserEmail = function () {
|
|
16734
16873
|
var user = this.getfullUserDetails();
|
|
16735
16874
|
return user && user.userData ? user.userData.value.username : '';
|
|
@@ -16867,6 +17006,10 @@
|
|
|
16867
17006
|
BaseUserService.prototype.confirmMessages = function (id) {
|
|
16868
17007
|
return this.baseConfirmMessagesUpdater.updateOne({ messages: id });
|
|
16869
17008
|
};
|
|
17009
|
+
BaseUserService.prototype.getUser = function () {
|
|
17010
|
+
var user = this.getfullUserDetails();
|
|
17011
|
+
return this.getUserFetcher.fetchOne({ id: user.userData.value.user_id.toString() });
|
|
17012
|
+
};
|
|
16870
17013
|
return BaseUserService;
|
|
16871
17014
|
}());
|
|
16872
17015
|
|
|
@@ -18421,6 +18564,10 @@
|
|
|
18421
18564
|
];
|
|
18422
18565
|
|
|
18423
18566
|
var EuroStations = [
|
|
18567
|
+
{
|
|
18568
|
+
gateway: "ZYA",
|
|
18569
|
+
destination: "Amsterdam (ZYA)"
|
|
18570
|
+
},
|
|
18424
18571
|
{
|
|
18425
18572
|
gateway: "QDH",
|
|
18426
18573
|
destination: "Ashford International (Kent) (QDH)"
|
|
@@ -18448,6 +18595,10 @@
|
|
|
18448
18595
|
{
|
|
18449
18596
|
gateway: "XPG",
|
|
18450
18597
|
destination: "Paris Gare du Nord (XPG)"
|
|
18598
|
+
},
|
|
18599
|
+
{
|
|
18600
|
+
gateway: "QRH",
|
|
18601
|
+
destination: "Rotterdam (QRH)"
|
|
18451
18602
|
}
|
|
18452
18603
|
];
|
|
18453
18604
|
|
|
@@ -18458,7 +18609,7 @@
|
|
|
18458
18609
|
TravellerSearchTypes["employeeNumber"] = "employeeNumber";
|
|
18459
18610
|
})(exports.TravellerSearchTypes || (exports.TravellerSearchTypes = {}));
|
|
18460
18611
|
var BaseEnterpriseSearchService = /** @class */ (function () {
|
|
18461
|
-
function BaseEnterpriseSearchService(searchAirportsFetcher, searchAirlinesFetcher, storageService, userService, modalService, router, helpers, hotelAvalibilityService, citiesFetcher, confermaCitiesFetcher, postcodeFetcher, railStationFetcher, saveUserAddressUpdater, userAddressesFetcher, basketService, getUserCompanyOfficesFetcher, searchHotelChainsFetcher, getConfermaRoomImagesFetcher, baseValidateIsPostcodeValidTester, depotFetcher, confermaOfficeNamesFetcher, confermaOfficeFetcher, baseDeleteUserAddressUpdater, baseDeleteRecentSearchUpdater, baseSaveRecentSearchUpdater, getUserCurrentCarbonAllowanceFetcher, baseSaveFavouriteSearchUpdater, environment, loungeFetcher, parkingFetcher, httpCallService, flightFetcher, hotelFetcher, carhireFetcher, carHireAvailabilityDetailFetcher, cabhireFetcher, railFetcher, irlFetcher, getRailStationFetcher, baseWebTokenService, riskAlertsFetcher, quicklistFetcher, getUserRecentSearchesFetcher, getRailCardsFetcher, getCovidMicrositeTokenFetcher, eurostarFetcher, searchUsersCanBookForFetcher, searchIrlStationsFetcher, irlDiscountCardsFetcher, getFlightFareRulesFetcher, getFlightSeatMapFetcher, getRailLiveDeparturesFetcher, applyHotelRulesFetcher, applyFlightRules, getUserFavouriteSearchesFetcher, deleteFavouriteSearchUpdater) {
|
|
18612
|
+
function BaseEnterpriseSearchService(searchAirportsFetcher, searchAirlinesFetcher, storageService, userService, modalService, router, helpers, hotelAvalibilityService, citiesFetcher, confermaCitiesFetcher, postcodeFetcher, railStationFetcher, saveUserAddressUpdater, userAddressesFetcher, basketService, getUserCompanyOfficesFetcher, searchHotelChainsFetcher, getConfermaRoomImagesFetcher, baseValidateIsPostcodeValidTester, depotFetcher, confermaOfficeNamesFetcher, confermaOfficeFetcher, baseDeleteUserAddressUpdater, baseDeleteRecentSearchUpdater, baseSaveRecentSearchUpdater, getUserCurrentCarbonAllowanceFetcher, baseSaveFavouriteSearchUpdater, environment, loungeFetcher, parkingFetcher, httpCallService, flightFetcher, hotelFetcher, carhireFetcher, carHireAvailabilityDetailFetcher, cabhireFetcher, railFetcher, irlFetcher, getRailStationFetcher, baseWebTokenService, riskAlertsFetcher, quicklistFetcher, getUserRecentSearchesFetcher, getRailCardsFetcher, getCovidMicrositeTokenFetcher, eurostarFetcher, searchUsersCanBookForFetcher, searchIrlStationsFetcher, irlDiscountCardsFetcher, getFlightFareRulesFetcher, getFlightSeatMapFetcher, getRailLiveDeparturesFetcher, applyHotelRulesFetcher, applyFlightRules, getUserFavouriteSearchesFetcher, deleteFavouriteSearchUpdater, emailBasketFetcher) {
|
|
18462
18613
|
var _d;
|
|
18463
18614
|
var _this = this;
|
|
18464
18615
|
this.searchAirportsFetcher = searchAirportsFetcher;
|
|
@@ -18501,6 +18652,7 @@
|
|
|
18501
18652
|
this.getRailLiveDeparturesFetcher = getRailLiveDeparturesFetcher;
|
|
18502
18653
|
this.getUserFavouriteSearchesFetcher = getUserFavouriteSearchesFetcher;
|
|
18503
18654
|
this.deleteFavouriteSearchUpdater = deleteFavouriteSearchUpdater;
|
|
18655
|
+
this.emailBasketFetcher = emailBasketFetcher;
|
|
18504
18656
|
this.traveller_error = false;
|
|
18505
18657
|
this.travellerInformation = new rxjs.BehaviorSubject([]);
|
|
18506
18658
|
this.errors = new rxjs.BehaviorSubject([]);
|
|
@@ -19353,12 +19505,13 @@
|
|
|
19353
19505
|
BaseEnterpriseSearchService.prototype.getRailCards = function () {
|
|
19354
19506
|
return this.getRailCardsFetcher.fetchList().pipe(operators.take(1), operators.map(function (results) {
|
|
19355
19507
|
if (results) {
|
|
19356
|
-
|
|
19508
|
+
var railCards = results.map(function (result) {
|
|
19357
19509
|
return {
|
|
19358
19510
|
name: result.name,
|
|
19359
19511
|
code: result.code
|
|
19360
19512
|
};
|
|
19361
19513
|
});
|
|
19514
|
+
return railCards.sort(function (a, b) { return a.name.localeCompare(b.name); });
|
|
19362
19515
|
}
|
|
19363
19516
|
}));
|
|
19364
19517
|
};
|
|
@@ -19881,6 +20034,9 @@
|
|
|
19881
20034
|
return obs.pipe(operators.take(1));
|
|
19882
20035
|
}
|
|
19883
20036
|
};
|
|
20037
|
+
BaseEnterpriseSearchService.prototype.emailBasket = function (id) {
|
|
20038
|
+
return this.emailBasketFetcher.fetchList({ id: id });
|
|
20039
|
+
};
|
|
19884
20040
|
return BaseEnterpriseSearchService;
|
|
19885
20041
|
}());
|
|
19886
20042
|
BaseEnterpriseSearchService.SESSION_TRAVELLER = 'search_travellers';
|
|
@@ -20500,6 +20656,7 @@
|
|
|
20500
20656
|
exports.BaseDeleteFavouriteSearchUpdater = BaseDeleteFavouriteSearchUpdater;
|
|
20501
20657
|
exports.BaseDeleteRecentSearchUpdater = BaseDeleteRecentSearchUpdater;
|
|
20502
20658
|
exports.BaseDeleteUserAddressUpdater = BaseDeleteUserAddressUpdater;
|
|
20659
|
+
exports.BaseEmailBasketFetcher = BaseEmailBasketFetcher;
|
|
20503
20660
|
exports.BaseEnterpriseBasketService = BaseEnterpriseBasketService;
|
|
20504
20661
|
exports.BaseEnterpriseMyBookingsService = BaseEnterpriseMyBookingsService;
|
|
20505
20662
|
exports.BaseEnterpriseSearch = BaseEnterpriseSearch;
|