@sabstravtech/obtservices 0.2.2510281616 → 0.2.2511110930

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.
@@ -151,7 +151,7 @@ export declare class HotelEnterpriseSearch<HQ_Q extends HotelQuoteFetcherType, H
151
151
  gmtSearch(query: SearchHotelsQueryVariables, locationDetails: LocationDetail): Observable<HotelDetails[]>;
152
152
  applyGMTTravelRules(availabilityObservables: HotelDetails[]): Observable<HotelDetails[]>;
153
153
  getRecentSearchQuery(query: SearchHotelsQueryVariables): SaveRecentSearchMutationVariables;
154
- private updateSerchQuery;
154
+ private updateSearchQuery;
155
155
  startRecentSearch(recentSearch: RecentSearch): void;
156
156
  private getRailStationByCode;
157
157
  getSearchQuery(ogSearch?: boolean): SearchHotelsQueryVariables;
@@ -5,7 +5,6 @@ import { BasketItem, HotelRoom, HotelTag, SearchHotelsQueryVariables, ServiceTyp
5
5
  import { BaseEnterpriseSearch } from '../classes/base-enterprise';
6
6
  import { ICheapestPrice } from './cheapest-price';
7
7
  import { Traveller } from '../models/traveller.object';
8
- import { EventEmitter } from '@angular/core';
9
8
  export interface HotelTempParams {
10
9
  location_type_select: LocationTypes;
11
10
  checkin_date: moment.Moment;
@@ -75,7 +74,7 @@ export declare enum HotelDetailTypes {
75
74
  }
76
75
  export interface HotelViewController {
77
76
  showMap: boolean;
78
- ratesUpdated: EventEmitter<boolean>;
77
+ ratesUpdated: Subject<boolean>;
79
78
  filterChange: any;
80
79
  hotelChosen: boolean;
81
80
  filtered: boolean;
@@ -56,7 +56,6 @@ import { BaseValidateBasketMiFetcher, ValidateBasketMiFetcher } from '../fetcher
56
56
  import { BaseValidateBasketItemMiFetcher, ValidateBasketItemMiFetcher } from '../fetchers/validate-basket-item-mi.fetcher';
57
57
  import { BaseSetMIValuesUpdater, SetMIValuesUpdater } from '../updaters/set-mi-values.updater';
58
58
  import { BaseStorageService } from './storage.service';
59
- import { EventEmitter } from '@angular/core';
60
59
  import { BaseBeforeAmendCabSearchQuoteFetcher, BeforeAmendCabSearchQuoteFetcherType } from '../fetchers/before-amend-cab-search-quote-fetcher';
61
60
  import { BaseSendBackToQueueUpdater, SendBackToQueueMutationType } from '../updaters/send-back-to-queue-updater';
62
61
  import { BaseGetBasketCo2InfoFetcher, GetBasketCo2FetcherInfoType } from '../fetchers/basket-co2.fetcher';
@@ -248,7 +247,7 @@ export declare abstract class BaseEnterpriseBasketService<ANPU_Q extends AcceptN
248
247
  basketList: BasketPricesList[];
249
248
  basketPrices: BehaviorSubject<BasketPrices>;
250
249
  menuState: MenuSlideEnum;
251
- checkApproverModalClosed: EventEmitter<any>;
250
+ checkApproverModalClosed: Subject<any>;
252
251
  private requiresService;
253
252
  private requiresOverrideService;
254
253
  private userCurrency;
@@ -54,8 +54,8 @@ export interface LocationDetails {
54
54
  postcode?: string;
55
55
  gateway?: string;
56
56
  searchType?: string;
57
- hotelTitle?: string;
58
57
  trainStationCode?: string;
58
+ hotelTitle?: string;
59
59
  }
60
60
  export interface Country {
61
61
  cCode: string;
@@ -992,22 +992,22 @@ export interface FavouriteGuest extends Guest {
992
992
  }
993
993
  export declare enum MealType {
994
994
  None = "None",
995
- BLML = "Bland",
996
- CHML = "Child",
997
- DBML = "Diabetic",
995
+ VGML = "Vegetarian-Vegan",
996
+ VOML = "Asian Vegetarian",
997
+ RVML = "Raw Vegetarian/Vegan",
998
998
  FPML = "Fruit Plate",
999
- GFML = "Gluten Free",
1000
- HNML = "Hindu",
999
+ SFML = "Seafood",
1001
1000
  KSML = "Kosher",
1001
+ MOML = "Muslim",
1002
+ HNML = "Hindu",
1002
1003
  LFML = "Low Fat/Cholesterol",
1004
+ VLML = "Vegetarian Lacto-Ovo",
1003
1005
  LSML = "Low Sodium",
1004
- MOML = "Muslim",
1006
+ GFML = "Gluten intolerant",
1007
+ DBML = "Diabetic",
1005
1008
  NLML = "Non-Lactose",
1006
- RVML = "Raw Vegetarian/Vegan",
1007
- SFML = "Seafood",
1008
- VGML = "Vegetarian",
1009
- VLML = "Vegetarian Lacto-Ovo",
1010
- VOML = "Asian Vegetarian"
1009
+ CHML = "Child",
1010
+ BLML = "Bland"
1011
1011
  }
1012
1012
  export declare enum SpecialNeeds {
1013
1013
  None = "None",
@@ -6,7 +6,7 @@ import _, { uniq } from 'lodash';
6
6
  import Ajv from 'ajv';
7
7
  import addFormats from 'ajv-formats';
8
8
  import * as i0 from '@angular/core';
9
- import { EventEmitter, Injectable } from '@angular/core';
9
+ import { Injectable } from '@angular/core';
10
10
 
11
11
  var ages;
12
12
  (function (ages) {
@@ -2851,7 +2851,7 @@ const PREFERENCE_VALUES$1 = [
2851
2851
  { label: "Child", type: PreferenceKey.MealRequest, code: "CHML" },
2852
2852
  { label: "Diabetic", type: PreferenceKey.MealRequest, code: "DBML" },
2853
2853
  { label: "Fruit Plate", type: PreferenceKey.MealRequest, code: "FPML" },
2854
- { label: "Gluten Free", type: PreferenceKey.MealRequest, code: "GFML" },
2854
+ { label: "Gluten intolerant", type: PreferenceKey.MealRequest, code: "GFML" },
2855
2855
  { label: "Hindu", type: PreferenceKey.MealRequest, code: "HNML" },
2856
2856
  { label: "Kosher", type: PreferenceKey.MealRequest, code: "KSML" },
2857
2857
  { label: "Low Fat/Cholesterol", type: PreferenceKey.MealRequest, code: "LFML" },
@@ -2860,7 +2860,7 @@ const PREFERENCE_VALUES$1 = [
2860
2860
  { label: "Non-Lactose", type: PreferenceKey.MealRequest, code: "NLML" },
2861
2861
  { label: "Raw Vegetarian/Vegan", type: PreferenceKey.MealRequest, code: "RVML" },
2862
2862
  { label: "Seafood", type: PreferenceKey.MealRequest, code: "SFML" },
2863
- { label: "Vegetarian", type: PreferenceKey.MealRequest, code: "VGML" },
2863
+ { label: "Vegetarian-Vegan", type: PreferenceKey.MealRequest, code: "VGML" },
2864
2864
  { label: "Vegetarian Lacto-Ovo", type: PreferenceKey.MealRequest, code: "VLML" },
2865
2865
  { label: "Asian Vegetarian", type: PreferenceKey.MealRequest, code: "VOML" },
2866
2866
  { label: "Aisle", type: PreferenceKey.SeatingPreference },
@@ -4626,22 +4626,22 @@ var ErmFareTypes;
4626
4626
  var MealType;
4627
4627
  (function (MealType) {
4628
4628
  MealType["None"] = "None";
4629
- MealType["BLML"] = "Bland";
4630
- MealType["CHML"] = "Child";
4631
- MealType["DBML"] = "Diabetic";
4629
+ MealType["VGML"] = "Vegetarian-Vegan";
4630
+ MealType["VOML"] = "Asian Vegetarian";
4631
+ MealType["RVML"] = "Raw Vegetarian/Vegan";
4632
4632
  MealType["FPML"] = "Fruit Plate";
4633
- MealType["GFML"] = "Gluten Free";
4634
- MealType["HNML"] = "Hindu";
4633
+ MealType["SFML"] = "Seafood";
4635
4634
  MealType["KSML"] = "Kosher";
4635
+ MealType["MOML"] = "Muslim";
4636
+ MealType["HNML"] = "Hindu";
4636
4637
  MealType["LFML"] = "Low Fat/Cholesterol";
4638
+ MealType["VLML"] = "Vegetarian Lacto-Ovo";
4637
4639
  MealType["LSML"] = "Low Sodium";
4638
- MealType["MOML"] = "Muslim";
4640
+ MealType["GFML"] = "Gluten intolerant";
4641
+ MealType["DBML"] = "Diabetic";
4639
4642
  MealType["NLML"] = "Non-Lactose";
4640
- MealType["RVML"] = "Raw Vegetarian/Vegan";
4641
- MealType["SFML"] = "Seafood";
4642
- MealType["VGML"] = "Vegetarian";
4643
- MealType["VLML"] = "Vegetarian Lacto-Ovo";
4644
- MealType["VOML"] = "Asian Vegetarian";
4643
+ MealType["CHML"] = "Child";
4644
+ MealType["BLML"] = "Bland";
4645
4645
  })(MealType || (MealType = {}));
4646
4646
  var SpecialNeeds;
4647
4647
  (function (SpecialNeeds) {
@@ -5046,17 +5046,20 @@ class BookableBasket {
5046
5046
  });
5047
5047
  }
5048
5048
  else {
5049
- const approvalInfo = await firstValueFrom(this.basketService.getBasketApprovalInfo(this.basket.value.id));
5050
- if (isSelectedNotifyApprover || isSelectedApprover || !approvalInfo.requiresApproverSelection) {
5049
+ // const approvalInfo: BasketApprovalInfo = await firstValueFrom(this.basketService.getBasketApprovalInfo(this.basket.value.id));
5050
+ // if (isSelectedNotifyApprover || isSelectedApprover || !approvalInfo.requiresApproverSelection) {
5051
+ if (isSelectedNotifyApprover || isSelectedApprover) {
5051
5052
  this.basketService
5052
5053
  .getApproversList()
5053
5054
  .subscribe(async ([officeApprovers, userApprovers]) => {
5054
5055
  const approvers = (officeApprovers || []).concat(userApprovers || []);
5055
- await this.handleApprovers(approvers, isSelectedApprover, isSelectedNotifyApprover, false, false, approvalInfo.rulesRequiringSelection);
5056
+ // await this.handleApprovers(approvers, isSelectedApprover, isSelectedNotifyApprover, false, false, approvalInfo.rulesRequiringSelection);
5057
+ await this.handleApprovers(approvers, isSelectedApprover, isSelectedNotifyApprover, false, false);
5056
5058
  });
5057
5059
  }
5058
5060
  else {
5059
- await this.handleApprovers([], isSelectedApprover, isSelectedNotifyApprover, false, false, approvalInfo.rulesRequiringSelection);
5061
+ // await this.handleApprovers([], isSelectedApprover, isSelectedNotifyApprover, false, false, approvalInfo.rulesRequiringSelection);
5062
+ await this.handleApprovers([], isSelectedApprover, isSelectedNotifyApprover, false, false);
5060
5063
  }
5061
5064
  }
5062
5065
  }
@@ -6491,6 +6494,13 @@ class BaseHelperRoutines {
6491
6494
  const outStops = result1.outboundFlights.length - 1;
6492
6495
  const isDirect = outStops === 0 || (isMultiCity && outStops === multiDestination - 1);
6493
6496
  const multiStops = isMultiCity && outStops > multiDestination - 1 ? outStops - (multiDestination - 1) : 0;
6497
+ if (result1.source.toUpperCase().includes('NDC')) {
6498
+ filters.ndcFares['NDC'] = {
6499
+ display: "NDC",
6500
+ selected: false,
6501
+ value: "NDC"
6502
+ };
6503
+ }
6494
6504
  filters.stops[outStops] = filters.stops[outStops] || {
6495
6505
  display: isDirect
6496
6506
  ? 'Direct'
@@ -10787,13 +10797,7 @@ const DEFAULT_FLIGHT_FILTERS = Object.freeze({
10787
10797
  flightNumber: '',
10788
10798
  inboundFlightNumber: '',
10789
10799
  privateFares: {},
10790
- ndcFares: {
10791
- "NDC": {
10792
- display: "NDC",
10793
- selected: false,
10794
- value: "NDC"
10795
- }
10796
- }
10800
+ ndcFares: {}
10797
10801
  });
10798
10802
 
10799
10803
  var FlightSearchType;
@@ -16591,7 +16595,7 @@ class HotelEnterpriseSearch extends BaseEnterpriseSearch {
16591
16595
  }));
16592
16596
  }
16593
16597
  getRecentSearchQuery(query) {
16594
- const recentSearchQuery = this.updateSerchQuery(query);
16598
+ const recentSearchQuery = this.updateSearchQuery(query);
16595
16599
  return {
16596
16600
  serviceType: ServiceType.Hotel,
16597
16601
  searchArgs: recentSearchQuery,
@@ -16599,7 +16603,7 @@ class HotelEnterpriseSearch extends BaseEnterpriseSearch {
16599
16603
  travellers: this.helpers.getTravellersId(this.travellers, this.userService.bobo?.id)
16600
16604
  };
16601
16605
  }
16602
- updateSerchQuery(query) {
16606
+ updateSearchQuery(query) {
16603
16607
  const searchQuery = query;
16604
16608
  searchQuery.location_type_select = this.location_type_select;
16605
16609
  if (this.location?.name && this.location?.type !== LocationTypes.Hotel) {
@@ -16692,6 +16696,14 @@ class HotelEnterpriseSearch extends BaseEnterpriseSearch {
16692
16696
  query.longitude = tempParams.location.longitude;
16693
16697
  query.hotelName = tempParams.location.hotelTitle;
16694
16698
  query.countryCode = tempParams.location.countryCode;
16699
+ // Use location name as fallback for hotel name if hotel_name field is empty (for recent searches)
16700
+ if (!tempParams.hotel_name && tempParams.location?.name && !query.hotelName) {
16701
+ query.hotelName = tempParams.location.name;
16702
+ }
16703
+ // Also set cityName if location has city property
16704
+ if (tempParams.location?.city) {
16705
+ query.cityName = tempParams.location.city;
16706
+ }
16695
16707
  break;
16696
16708
  case LocationTypes.TrainStation:
16697
16709
  if (tempParams.location.latitude && tempParams.location.longitude) {
@@ -17862,7 +17874,7 @@ class HotelEnterpriseSearch extends BaseEnterpriseSearch {
17862
17874
  saveSearch(name, hotelName = null) {
17863
17875
  if (this.isFavouriteValid.value) {
17864
17876
  const query = this.getSearchQuery();
17865
- const favouriteSearchQuery = this.updateSerchQuery(query);
17877
+ const favouriteSearchQuery = this.updateSearchQuery(query);
17866
17878
  if (hotelName)
17867
17879
  favouriteSearchQuery.hotelName = hotelName;
17868
17880
  const searchInfo = {
@@ -18009,11 +18021,11 @@ class HotelEnterpriseSearch extends BaseEnterpriseSearch {
18009
18021
  this.currency = query.currency;
18010
18022
  this.distance = query.distance;
18011
18023
  this.no_of_rooms = query.rooms;
18012
- this.hotel_name = query.hotelName
18013
- ? query.hotelName
18014
- : cloneBasketItem
18015
- ? this.clonedBasketItemDetails.hotelName
18016
- : null;
18024
+ // Don't populate hotel_name from recent search to avoid duplication with location field
18025
+ // The hotel name will be used from location.name as fallback in buildQuery()
18026
+ this.hotel_name = cloneBasketItem
18027
+ ? this.clonedBasketItemDetails.hotelName
18028
+ : null;
18017
18029
  this.hotel_chain = query.groupName ? { name: query.groupName } : null;
18018
18030
  this.country = query.countryCode
18019
18031
  ? (this.country = {
@@ -18037,7 +18049,9 @@ class HotelEnterpriseSearch extends BaseEnterpriseSearch {
18037
18049
  switch (this.location_type_select) {
18038
18050
  case LocationTypes.Address:
18039
18051
  if (query.iata) {
18040
- this.searchService.getAirportByCode(query.iata).subscribe((iata) => {
18052
+ this.searchService
18053
+ .getAirportByCode(query.iata)
18054
+ .subscribe((iata) => {
18041
18055
  const { name } = iata.iataMatch;
18042
18056
  this.location = { iata: query.iata, type: LocationTypes.Airport, name };
18043
18057
  if (startSearch) {
@@ -18047,25 +18061,41 @@ class HotelEnterpriseSearch extends BaseEnterpriseSearch {
18047
18061
  }
18048
18062
  else {
18049
18063
  if ((!query.cityName && !query.postOrZipCode) || query.trainStationCode) {
18050
- const { trainStationCode, latitude, longitude } = query;
18051
- this.location = { latitude, longitude, type: LocationTypes.TrainStation, name: trainStationCode };
18064
+ const { trainStationCode, latitude, longitude, hotelName } = query;
18065
+ const locationName = hotelName || query.cityName || trainStationCode;
18066
+ const locationType = hotelName ? LocationTypes.Hotel : LocationTypes.TrainStation;
18067
+ this.location = { latitude, longitude, type: locationType, name: locationName };
18052
18068
  if (trainStationCode) {
18053
18069
  this.location.stationCode = trainStationCode;
18054
18070
  }
18055
18071
  }
18056
18072
  else if (!query.cityName && query.postOrZipCode) {
18057
- const { postOrZipCode, latitude, longitude } = query;
18058
- this.location = { postcode: postOrZipCode, latitude, longitude, type: LocationTypes.Hotel, name: postOrZipCode };
18073
+ const { postOrZipCode, latitude, longitude, hotelName } = query;
18074
+ this.location = {
18075
+ postcode: postOrZipCode,
18076
+ latitude,
18077
+ longitude,
18078
+ type: LocationTypes.Hotel,
18079
+ name: postOrZipCode || hotelName
18080
+ };
18059
18081
  }
18060
18082
  else {
18061
- const { countryCode, cityName, postOrZipCode, latitude, longitude } = query;
18062
- this.location = { countryCode, latitude, longitude, type: LocationTypes.City, name: cityName };
18083
+ const { countryCode, cityName, postOrZipCode, latitude, longitude, hotelName } = query;
18084
+ const locationName = hotelName || cityName;
18085
+ const locationType = hotelName ? LocationTypes.Hotel : LocationTypes.City;
18086
+ this.location = {
18087
+ countryCode,
18088
+ latitude,
18089
+ longitude,
18090
+ type: locationType,
18091
+ name: locationName
18092
+ };
18063
18093
  if (cityName) {
18064
18094
  this.location.city = cityName;
18065
18095
  }
18066
18096
  else if (!cityName && postOrZipCode) {
18067
18097
  this.location.postcode = postOrZipCode;
18068
- this.location.name = postOrZipCode;
18098
+ this.location.name = postOrZipCode || hotelName;
18069
18099
  }
18070
18100
  }
18071
18101
  if (startSearch) {
@@ -29862,7 +29892,7 @@ class BaseEnterpriseBasketService {
29862
29892
  list: this.basketList
29863
29893
  });
29864
29894
  menuState = MenuSlideEnum.OUT;
29865
- checkApproverModalClosed = new EventEmitter();
29895
+ checkApproverModalClosed = new Subject();
29866
29896
  requiresService;
29867
29897
  requiresOverrideService;
29868
29898
  userCurrency = 'GBP';
@@ -31680,7 +31710,7 @@ const PREFERENCE_VALUES = [
31680
31710
  { label: "Child", type: "MEAL_REQUEST", code: "CHML" },
31681
31711
  { label: "Diabetic", type: "MEAL_REQUEST", code: "DBML" },
31682
31712
  { label: "Fruit Plate", type: "MEAL_REQUEST", code: "FPML" },
31683
- { label: "Gluten Free", type: "MEAL_REQUEST", code: "GFML" },
31713
+ { label: "Gluten intolerant", type: "MEAL_REQUEST", code: "GFML" },
31684
31714
  { label: "Hindu", type: "MEAL_REQUEST", code: "HNML" },
31685
31715
  { label: "Kosher", type: "MEAL_REQUEST", code: "KSML" },
31686
31716
  { label: "Low Fat/Cholesterol", type: "MEAL_REQUEST", code: "LFML" },
@@ -31689,7 +31719,7 @@ const PREFERENCE_VALUES = [
31689
31719
  { label: "Non-Lactose", type: "MEAL_REQUEST", code: "NLML" },
31690
31720
  { label: "Raw Vegetarian/Vegan", type: "MEAL_REQUEST", code: "RVML" },
31691
31721
  { label: "Seafood", type: "MEAL_REQUEST", code: "SFML" },
31692
- { label: "Vegetarian", type: "MEAL_REQUEST", code: "VGML" },
31722
+ { label: "Vegetarian-Vegan", type: "MEAL_REQUEST", code: "VGML" },
31693
31723
  { label: "Vegetarian Lacto-Ovo", type: "MEAL_REQUEST", code: "VLML" },
31694
31724
  { label: "Asian Vegetarian", type: "MEAL_REQUEST", code: "VOML" },
31695
31725
  { label: "Aisle", type: "SEATING_PREFERENCE" },
@@ -39315,14 +39345,16 @@ class BaseLogonService {
39315
39345
  this.modalService.open(ModalTypes.ModalErrorComponent, { backdrop: 'static' }, modalValues);
39316
39346
  }
39317
39347
  isOnStaging() {
39318
- return !!['test'].find((url) => {
39319
- return window.location.hostname.includes(url);
39320
- });
39348
+ // return !!['test'].find((url: string) => {
39349
+ // return window.location.hostname.includes(url);
39350
+ // });
39351
+ return true;
39321
39352
  }
39322
39353
  isOnDev() {
39323
- return !!['localhost', '127.0.0.1', 'dev'].find((url) => {
39324
- return window.location.hostname.includes(url);
39325
- });
39354
+ // return !!['localhost', '127.0.0.1', 'dev'].find((url: string) => {
39355
+ // return window.location.hostname.includes(url);
39356
+ // });
39357
+ return true;
39326
39358
  }
39327
39359
  checkVersionUpdate() {
39328
39360
  const isProd = !this.isOnDev() && !this.isOnStaging();
@@ -39456,12 +39488,12 @@ class BaseLogonService {
39456
39488
  return result.asObservable();
39457
39489
  }
39458
39490
  setEnvironment() {
39459
- this.isScionEnv = window.location.href.includes('sabsenterprise');
39460
- this.isLightningEnv = !this.isScionEnv;
39461
- if (window.location.href.includes('localhost')) {
39462
- this.isScionEnv = this.environment.obt === 'scion';
39463
- this.isLightningEnv = !this.isScionEnv;
39464
- }
39491
+ // this.isScionEnv = window.location.href.includes('sabsenterprise');
39492
+ // this.isLightningEnv = !this.isScionEnv;
39493
+ // if (window.location.href.includes('localhost')) {
39494
+ // this.isScionEnv = this.environment.obt === 'scion';
39495
+ // this.isLightningEnv = !this.isScionEnv;
39496
+ // }
39465
39497
  }
39466
39498
  }
39467
39499