@sabstravtech/obtservices 0.2.2504251220 → 0.2.2505201645

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.
@@ -9291,7 +9291,7 @@
9291
9291
  term = location.buildingName.replace(/^[^,]+,\s*/, "");
9292
9292
  isTrueSubject = new rxjs.BehaviorSubject(true);
9293
9293
  if (!location.terminal) return [3 /*break*/, 2];
9294
- return [4 /*yield*/, rxjs.firstValueFrom(this.searchService.getAirportLocations(term, location.countryCode, isTrueSubject))];
9294
+ return [4 /*yield*/, this.searchService.getAirportLocations(term, location.countryCode, isTrueSubject).toPromise()];
9295
9295
  case 1:
9296
9296
  locations = _u.sent();
9297
9297
  if (locations === null || locations === void 0 ? void 0 : locations.length) {
@@ -9309,7 +9309,7 @@
9309
9309
  return [3 /*break*/, 4];
9310
9310
  case 2:
9311
9311
  if (!(location.buildingName === location.streetAndNumber)) return [3 /*break*/, 4];
9312
- return [4 /*yield*/, rxjs.firstValueFrom(this.searchService.getStationLocations(term, isTrueSubject))];
9312
+ return [4 /*yield*/, this.searchService.getStationLocations(term, isTrueSubject).toPromise()];
9313
9313
  case 3:
9314
9314
  locations = _u.sent();
9315
9315
  if (locations === null || locations === void 0 ? void 0 : locations.length) {
@@ -26903,7 +26903,7 @@
26903
26903
  var station;
26904
26904
  return __generator(this, function (_6) {
26905
26905
  switch (_6.label) {
26906
- case 0: return [4 /*yield*/, rxjs.firstValueFrom(this.searchService.getRailStationById(locationId))];
26906
+ case 0: return [4 /*yield*/, this.searchService.getRailStationById(locationId).toPromise()];
26907
26907
  case 1:
26908
26908
  station = _6.sent();
26909
26909
  return [2 /*return*/, { name: station.name, railstation: station }];
@@ -31925,7 +31925,7 @@
31925
31925
  basket = _h.value;
31926
31926
  basketValue = basket.subject.value;
31927
31927
  if (!basketValue.invokedUser) return [3 /*break*/, 3];
31928
- return [4 /*yield*/, rxjs.firstValueFrom(this.removeBasket(basketValue.id))];
31928
+ return [4 /*yield*/, this.removeBasket(basketValue.id).toPromise()];
31929
31929
  case 2:
31930
31930
  _k.sent();
31931
31931
  _k.label = 3;
@@ -32299,12 +32299,10 @@
32299
32299
  item.detail.rooms[0].checkOut === basketItem.detail.rooms[0].checkOut);
32300
32300
  });
32301
32301
  if (!((hotelItems === null || hotelItems === void 0 ? void 0 : hotelItems.length) > 1)) return [3 /*break*/, 10];
32302
- // ENT-2447 new modal made in LU, needs to be made in all obts and app or will get error
32303
32302
  return [4 /*yield*/, this.modalService.open(ModalTypes.WarningRemoveModalComponent, {
32304
32303
  backdrop: 'static'
32305
32304
  })];
32306
32305
  case 1:
32307
- // ENT-2447 new modal made in LU, needs to be made in all obts and app or will get error
32308
32306
  _h.sent();
32309
32307
  _h.label = 2;
32310
32308
  case 2:
@@ -32314,10 +32312,13 @@
32314
32312
  case 3:
32315
32313
  if (!!hotelItems_1_1.done) return [3 /*break*/, 6];
32316
32314
  item_1 = hotelItems_1_1.value;
32317
- return [4 /*yield*/, rxjs.lastValueFrom(this.removeItemFromBasketUpdater.updateOne({
32315
+ return [4 /*yield*/, this.removeItemFromBasketUpdater
32316
+ .updateOne({
32318
32317
  convertCurrencyTo: this.userCurrency,
32319
32318
  basketItem: item_1.id
32320
- }))];
32319
+ })
32320
+ .pipe(operators.take(1))
32321
+ .toPromise()];
32321
32322
  case 4:
32322
32323
  newBasket = _h.sent();
32323
32324
  if (newBasket) {
@@ -32342,10 +32343,13 @@
32342
32343
  finally { if (e_2) throw e_2.error; }
32343
32344
  return [7 /*endfinally*/];
32344
32345
  case 9: return [3 /*break*/, 12];
32345
- case 10: return [4 /*yield*/, rxjs.lastValueFrom(this.removeItemFromBasketUpdater.updateOne({
32346
+ case 10: return [4 /*yield*/, this.removeItemFromBasketUpdater
32347
+ .updateOne({
32346
32348
  convertCurrencyTo: this.userCurrency,
32347
32349
  basketItem: item.id
32348
- }))];
32350
+ })
32351
+ .pipe(operators.take(1))
32352
+ .toPromise()];
32349
32353
  case 11:
32350
32354
  newBasket = _h.sent();
32351
32355
  if (newBasket) {
@@ -32356,10 +32360,13 @@
32356
32360
  }
32357
32361
  _h.label = 12;
32358
32362
  case 12: return [3 /*break*/, 15];
32359
- case 13: return [4 /*yield*/, rxjs.lastValueFrom(this.removeItemFromBasketUpdater.updateOne({
32363
+ case 13: return [4 /*yield*/, this.removeItemFromBasketUpdater
32364
+ .updateOne({
32360
32365
  convertCurrencyTo: this.userCurrency,
32361
32366
  basketItem: item.id
32362
- }))];
32367
+ })
32368
+ .pipe(operators.take(1))
32369
+ .toPromise()];
32363
32370
  case 14:
32364
32371
  newBasket = _h.sent();
32365
32372
  if (newBasket) {
@@ -32803,16 +32810,26 @@
32803
32810
  _this.validateBasketItemMiFetcher.fetchOne(query);
32804
32811
  });
32805
32812
  };
32813
+ // async validateMiBasket(basketId: string): Promise<void> {
32814
+ // const query = { basketId };
32815
+ // return firstValueFrom(this.validateBasketMiFetcher.fetchOne(query)).then(data => {
32816
+ // this.miViewed = true;
32817
+ // this.missingMIs = data;
32818
+ // });
32819
+ // }
32806
32820
  BaseEnterpriseBasketService.prototype.validateMiBasket = function (basketId) {
32807
32821
  return __awaiter(this, void 0, void 0, function () {
32808
32822
  var query;
32809
32823
  var _this = this;
32810
32824
  return __generator(this, function (_g) {
32811
- query = { basketId: basketId };
32812
- return [2 /*return*/, rxjs.firstValueFrom(this.validateBasketMiFetcher.fetchOne(query)).then(function (data) {
32813
- _this.miViewed = true;
32814
- _this.missingMIs = data;
32815
- })];
32825
+ query = {
32826
+ basketId: basketId
32827
+ };
32828
+ this.validateBasketMiFetcher.fetchOne(query).subscribe(function (data) {
32829
+ _this.miViewed = true;
32830
+ _this.missingMIs = data;
32831
+ });
32832
+ return [2 /*return*/];
32816
32833
  });
32817
32834
  });
32818
32835
  };