diff --git a/src/app/Rules/despacho.service.ts b/src/app/Rules/despacho.service.ts index d270feb1d..f1387ac95 100644 --- a/src/app/Rules/despacho.service.ts +++ b/src/app/Rules/despacho.service.ts @@ -191,6 +191,10 @@ export class DespachoService { async getList({updateStore = false}): Promise { + if (this.LoaderService.loading) { + return this.despachoStore.list + } + this.LoaderService.push({}) let result: fullTask[] = [] diff --git a/src/app/home/home-routing.module.ts b/src/app/home/home-routing.module.ts index 913654e9f..b7d8f0457 100644 --- a/src/app/home/home-routing.module.ts +++ b/src/app/home/home-routing.module.ts @@ -368,20 +368,19 @@ const routes: Routes = [ ], }, - { - path: 'inactivity', - children: [ - { - path:'', - loadChildren: ()=> import('../pages/inactivity/inactivity.module').then(m => m.InactivityPageModule) - }, - ], - - }, ], canActivate: [AuthGuard] + }, + { + path: 'inactivity', + children: [ + { + path:'', + loadChildren: ()=> import('../pages/inactivity/inactivity.module').then(m => m.InactivityPageModule) + }, + ], - } + }, ]; @NgModule({ diff --git a/src/app/models/GetTasksListType.ts b/src/app/models/GetTasksListType.ts new file mode 100644 index 000000000..816beebd0 --- /dev/null +++ b/src/app/models/GetTasksListType.ts @@ -0,0 +1,12 @@ +export let GetTasksListType: +"" | +"Pedido de Parecer" | +"Pedido de Parecer do Presidente" | +"Pedido de Deferimento" | +"Despacho do Presidente da República" | +"Agenda Oficial MDGPR" | +"Agenda Pessoal MDGPR" | +"Agenda Pessoal PR" | +"Agenda Oficial PR" | +"image/x-icon" | +"Despacho" \ No newline at end of file diff --git a/src/app/pages/gabinete-digital/gabinete-digital.page.ts b/src/app/pages/gabinete-digital/gabinete-digital.page.ts index cf1efbc1b..651c0a7a4 100644 --- a/src/app/pages/gabinete-digital/gabinete-digital.page.ts +++ b/src/app/pages/gabinete-digital/gabinete-digital.page.ts @@ -457,7 +457,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck { let expedientes = await this.processesbackend.GetTaskListExpediente(false).toPromise(); expedientes = expedientes.filter(data => data.workflowInstanceDataFields.Status == "Active") - this.expedientegbstore.reset(expedientes) + this.expedientegbstore.count = expedientes.length let despachos = await this.despachoRule.getList({updateStore: true}) diff --git a/src/app/pages/inactivity/inactivity.page.html b/src/app/pages/inactivity/inactivity.page.html index ba6b71c1c..0c6dab43a 100644 --- a/src/app/pages/inactivity/inactivity.page.html +++ b/src/app/pages/inactivity/inactivity.page.html @@ -1,67 +1,40 @@
-
-
-
-
-
- -
-
+
+ +
+ + +
-

Inicie a sessão

-
-

Email

- - - -

Palavra-passe

- - - -
- -
-
-
-

Uma iniciativa do Gabinete do Presidente da República

-
-
-
-
-
+
+
Digite o PIN
+
Digite o novo PIN
- -
- Digite o PIN - Digite o novo PIN - -
-
-
-
-
-
+
+
+
+
+
+
-
+ +
1
2
3
-
+
4
5
6
-
+
7
8
9
@@ -69,17 +42,19 @@
0
-
-
- Entrar com senha -
+
+ Entrar com senha +
+ +
+ Limpar +
-
- Limpar
+
diff --git a/src/app/pages/inactivity/inactivity.page.scss b/src/app/pages/inactivity/inactivity.page.scss index 88f9eae74..b19df02df 100644 --- a/src/app/pages/inactivity/inactivity.page.scss +++ b/src/app/pages/inactivity/inactivity.page.scss @@ -14,6 +14,7 @@ ion-content{ width: 100vw; height: 100vh; overflow: auto; + background: white !important; } .wrapper{ @@ -26,10 +27,11 @@ ion-content{ .logo{ width: 400px; height: 400px; - background-image: url("/assets/background/auth.svg"); background-position: center; background-repeat: no-repeat; } + + .bg-1{ width: 250px; height: 250px; @@ -106,14 +108,11 @@ ion-item{ } - - - - .div-top-header{ margin: 0 em(20px); padding-top: em(15px); border: 0!important; + z-index: 1000; } .div-logo { @@ -138,28 +137,42 @@ ion-item{ justify-content: center; font-size: 19pt; background: #44b5ea; - border-radius: 56px; - margin-left: 30px; + border-radius: 56px; margin-bottom: 15px; user-select: none; + margin-right: 15px; + margin-left: 15px; } + .title{ padding-top: 32px; + z-index: 1000; + height: unset !important; + position: relative; + top: -30px; } .terminal { - padding-top: 112px; - margin-left: -30px; + padding-top: 49px; justify-content: center; display: flex; flex-direction: column; align-items: center; + background-image: url(/assets/background/auth.svg); + background-position: center; + background-repeat: no-repeat; + width: 100%; + padding-bottom: 48px; + margin-bottom: -58px; + z-index: 100; + margin-top: -80px; } .clear{ color: #44b5ea; font-size: 12pt; + z-index: 1000; } .dot-active{ background: #44b5ea; @@ -185,12 +198,12 @@ ion-item{ text-align: center; align-items: center; justify-content: center; - background-image: url("/assets/background/auth.svg"); background-size: 686px 674px; background-position: center; background-position-y: 110px; background-repeat: no-repeat; margin: auto; + justify-content: space-around; } .voltar{ @@ -216,4 +229,10 @@ ion-item{ padding-top: 20px; position: unset !important; } -} \ No newline at end of file +} + + +.pin-4 { + z-index: 1000; + margin-bottom: 36px; +} diff --git a/src/app/pages/inactivity/inactivity.page.ts b/src/app/pages/inactivity/inactivity.page.ts index 77700a497..ccafd3efd 100644 --- a/src/app/pages/inactivity/inactivity.page.ts +++ b/src/app/pages/inactivity/inactivity.page.ts @@ -38,8 +38,6 @@ export class InactivityPage implements OnInit { } ngOnInit() { - // clear local storage - window.localStorage.clear(); let userData = this.localstoreService.get('UserData', {}) @@ -48,19 +46,6 @@ export class InactivityPage implements OnInit { } - //Function to validade the login inputs - validateUsername() { - return ( - this.username.trim().length > 0 - ); - } - - validatePassword() { - return ( - this.password.trim().length > 0 - ); - } - async presentAlert(message: string) { const alert = await this.alertController.create({ cssClass: 'my-custom-class', @@ -72,22 +57,6 @@ export class InactivityPage implements OnInit { await alert.present(); } - /* loginRocketChat() { - - let postData = { - "user": this.username, - "password": this.password, - } - - this.authService.loginChat(postData).subscribe((res: any) => { - console.log(res.data); - this.storageService.store(AuthConnstants.AUTH, res.data); - console.log('Login to Rocket chat OK'); - }, (error: any) => { - console.log('Network error'); - this.presentAlert('Network error ' + error); - }); - } */ getToken() { this.notificatinsservice.getAndpostToken(this.username); @@ -95,37 +64,7 @@ export class InactivityPage implements OnInit { async Login() { - if (this.validateUsername()) { - if(this.validatePassword()){ - this.userattempt = { - username: this.username, - password: this.password, - domainName: environment.domain, - BasicAuthKey: "" - } - let attempt = await this.authService.login(this.userattempt) - - if (attempt) { - this.authService.loginChat(this.userattempt); - this.getToken(); - this.hasSession = true - this.hasPin = false - this.setPin = true - - if(!this.hasPin || this.hasPin) { - } else { - this.router.navigate(['/home/events']); - } - } - } - else { - this.toastService.badRequest('Por favor, insira a sua palavra-passe'); - } - } - else { - this.toastService.badRequest('Por favor, insira o seu nome de utilizador'); - } } setCode(code: string) { diff --git a/src/app/services/processes.service.ts b/src/app/services/processes.service.ts index d5fe643a9..71c7bc74b 100644 --- a/src/app/services/processes.service.ts +++ b/src/app/services/processes.service.ts @@ -7,6 +7,7 @@ import { Observable } from 'rxjs'; import { DocumentSetUpMeeting } from '../models/CallMeeting'; import { Excludetask } from '../models/Excludetask'; import { ExpedienteFullTask } from '../models/Expediente'; +import { GetTasksListType } from '../models/GetTasksListType'; @Injectable({ providedIn: 'root' @@ -23,7 +24,7 @@ export class ProcessesService { this.headers = this.headers.set('Authorization', this.loggeduser.BasicAuthKey); } - GetTasksList(processname:string, onlycount:boolean): Observable + GetTasksList(processname: typeof GetTasksListType, onlycount:boolean): Observable { const geturl = environment.apiURL + 'tasks/List'; let params = new HttpParams(); diff --git a/src/app/store/despacho-store.service.ts b/src/app/store/despacho-store.service.ts index 8633dfe9f..9d3c9bb17 100644 --- a/src/app/store/despacho-store.service.ts +++ b/src/app/store/despacho-store.service.ts @@ -1,6 +1,7 @@ import { Injectable } from '@angular/core'; import { localstoreService } from './localstore.service' import { AES, enc, SHA1 } from 'crypto-js' +import { customTask } from '../models/dailyworktask.model'; @Injectable({ providedIn: 'root' @@ -8,7 +9,7 @@ import { AES, enc, SHA1 } from 'crypto-js' export class DespachoStoreService { // main data - private _list: [] = [] + private _list: customTask[] = [] // local storage keyName private keyName: string; private _count = 0 diff --git a/src/assets/images/logo-bg-removebg-preview.png b/src/assets/images/logo-bg-removebg-preview.png new file mode 100644 index 000000000..95de59923 Binary files /dev/null and b/src/assets/images/logo-bg-removebg-preview.png differ