mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
save
This commit is contained in:
@@ -3,6 +3,7 @@ import { Router } from '@angular/router';
|
||||
import { AnimationController, ModalController } from '@ionic/angular';
|
||||
import { User } from 'src/app/models/user.model';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { FingerprintPage } from 'src/app/shared/fingerprint/fingerprint.page';
|
||||
import { PinPage } from 'src/app/shared/pin/pin.page';
|
||||
import { LocalstoreService } from 'src/app/store/localstore.service';
|
||||
@@ -22,7 +23,8 @@ export class ProfilePage implements OnInit {
|
||||
private authService: AuthService,
|
||||
private animationController: AnimationController,
|
||||
private router: Router,
|
||||
private localstoreService: LocalstoreService
|
||||
private localstoreService: LocalstoreService,
|
||||
private toastService: ToastService,
|
||||
) {
|
||||
|
||||
this.loggeduser = authService.ValidatedUser;
|
||||
@@ -41,14 +43,16 @@ export class ProfilePage implements OnInit {
|
||||
notImplemented(){}
|
||||
|
||||
logout() {
|
||||
alert('LOGOUT')
|
||||
const loader = this.toastService.loading();
|
||||
// clear local storage
|
||||
window.localStorage.clear();
|
||||
|
||||
setTimeout(()=>{
|
||||
window.location.pathname = '/'
|
||||
window.location.pathname = '/';
|
||||
location.reload();
|
||||
}, 1000)
|
||||
this.router.navigate(['/']);
|
||||
}, 1000);
|
||||
loader.remove();
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user