change tab activation code to app component

This commit is contained in:
Peter Maquiran
2024-11-06 10:47:07 +01:00
parent b2d19879a7
commit 7e8dc49d5b
3 changed files with 30 additions and 26 deletions
-20
View File
@@ -43,26 +43,6 @@ export class AuthService {
private errorHandler: ErrorHandler,
private platform: Platform,) {
window.addEventListener('focus', (event) => {
if (!this.tabIsActive) {
this.tabIsActive = true
const data = SessionStore.getDataFromLocalStorage();
if (!data?.user?.Authorization && SessionStore?.user?.Authorization) {
window.location.reload();
}
if (window['all-process-gabinete']) {
window['all-process-gabinete']()
}
}
});
window.addEventListener('blur', (event) => {
this.tabIsActive = false
});
}
async login(user: UserForm, { saveSession = true }): Promise<UserSession> {