diff --git a/src/app/guards/login.guard.ts b/src/app/guards/login.guard.ts index d035602a3..1cdddb1ea 100644 --- a/src/app/guards/login.guard.ts +++ b/src/app/guards/login.guard.ts @@ -18,7 +18,7 @@ export class LoginGuard implements CanActivate { canActivate( route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable | Promise | boolean | UrlTree { - + if(SessionStore.exist && SessionStore.user.Inactivity && SessionStore.user.LoginPreference != 'Pin' ) { this.router.navigate(['/home/events']); return false diff --git a/src/app/modals/view-document/view-document.page.ts b/src/app/modals/view-document/view-document.page.ts index 7499f72ba..e7da18647 100644 --- a/src/app/modals/view-document/view-document.page.ts +++ b/src/app/modals/view-document/view-document.page.ts @@ -46,7 +46,6 @@ export class ViewDocumentPage implements OnInit { this.processes.GetViewer(this.docId, this.applicationId).subscribe(res=> { const link: string = res; - console.log(res,' link!!!') this.trustedUrl = this.sanitazer.bypassSecurityTrustResourceUrl(link); }, ()=>{ this.close(); diff --git a/src/app/models/user.model.ts b/src/app/models/user.model.ts index 29bc949cd..112d9725d 100644 --- a/src/app/models/user.model.ts +++ b/src/app/models/user.model.ts @@ -76,7 +76,7 @@ export class UserSession { UserName: string Password: string RochetChatUserId: string - Profile: 'PR' | 'MDGPR' | 'Consultant' | 'Department boss' | 'Assistant' | 'Director' | 'Deputy Director' | 'Secretariat' | 'Deputy Director' | 'General secretary' ; + Profile: 'PR' | 'MDGPR' | 'Consultant' | 'Department boss' | 'Assistant' | 'Director' | 'Deputy Director' | 'Secretariat' | 'Deputy Director' | 'General secretary' | 'Administrador'; LoginPreference: 'None' | 'Password' | 'Pin' | null; PIN: string Inactivity: boolean diff --git a/src/app/pages/chat/chat.page.html b/src/app/pages/chat/chat.page.html index 17440a86f..85354cb17 100644 --- a/src/app/pages/chat/chat.page.html +++ b/src/app/pages/chat/chat.page.html @@ -224,8 +224,8 @@
- -
-
+
@@ -127,8 +127,8 @@ {{file.title}} -
- +
+
@@ -147,7 +147,7 @@ {{file.description}} - + @@ -204,7 +204,7 @@ Apagou a mensagem
- + @@ -214,29 +214,6 @@ - - diff --git a/src/app/pages/gabinete-digital/gabinete-digital.page.html b/src/app/pages/gabinete-digital/gabinete-digital.page.html index 153db1b2f..3ea279daa 100644 --- a/src/app/pages/gabinete-digital/gabinete-digital.page.html +++ b/src/app/pages/gabinete-digital/gabinete-digital.page.html @@ -30,12 +30,14 @@ - +
+ +
diff --git a/src/app/pages/gabinete-digital/gabinete-digital.page.ts b/src/app/pages/gabinete-digital/gabinete-digital.page.ts index 4ca4ccfd6..463c479d2 100644 --- a/src/app/pages/gabinete-digital/gabinete-digital.page.ts +++ b/src/app/pages/gabinete-digital/gabinete-digital.page.ts @@ -159,9 +159,9 @@ export class GabineteDigitalPage implements OnInit { else { this.segmentVista = "boxview"; } - }; - this.checkRoutes(); + } + this.checkRoutes(); } closeAllDesktopComponent() { this.desktopComponent = { @@ -208,8 +208,6 @@ export class GabineteDigitalPage implements OnInit { this.backgroundservice.registerBackService('Online', () => { this.loadAllProcesses(); }); - - } async loadAllProcesses() { @@ -257,7 +255,6 @@ export class GabineteDigitalPage implements OnInit { allprocess.forEach(element => { let date = new Date(element.taskStartDate); date.setMonth(date.getMonth() + 1); - let taskDate = date.getFullYear() + "-" + date.getMonth() + "-" + date.getDate() + " " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds(); let task = { "SerialNumber": element.serialNumber, diff --git a/src/app/pages/login/login.page.html b/src/app/pages/login/login.page.html index a012c390d..3c9ae6af4 100644 --- a/src/app/pages/login/login.page.html +++ b/src/app/pages/login/login.page.html @@ -44,3 +44,5 @@
+ + diff --git a/src/app/services/auth.service.ts b/src/app/services/auth.service.ts index d8ad8cfb8..c55f09766 100644 --- a/src/app/services/auth.service.ts +++ b/src/app/services/auth.service.ts @@ -125,6 +125,8 @@ export class AuthService { } else if(session.RoleID == 99999886) { session.Profile = 'General secretary' + } else if (session.RoleID == 100000015) { + session.Profile = 'Administrador' } session.Password = user.password diff --git a/src/app/services/chat/ws-chat-methods.service.ts b/src/app/services/chat/ws-chat-methods.service.ts index f6a1ce627..48614ec51 100644 --- a/src/app/services/chat/ws-chat-methods.service.ts +++ b/src/app/services/chat/ws-chat-methods.service.ts @@ -42,6 +42,8 @@ export class WsChatMethodsService { sessionStore = SessionStore loggedUser: any; + + delete = [] constructor( private WsChatService: WsChatService, @@ -68,7 +70,7 @@ export class WsChatMethodsService { this.WsChatService.registerCallback({ type: 'reConnect', - funx: ()=>{ + funx: () => { /** * @description when the phone is in the background for a long time it could disconnects from the socket then the socket reconnects automatically, * when the connection is lost the subscribe is also lost, so we have to subscribe again when reconnection is establish. @@ -363,10 +365,16 @@ export class WsChatMethodsService { deleteRoom(roomId) { + + this.delete.push(roomId) delete this.group[roomId]; this._group = this._group.filter((e)=> e.id != roomId); } + deleteRecently(roomId) { + return this.delete.includes(roomId) + } + roomExist(roomId) { return this.dm[roomId]?.id || this.group[roomId]?.id }