diff --git a/src/app/guards/auth.guard.ts b/src/app/guards/auth.guard.ts index 9beca8a4b..17b0dd5af 100644 --- a/src/app/guards/auth.guard.ts +++ b/src/app/guards/auth.guard.ts @@ -48,6 +48,7 @@ export class AuthGuard implements CanActivate { } } else if ( pathname.startsWith('/home/gabinete-digital')) { + console.log('gabinete'); if(this.p.userPermission(this.p.permissionList.Gabinete.access)) { return true; diff --git a/src/app/guards/login.guard.ts b/src/app/guards/login.guard.ts index 1cdddb1ea..d0a3836a4 100644 --- a/src/app/guards/login.guard.ts +++ b/src/app/guards/login.guard.ts @@ -22,6 +22,9 @@ export class LoginGuard implements CanActivate { if(SessionStore.exist && SessionStore.user.Inactivity && SessionStore.user.LoginPreference != 'Pin' ) { this.router.navigate(['/home/events']); return false + } else if(SessionStore.exist && !SessionStore.user.Inactivity && SessionStore.user.LoginPreference == 'Pin' && SessionStore.forceToLoginWithForceToLogInWithPassword && !this.platform.is('desktop') && !this.platform.is('mobileweb')) { + SessionStore.forceToLoginWithForceToLogInWithPassword = false + return true } else if(SessionStore.exist && !SessionStore.hasPin && !this.platform.is('desktop') && !this.platform.is('mobileweb') ) { this.router.navigate(['/pin']); return false diff --git a/src/app/pages/inactivity/inactivity.page.html b/src/app/pages/inactivity/inactivity.page.html index 1b16c7224..4ffe27433 100644 --- a/src/app/pages/inactivity/inactivity.page.html +++ b/src/app/pages/inactivity/inactivity.page.html @@ -17,7 +17,7 @@
Digite o novo PIN
-
+
@@ -25,19 +25,19 @@
-
+
1
2
3
-
+
4
5
6
-
+
7
8
9
-
+
0
diff --git a/src/app/pages/inactivity/inactivity.page.scss b/src/app/pages/inactivity/inactivity.page.scss index 3cd90e111..bf2897b74 100644 --- a/src/app/pages/inactivity/inactivity.page.scss +++ b/src/app/pages/inactivity/inactivity.page.scss @@ -348,3 +348,8 @@ ion-item{ } + + +.hide { + opacity: 0 !important; +} \ No newline at end of file diff --git a/src/app/pages/inactivity/inactivity.page.ts b/src/app/pages/inactivity/inactivity.page.ts index 09a7d114c..c5cad1d7c 100644 --- a/src/app/pages/inactivity/inactivity.page.ts +++ b/src/app/pages/inactivity/inactivity.page.ts @@ -205,6 +205,8 @@ export class InactivityPage implements OnInit { enterWithPasswordButton() { this.enterWithPassword = true + SessionStore.forceToLoginWithForceToLogInWithPassword = true + this.router.navigate(['/']); } diff --git a/src/app/services/chat.service.ts b/src/app/services/chat.service.ts index bff0e12e0..a9528172c 100644 --- a/src/app/services/chat.service.ts +++ b/src/app/services/chat.service.ts @@ -392,9 +392,13 @@ export class ChatService { } - } else { + } else if (!this.headers) { this.setheader() - await this.refreshtoken(); + this.refreshtoken() + } else { + setTimeout(async ()=>{ + await this.refreshtoken(); + }, 4000) } } diff --git a/src/app/shared/popover/request-options/request-options.page.ts b/src/app/shared/popover/request-options/request-options.page.ts index 9a28255fb..f18153a26 100644 --- a/src/app/shared/popover/request-options/request-options.page.ts +++ b/src/app/shared/popover/request-options/request-options.page.ts @@ -84,7 +84,7 @@ export class RequestOptionsPage implements OnInit { this.toastService._successMessage() this.close(); loader.remove() - },()=>{ + }, ()=> { loader.remove() this.toastService._badRequest('Processo não encontrado') diff --git a/src/app/store/session.service.ts b/src/app/store/session.service.ts index 955428411..493a2b39b 100644 --- a/src/app/store/session.service.ts +++ b/src/app/store/session.service.ts @@ -14,6 +14,8 @@ class SessionService { // local storage keyName private keyName: string; + forceToLoginWithForceToLogInWithPassword = false + constructor() { this.keyName = (SHA1(this.constructor.name)).toString() diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts index 03ba77a7f..1e486cb61 100644 --- a/src/environments/environment.prod.ts +++ b/src/environments/environment.prod.ts @@ -1,7 +1,7 @@ export const environment = { // apiURL: 'https://gabinetedigital.dyndns.info/GabineteDigital.Services/V5/api/', - // apiURL: 'https://gd-api.oapr.gov.ao/api/', - apiURL: 'https://gdapi-dev.dyndns.info/GabineteDigital.Services/V5/api/', + apiURL: 'https://gd-api.oapr.gov.ao/api/', + //apiURL: 'https://gdapi-dev.dyndns.info/GabineteDigital.Services/V5/api/', // apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/V5/api/', // apiChatUrl: 'http://192.168.0.29:3000/api/v1/', // apiWsChatUrl: 'wss://192.168.0.29:3000/websocket', diff --git a/src/environments/environment.ts b/src/environments/environment.ts index cb71aaa30..83ecd2d11 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -1,7 +1,7 @@ export const environment = { // apiURL: 'https://gabinetedigital.dyndns.info/GabineteDigital.Services/V5/api/', - // apiURL: 'https://gd-api.oapr.gov.ao/api/', - apiURL: 'https://gdapi-dev.dyndns.info/GabineteDigital.Services/V5/api/', + apiURL: 'https://gd-api.oapr.gov.ao/api/', + //apiURL: 'https://gdapi-dev.dyndns.info/GabineteDigital.Services/V5/api/', // apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/V5/api/', // apiChatUrl: 'http://192.168.0.29:3000/api/v1/', // apiWsChatUrl: 'wss://192.168.0.29:3000/websocket', @@ -16,4 +16,5 @@ export const environment = { defaultuserpwd: 'M@p2022', //tabteste@006, chatOffline: true, presidencia: false, + version: '1.0.1' };