buildingproduct-library 4.1.0 → 4.1.1

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.
@@ -327,9 +327,6 @@ class AccountDropdownService {
327
327
  }
328
328
  getIsLoggedIn() {
329
329
  const isLogedIn = localStorage.getItem('isLogedIn');
330
- if (!isLogedIn) {
331
- localStorage.setItem('isLogedIn', 'true');
332
- }
333
330
  return isLogedIn;
334
331
  }
335
332
  getAccountDatawithCartId(cartid) {
@@ -744,6 +741,10 @@ class AccountDropdownComponent {
744
741
  if (data) {
745
742
  this.showWaitCursor.next(false);
746
743
  this.accounts = data;
744
+ const isLogedIn = localStorage.getItem('isLogedIn');
745
+ if (!isLogedIn) {
746
+ localStorage.setItem('isLogedIn', 'true');
747
+ }
747
748
  this.getAccountsData();
748
749
  }
749
750
  }, (error) => {
@@ -764,7 +765,7 @@ class AccountDropdownComponent {
764
765
  localStorage.setItem('selectedAccout', JSON.stringify(selectedAccount));
765
766
  }
766
767
  this.findStoreService.homeBranchApi(element.branchPOS);
767
- if (localStorage.getItem('branchDetails') === null) {
768
+ if (this.isNullOrEmpty(localStorage.getItem('branchDetails'))) {
768
769
  localStorage.setItem('branchDetails', JSON.stringify(element.branchPOS));
769
770
  }
770
771
  }