mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
save
This commit is contained in:
@@ -31,6 +31,7 @@ export class ProfilePage implements OnInit {
|
||||
location: "Gabinete";
|
||||
isProfileOpen = false
|
||||
hideImage = false
|
||||
logoutOut = false
|
||||
|
||||
constructor(private modalController: ModalController,
|
||||
private authService: AuthService,
|
||||
@@ -47,6 +48,7 @@ export class ProfilePage implements OnInit {
|
||||
this.loggeduser = SessionStore.user;
|
||||
router.events.subscribe((val) => {
|
||||
this.isProfileOpen = false
|
||||
this.logoutOut = true
|
||||
});
|
||||
|
||||
setTimeout(()=>{
|
||||
@@ -210,9 +212,19 @@ export class ProfilePage implements OnInit {
|
||||
logout() {
|
||||
SessionStore.setInativity(false)
|
||||
SessionStore.setUrlBeforeInactivity(this.router.url);
|
||||
this.logoutOut == false
|
||||
|
||||
setTimeout(() => {
|
||||
// alert('logout')
|
||||
this.router.navigateByUrl('/', { replaceUrl: true });
|
||||
this.router.navigate(['/']);
|
||||
|
||||
setTimeout(() =>{
|
||||
if(this.logoutOut == false) {
|
||||
window.location.pathname = '/'
|
||||
}
|
||||
}, 500)
|
||||
|
||||
}, 100)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user