mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-21 05:45:50 +00:00
add synchro
This commit is contained in:
@@ -17,7 +17,10 @@ export class AuthGuard implements CanActivate {
|
||||
route: ActivatedRouteSnapshot,
|
||||
state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {
|
||||
|
||||
if(window.location.pathname != '' && !SessionStore.exist) {
|
||||
if(!SessionStore.user.Inactivity) {
|
||||
this.router.navigate(['/inactivity']);
|
||||
}
|
||||
else if(window.location.pathname != '' && !SessionStore.exist) {
|
||||
this.router.navigate(['/']);
|
||||
return false
|
||||
} else {
|
||||
|
||||
@@ -16,6 +16,8 @@ export class InactivityGuard implements CanActivate {
|
||||
route: ActivatedRouteSnapshot,
|
||||
state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {
|
||||
|
||||
alert(SessionStore.exist +' '+SessionStore.user.Inactivity + ' '+ !SessionStore.hasPin)
|
||||
|
||||
if(SessionStore.exist && SessionStore.user.Inactivity && !SessionStore.hasPin) {
|
||||
// alert('stay set pin')
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user