buildingproduct-library 4.0.9 → 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.
|
Binary file
|
|
@@ -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')
|
|
768
|
+
if (this.isNullOrEmpty(localStorage.getItem('branchDetails'))) {
|
|
768
769
|
localStorage.setItem('branchDetails', JSON.stringify(element.branchPOS));
|
|
769
770
|
}
|
|
770
771
|
}
|
|
@@ -812,7 +813,7 @@ class AccountDropdownComponent {
|
|
|
812
813
|
}
|
|
813
814
|
});
|
|
814
815
|
this.showWaitCursor.next(false);
|
|
815
|
-
if (localStorage.getItem('branchDetails')
|
|
816
|
+
if (this.isNullOrEmpty(localStorage.getItem('branchDetails'))) {
|
|
816
817
|
localStorage.setItem('branchDetails', JSON.stringify(this.selecteduserData.branchPOS));
|
|
817
818
|
}
|
|
818
819
|
if (this.selecteduserData.isDefaultAccount == true) {
|
|
@@ -823,13 +824,17 @@ class AccountDropdownComponent {
|
|
|
823
824
|
localStorage.setItem('selectedAccout', JSON.stringify(selectedAccount));
|
|
824
825
|
}
|
|
825
826
|
this.findStoreService.homeBranchApi(this.selecteduserData.branchPOS);
|
|
826
|
-
if (localStorage.getItem('branchDetails')
|
|
827
|
+
if (this.isNullOrEmpty(localStorage.getItem('branchDetails'))) {
|
|
827
828
|
localStorage.setItem('branchDetails', JSON.stringify(this.selecteduserData.branchPOS));
|
|
828
829
|
}
|
|
829
830
|
}
|
|
830
831
|
this.findStoreService.homeBranchApi(this.selecteduserData.branchPOS);
|
|
831
832
|
}
|
|
832
833
|
}
|
|
834
|
+
// Check if any value is empty or undefined
|
|
835
|
+
isNullOrEmpty(value) {
|
|
836
|
+
return value == null || value == undefined || value == '' || value == ' ';
|
|
837
|
+
}
|
|
833
838
|
getAccountName(data) {
|
|
834
839
|
const selectedAccount = {
|
|
835
840
|
uid: data.uid
|