mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
add inativity page
This commit is contained in:
@@ -191,6 +191,10 @@ export class DespachoService {
|
||||
|
||||
async getList({updateStore = false}): Promise<customTask[]> {
|
||||
|
||||
if (this.LoaderService.loading) {
|
||||
return this.despachoStore.list
|
||||
}
|
||||
|
||||
this.LoaderService.push({})
|
||||
|
||||
let result: fullTask[] = []
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -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"
|
||||
@@ -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})
|
||||
|
||||
@@ -1,67 +1,40 @@
|
||||
<ion-content class="text-white">
|
||||
|
||||
<div class="main-wrapper">
|
||||
<div class="wrapper" *ngIf="!hasSession && !setPin || loginPreference == 'none' && !setPin ">
|
||||
|
||||
<div class="bg-1 d-flex justify-center align-center">
|
||||
<div class="bg-2 d-flex justify-center align-center">
|
||||
<div class="bg-3 d-flex justify-center align-center">
|
||||
<div class="bg-4 d-flex justify-center align-center">
|
||||
<div class="div-logo">
|
||||
<img src='assets/images/fullLogo.png' alt='logo'>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main-content d-flex flex-column height-100 width" >
|
||||
|
||||
<div class="div-top-header">
|
||||
|
||||
<div class="div-logo">
|
||||
<img src='assets/images/logo-bg-removebg-preview.png' alt='logo'>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<h3 class="center text-white">Inicie a sessão</h3>
|
||||
<form class="form">
|
||||
<p class="form-label text-white">Email</p>
|
||||
<ion-item class="form-input">
|
||||
<ion-input type="text" [(ngModel)]="username" name="input-username"></ion-input>
|
||||
</ion-item>
|
||||
<p class="form-label text-white">Palavra-passe</p>
|
||||
<ion-item class="form-input">
|
||||
<ion-input (keyup.enter)="Login()" type="password" [(ngModel)]="password" name="input-password" ></ion-input>
|
||||
</ion-item>
|
||||
<div class="d-flex pt-25">
|
||||
<button class="btn-ok btn-login" fill="clear" expand="block" shape="round" (click)="Login()">Iniciar</button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="msg-bottom d-flex">
|
||||
<p class="msg-bottom-p">Uma iniciativa do Gabinete do Presidente da República</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="main-content height-100" *ngIf="setPin || hasSession && loginPreference == 'pin' ">
|
||||
<div class=" align-center justify-center">
|
||||
<div class="div-top-header">
|
||||
<div class=" align-center justify-center d-flex flex-column width-100">
|
||||
<div *ngIf="hasPin" class="title">Digite o PIN</div>
|
||||
<div *ngIf="!hasPin" class="title">Digite o novo PIN</div>
|
||||
|
||||
<div class="div-logo">
|
||||
<img src='assets/images/logo-bg.png' alt='logo'>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<ion-title *ngIf="hasPin" class="title">Digite o PIN</ion-title>
|
||||
<ion-title *ngIf="!hasPin" class="title">Digite o novo PIN</ion-title>
|
||||
|
||||
<div class="d-flex pt-25 align-center justify-center">
|
||||
<div class="dot" [class.dot-active]="code.length >= 1"></div>
|
||||
<div class="dot" [class.dot-active]="code.length >= 2"></div>
|
||||
<div class="dot" [class.dot-active]="code.length >= 3"></div>
|
||||
<div class="dot"[class.dot-active]="code.length >= 4"></div>
|
||||
</div>
|
||||
<div class="terminal">
|
||||
<div class="d-flex pt-25 align-center justify-center pin-4">
|
||||
<div class="dot" [class.dot-active]="code.length >= 1"></div>
|
||||
<div class="dot" [class.dot-active]="code.length >= 2"></div>
|
||||
<div class="dot" [class.dot-active]="code.length >= 3"></div>
|
||||
<div class="dot"[class.dot-active]="code.length >= 4"></div>
|
||||
</div>
|
||||
|
||||
<div class="d-flex">
|
||||
|
||||
<div class="d-flex align-center justify-center">
|
||||
<div class="circle" (click)="setCode('1')">1</div> <div class="circle" (click)="setCode('2')">2</div> <div class="circle" (click)="setCode('3')">3</div>
|
||||
</div>
|
||||
|
||||
<div class="d-flex">
|
||||
<div class="d-flex align-center justify-center">
|
||||
<div class="circle" (click)="setCode('4')">4</div> <div class="circle" (click)="setCode('5')">5</div> <div class="circle" (click)="setCode('6')">6</div>
|
||||
</div>
|
||||
|
||||
<div class="d-flex">
|
||||
<div class="d-flex align-center justify-center">
|
||||
<div class="circle" (click)="setCode('7')">7</div> <div class="circle" (click)="setCode('8')">8</div> <div class="circle" (click)="setCode('9')">9</div>
|
||||
</div>
|
||||
|
||||
@@ -69,17 +42,19 @@
|
||||
<div class="circle" (click)="setCode('0')">0</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div *ngIf="hasPin" class="voltar d-flex align-center justify-center pt-25 clear" (click)="loginPreference = 'none'">
|
||||
Entrar com senha
|
||||
</div>
|
||||
<div *ngIf="hasPin" class="voltar d-flex align-center justify-center pt-25 clear" (click)="loginPreference = 'none'">
|
||||
Entrar com senha
|
||||
</div>
|
||||
|
||||
<div id="clear" class="cy-clear voltar d-flex align-center justify-center pt-25 clear" (click)="clearCode()">
|
||||
Limpar
|
||||
</div>
|
||||
|
||||
<div id="clear" class="cy-clear voltar d-flex align-center justify-center pt-25 clear" (click)="clearCode()">
|
||||
Limpar
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.pin-4 {
|
||||
z-index: 1000;
|
||||
margin-bottom: 36px;
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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<any>
|
||||
GetTasksList(processname: typeof GetTasksListType, onlycount:boolean): Observable<any>
|
||||
{
|
||||
const geturl = environment.apiURL + 'tasks/List';
|
||||
let params = new HttpParams();
|
||||
|
||||
@@ -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
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
Reference in New Issue
Block a user