buildingproduct-library 0.2.79 → 0.2.80

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.
@@ -982,42 +982,37 @@
982
982
  }
983
983
  AccountDropdownComponent.prototype.ngOnInit = function () {
984
984
  return __awaiter(this, void 0, void 0, function () {
985
- var isLoaded;
986
985
  var _this = this;
987
986
  return __generator(this, function (_c) {
988
- switch (_c.label) {
989
- case 0: return [4 /*yield*/, this.fiUserAccountDetailsService.isEnviornmentLoaded()];
990
- case 1:
991
- isLoaded = _c.sent();
992
- this.selecteduserData = JSON.parse(localStorage.getItem('selectedAccout') || '{}');
993
- this.fiUserAccountDetailsService.getUserAccount().subscribe(function (user) {
994
- var _a, _b;
995
- if (user) {
996
- var username = (_a = user.uid) === null || _a === void 0 ? void 0 : _a.toString();
997
- var cartObj = localStorage.getItem('spartacus⚿dimond-spa⚿cart');
998
- var cartId = (_b = JSON.parse(cartObj)) === null || _b === void 0 ? void 0 : _b.active;
999
- if (cartId) {
1000
- _this.service.getAccountDatawithCartId(cartId).subscribe(function (data) {
1001
- if (data) {
1002
- _this.showWaitCursor.next(false);
1003
- _this.accounts = data;
1004
- _this.getAccountsData();
1005
- }
1006
- });
987
+ // const isLoaded = await this.fiUserAccountDetailsService.isEnviornmentLoaded();
988
+ this.selecteduserData = JSON.parse(localStorage.getItem('selectedAccout') || '{}');
989
+ this.fiUserAccountDetailsService.getUserAccount().subscribe(function (user) {
990
+ var _a, _b;
991
+ if (user) {
992
+ var username = (_a = user.uid) === null || _a === void 0 ? void 0 : _a.toString();
993
+ var cartObj = localStorage.getItem('spartacus⚿dimond-spa⚿cart');
994
+ var cartId = (_b = JSON.parse(cartObj)) === null || _b === void 0 ? void 0 : _b.active;
995
+ if (cartId) {
996
+ _this.service.getAccountDatawithCartId(cartId).subscribe(function (data) {
997
+ if (data) {
998
+ _this.showWaitCursor.next(false);
999
+ _this.accounts = data;
1000
+ _this.getAccountsData();
1007
1001
  }
1008
- else {
1009
- _this.service.getAccountData().subscribe(function (data) {
1010
- if (data) {
1011
- _this.showWaitCursor.next(false);
1012
- _this.accounts = data;
1013
- _this.getAccountsData();
1014
- }
1015
- });
1002
+ });
1003
+ }
1004
+ else {
1005
+ _this.service.getAccountData().subscribe(function (data) {
1006
+ if (data) {
1007
+ _this.showWaitCursor.next(false);
1008
+ _this.accounts = data;
1009
+ _this.getAccountsData();
1016
1010
  }
1017
- }
1018
- });
1019
- return [2 /*return*/];
1020
- }
1011
+ });
1012
+ }
1013
+ }
1014
+ });
1015
+ return [2 /*return*/];
1021
1016
  });
1022
1017
  });
1023
1018
  };
@@ -1219,31 +1214,26 @@
1219
1214
  }
1220
1215
  FindStoreComponent.prototype.ngOnInit = function () {
1221
1216
  return __awaiter(this, void 0, void 0, function () {
1222
- var isLoaded;
1223
1217
  var _this = this;
1224
1218
  return __generator(this, function (_b) {
1225
- switch (_b.label) {
1226
- case 0: return [4 /*yield*/, this.fiUserAccountDetailsService.isEnviornmentLoaded()];
1227
- case 1:
1228
- isLoaded = _b.sent();
1229
- this.findStoreService.homeBranch.subscribe(function (data) {
1230
- setTimeout(function () {
1231
- var _a;
1232
- if (data) {
1233
- if (localStorage.getItem('branchDetails')) {
1234
- _this.homeBranchData = localStorage.getItem('branchDetails');
1235
- _this.branchName = (_a = JSON.parse(_this.homeBranchData)) === null || _a === void 0 ? void 0 : _a.displayName;
1236
- _this.cd.markForCheck();
1237
- }
1238
- else {
1239
- _this.branchName = data === null || data === void 0 ? void 0 : data.displayName;
1240
- _this.cd.markForCheck();
1241
- }
1242
- }
1243
- }, 100);
1244
- });
1245
- return [2 /*return*/];
1246
- }
1219
+ // const isLoaded = await this.fiUserAccountDetailsService.isEnviornmentLoaded();
1220
+ this.findStoreService.homeBranch.subscribe(function (data) {
1221
+ setTimeout(function () {
1222
+ var _a;
1223
+ if (data) {
1224
+ if (localStorage.getItem('branchDetails')) {
1225
+ _this.homeBranchData = localStorage.getItem('branchDetails');
1226
+ _this.branchName = (_a = JSON.parse(_this.homeBranchData)) === null || _a === void 0 ? void 0 : _a.displayName;
1227
+ _this.cd.markForCheck();
1228
+ }
1229
+ else {
1230
+ _this.branchName = data === null || data === void 0 ? void 0 : data.displayName;
1231
+ _this.cd.markForCheck();
1232
+ }
1233
+ }
1234
+ }, 100);
1235
+ });
1236
+ return [2 /*return*/];
1247
1237
  });
1248
1238
  });
1249
1239
  };