mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
improve
This commit is contained in:
@@ -151,7 +151,7 @@
|
||||
<p class="text-center exp-card-title ">Todas as tarefas</p>
|
||||
<p class="text-center exp-card-content"> {{ getAllProcessCount }} <span class="title1">Documentos</span></p>
|
||||
</div>
|
||||
|
||||
|
||||
<div *ngIf="p.userPermission([p.permissionList.Gabinete.aprove_event])" (click)="openEventsToApprovePage();selectedElement='approval'" [class.active]="selectedElement == 'approval'" class="box-hover exp-card d-flex flex-column">
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon src="assets/images/icons-agenda.svg"></ion-icon>
|
||||
@@ -159,7 +159,7 @@
|
||||
<p class="text-center exp-card-title ">Eventos para Aprovação</p>
|
||||
<p class="text-center exp-card-content">{{eventoaprovacaostore.countMd + eventoaprovacaostore.countPr}} <span class="title1">Documentos</span></p>
|
||||
</div>
|
||||
|
||||
|
||||
<div (click)="openExpedientListPage(); selectedElement='Correspondence'" [class.active]="selectedElement == 'Correspondence'" class="box-hover exp-card d-flex flex-column justify-center">
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-correspondencia.svg"></ion-icon>
|
||||
@@ -222,6 +222,32 @@
|
||||
<p class="text-center exp-card-title ">Pedidos de Deferimento</p>
|
||||
<p class="text-center exp-card-content">{{pedidosstore.countdeferimento}} <span class="title1">Documentos</span></p>
|
||||
</div>
|
||||
|
||||
<div *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks, p.permissionList.Gabinete.pr_tasks])" (click)="openDespachosPrPage(); selectedElement='showDespachosPr'" [class.active]="selectedElement == 'showDespachosPr'" class="box-hover exp-card-long width-100 d-flex flex-column justify-center">
|
||||
<div class="center-div">
|
||||
<div class="exp-card-icon">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-despachos-presidente.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement != 'showDespachosPr'" src="assets/images/theme/gov/icons-despachos-presidente.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement == 'showDespachosPr'" src="assets/images/theme/gov/icons-despachos-presidente-hover.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="exp-card-text">
|
||||
<p class="text-center exp-card-title " *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])">Despacho do Presidente da República</p>
|
||||
<p class="text-center exp-card-title " *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks])">Despachos criados por mim</p>
|
||||
<p class="text-center exp-card-content">{{ despachoprstore.count }} <span class="title1">Documentos</span> </p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" (click)="openDiplomasPage('validar'); selectedElement='DiplomasPorValidar'" [class.active]="selectedElement == 'DiplomasPorValidar'" class="box-hover exp-card d-flex flex-column justify-center">
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-expediente-diploma.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement != 'DiplomasPorValidar' " src="assets/images/theme/gov/icons-expediente-diploma.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement == 'DiplomasPorValidar' " src="assets/images/theme/gov/icons-expediente-diploma-hover.svg"></ion-icon>
|
||||
</div>
|
||||
<p class="text-center exp-card-title " *ngIf="!p.userPermission([p.permissionList.Gabinete.pr_tasks])">Diplomas por Validar</p>
|
||||
<p class="text-center exp-card-title " *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks])">Diplomas por Assinar</p>
|
||||
<p class="text-center exp-card-content">{{ deplomasStore.deplomasReviewCount }} <span class="title1">Documentos</span> </p>
|
||||
</div>
|
||||
|
||||
<div *ngIf="SessionStore.user.Profile == 'Consultant'" (click)="openDiplomaPorElaborar('gerarDiplomas'); selectedElement='gerarDiplomas'" [class.active]="selectedElement == 'gerarDiplomas'" class="box-hover exp-card d-flex flex-column justify-center">
|
||||
<div class="d-flex justify-center">
|
||||
@@ -237,6 +263,17 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div (click)="openDiplomasPage('assinados'); selectedElement='DiplomasAssinados'" [class.active]="selectedElement == 'DiplomasAssinados'" class="box-hover exp-card d-flex flex-column justify-center">
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-diplomas-assinados-presidente.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement != 'DiplomasAssinados'" src="assets/images/theme/gov/icons-diplomas-assinados-presidente.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement == 'DiplomasAssinados'" src="assets/images/theme/gov/icons-diplomas-assinados-presidente-hover.svg"></ion-icon>
|
||||
</div>
|
||||
<p class="text-center exp-card-title " *ngIf="!p.userPermission([p.permissionList.Gabinete.pr_tasks])">Diplomas assinados PR</p>
|
||||
<p class="text-center exp-card-title " *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks])" >Diplomas</p>
|
||||
<p class="text-center exp-card-content">{{ deplomasStore.countDiplomasAssinadoListCount }} <span class="title1">Documentos</span></p>
|
||||
</div>
|
||||
|
||||
<div *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks])" (click)="openDiplomasAssinarPage(); selectedElement='DiplomasParaAssinar'" [class.active]="selectedElement == 'DiplomasParaAssinar'" class="box-hover exp-card d-flex flex-column justify-center">
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-expediente-diploma.svg"></ion-icon>
|
||||
@@ -313,6 +350,7 @@
|
||||
<div class="my-2"><div style="width: 50%; background-color: #eeeeee; height: 10px;"></div></div>
|
||||
<div class="my-2"><div style="width: 100%; background-color: #eeeeee; height: 10px;"></div></div>
|
||||
</div>
|
||||
|
||||
</ion-item>
|
||||
<ion-item lines="none"
|
||||
class="item-skeleton width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
|
||||
@@ -332,10 +370,15 @@
|
||||
<div class="my-2"><div style="width: 50%; background-color: #eeeeee; height: 10px;"></div></div>
|
||||
<div class="my-2"><div style="width: 100%; background-color: #eeeeee; height: 10px;"></div></div>
|
||||
</div>
|
||||
|
||||
</ion-item>
|
||||
</ion-item-sliding>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -131,7 +131,8 @@ export class LoginPage implements OnInit {
|
||||
this.ChatSystemService.loadChat();
|
||||
|
||||
}
|
||||
|
||||
|
||||
this.changeProfileService.runLogin();
|
||||
this.getToken();
|
||||
SessionStore.setInativity(true);
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Attachment, EventAttachment } from '../models/attachment.model';
|
||||
import { Attachment } from '../models/attachment.model';
|
||||
import { Observable } from 'rxjs';
|
||||
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
|
||||
import { environment } from 'src/environments/environment';
|
||||
@@ -7,6 +7,7 @@ import { LoginUserRespose } from '../models/user.model';
|
||||
import { SessionStore } from '../store/session.service';
|
||||
import { File } from '@ionic-native/file/ngx';
|
||||
import { Platform } from '@ionic/angular';
|
||||
import { ChangeProfileService } from './change-profile.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@@ -16,11 +17,29 @@ export class AttachmentsService {
|
||||
loggeduser: LoginUserRespose;
|
||||
headers: HttpHeaders;
|
||||
|
||||
constructor(private http: HttpClient, private platform: Platform, private file: File) {
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private platform: Platform,
|
||||
private file: File,
|
||||
private changeProfileService: ChangeProfileService) {
|
||||
|
||||
this.changeProfileService.registerCallback(() => {
|
||||
this.loggeduser = SessionStore.user
|
||||
this.headers = new HttpHeaders();
|
||||
|
||||
this.headers = this.headers.set('Authorization', SessionStore.user.BasicAuthKey);
|
||||
})
|
||||
this.changeProfileService.registerLoginCallback(() => {
|
||||
this.loggeduser = SessionStore.user
|
||||
this.headers = new HttpHeaders();
|
||||
|
||||
this.headers = this.headers.set('Authorization', SessionStore.user.BasicAuthKey);
|
||||
})
|
||||
|
||||
this.loggeduser = SessionStore.user
|
||||
this.headers = new HttpHeaders();
|
||||
|
||||
this.headers = this.headers.set('Authorization', SessionStore.user.BasicAuthKey);
|
||||
|
||||
}
|
||||
|
||||
uploadFile(formData:any) {
|
||||
|
||||
@@ -223,6 +223,7 @@ export class AuthService {
|
||||
SessionStore.setInativity(false)
|
||||
SessionStore.setUrlBeforeInactivity(this.router.url);
|
||||
setTimeout(() => {
|
||||
// alert('logout')
|
||||
this.router.navigateByUrl('/', { replaceUrl: true });
|
||||
}, 100)
|
||||
|
||||
|
||||
@@ -12,6 +12,12 @@ export class ChangeProfileService {
|
||||
id: string
|
||||
}[] = []
|
||||
|
||||
|
||||
callbacksLogin: {
|
||||
funx: Function
|
||||
id: string
|
||||
}[] = []
|
||||
|
||||
constructor() { }
|
||||
|
||||
|
||||
@@ -23,6 +29,15 @@ export class ChangeProfileService {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
||||
registerLoginCallback(funx: Function, object: any = {} ) {
|
||||
|
||||
const id = uuidv4()
|
||||
this.callbacksLogin.push({funx, id})
|
||||
|
||||
return id;
|
||||
}
|
||||
|
||||
deleteCallback(id) {
|
||||
this.callbacks.forEach((e, index)=> {
|
||||
if(e.id == id) {
|
||||
@@ -38,5 +53,11 @@ export class ChangeProfileService {
|
||||
e.funx()
|
||||
})
|
||||
}
|
||||
|
||||
runLogin() {
|
||||
this.callbacksLogin.forEach((e, index)=> {
|
||||
e.funx()
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user