This commit is contained in:
tiago.kayaya
2021-08-05 14:10:18 +01:00
parent f4c6fa91fe
commit 659a61577d
12 changed files with 580 additions and 17 deletions
@@ -34,6 +34,7 @@ import { DiplomasAssinarPageModule } from 'src/app/shared/gabinete-digital/diplo
import { HeaderPageModule } from 'src/app/shared/header/header.module';
import { BtnModalDismissPageModule } from 'src/app/shared/btn-modal-dismiss/btn-modal-dismiss.module';
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
import { AllProcessesPageModule } from 'src/app/shared/gabinete-digital/all-processes/all-processes.module';
@NgModule({
imports: [
@@ -45,6 +46,7 @@ import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
//
HeaderPageModule,
EmptyContainerPageModule,
AllProcessesPageModule,
EventsToApprovePageModule,
ExpedientsPageModule,
PedidosPageModule,
@@ -23,7 +23,7 @@
<div *ngIf="!hideRefreshBtn" class="title-icons">
<ion-segment [(ngModel)]="segmentVista" (ionChange)="onSegmentVistaChange()">
<ion-segment-button value="listview" class="ion-segment-button-no-border">
<fa-icon icon="stream"></fa-icon>
<fa-icon icon="align-justify"></fa-icon>
</ion-segment-button>
<ion-segment-button value="boxview" class="ion-segment-button-no-border">
<fa-icon icon="th-large"></fa-icon>
@@ -41,7 +41,7 @@
<div
class="item-wrapper ion-no-padding cursor-pointer"
*ngFor = "let task of allProcessesList"
(click)="viewProcessDetails(task.SerialNumber, task.WorkflowName, task.activityInstanceName)">
(click)="goToProcess(task.SerialNumber, task.WorkflowName, task.activityInstanceName)">
<div class="item width-100">
<div class="item-top-detail">
<div class="item-subject">
@@ -89,6 +89,15 @@
<!-- This is the box view -->
<div *ngSwitchCase="'boxview'" class="aside overflow-y-auto d-flex flex-wrap width-100 height-100">
<div (click)="openAllProcessesPage()" [class.active]="selectedElement == 'allProcessesTag'" class="exp-card d-flex flex-column" >
<div class="d-flex justify-center">
<!-- <ion-icon src="assets/images/icons-agenda.svg"></ion-icon> -->
<fa-icon icon="align-justify"></fa-icon>
</div>
<p class="text-center exp-card-title ">Todas as tarefas</p>
<p class="text-center exp-card-content">{{count_all_processes}}<span class="title1">Documentos</span></p>
</div>
<div (click)="openEventsToApprovePage();selectedElement='approval'" [class.active]="selectedElement == 'approval'" class="exp-card d-flex flex-column" *ngIf="loggeduser.Profile == 'MDGPR'" >
<div class="d-flex justify-center">
<ion-icon src="assets/images/icons-agenda.svg"></ion-icon>
@@ -218,6 +227,7 @@
<div class="aside-content d-none flex-column height-100">
<app-empty-container [texto]="emptyTextDescription" [style.display]="showEmptyContainer ? 'flex' : 'none'" class="height-100 flex-column"></app-empty-container>
<app-all-processes [profile]="profile" class=" height-100 flex-column" [style.display]="showAllProcesses ? 'flex' : 'none'" ></app-all-processes>
<app-events-to-approve [profile]="'MDGPR'" [style.display]="showEventsToApprove ? 'flex' : 'none'" class=" height-100 flex-column"></app-events-to-approve>
<app-expedients [profile]="profile" class=" height-100 flex-column" [style.display]="showExpedients ? 'flex' : 'none'" ></app-expedients>
@@ -188,7 +188,14 @@ ion-segment-button{
margin: 0 auto;
}
.exp-card ion-icon{
font-size: 48px;
font-size: 48px !important;
}
.exp-card fa-icon{
font-size: 30px;
padding: 0 1px 0 1px;
margin: 6px;
//border: 1px solid #ccc;
color: #797979;
}
.exp-card-title{
font-size: 15px;
@@ -57,6 +57,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
count_ev_md=0;
count_total_pending = 0;
count_desp_pr_active = 0;
count_all_processes = 0;
selectedElement = "";
@@ -65,6 +66,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
showExpediente : false,
}
showAllProcesses = false;
showEventsToApprove = false;
showEmptyContainer = false;
showExpedients = false;
@@ -125,12 +127,12 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
}
ngDoCheck(): void {
if( window.innerWidth < 701) {
/* if( window.innerWidth < 701) {
this.segmentVista = "listview";
}
else{
this.segmentVista = "boxview";
}
} */
}
closeAllDesktopComponent(){
@@ -260,7 +262,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
thedate.getMinutes();
}
viewProcessDetails(serialNumber:string, workflowName:string, activityName:string){
goToProcess(serialNumber:string, workflowName:string, activityName:string){
if(workflowName == 'Despacho') {
if(activityName == 'Tarefa de Despacho'){
this.router.navigate(['/home/gabinete-digital/despachos',serialNumber,'gabinete-digital']);
@@ -305,15 +307,16 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
}
checkUser(){
this.selectedElement='Correspondence';
switch(this.loggeduser.Profile){
this.selectedElement='allProcessesTag';
this.showAllProcesses = true;
/* switch(this.loggeduser.Profile){
case 'MDGPR':
this.showExpedients = true;
break;
case 'PR':
this.showExpedientesPr = true;
break;
}
} */
}
hideRefreshButton(){
@@ -332,6 +335,10 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
checkRoutes(){
this.closeAllDesktopComponents();
if(this.router.url == '/home/gabinete-digital?processes=true'){
this.openAllProcessesPage();
this.selectedElement='allProcessesTag';
}
if(this.router.url == '/home/gabinete-digital?eventos=true'){
this.openEventsToApprovePage();
this.selectedElement='approval';
@@ -386,6 +393,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
closeAllDesktopComponents() {
this.showEmptyContainer = false;
this.showAllProcesses = false;
this.showEventsToApprove = false;
this.showExpedients = false;
this.showPedidos = false;
@@ -403,6 +411,9 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
this.showLoader = true;
let allPreocesses_ = await this.processesbackend.GetTasksList("", false).toPromise();
this.count_all_processes = Object.keys(allPreocesses_).length;
let expedientes = await this.processesbackend.GetTasksList("Expediente", false).toPromise();
this.count_exp_dailywork = Object.keys(expedientes.filter(data => data.workflowInstanceDataFields.Status == "Active")).length;
this.expedientegbstore.count = this.count_exp_dailywork;
@@ -503,6 +514,19 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
return false;
}
openAllProcessesPage() {
this.closeAllDesktopComponents();
let navigationExtras: NavigationExtras = { queryParams: {"processes": true,}};
if( window.innerWidth <= 801) {
this.router.navigate(['/home/gabinete-digital']);
}
else {
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
this.showAllProcesses = true;
this.selectedElement="allProcessesTag";
}
}
openEventsToApprovePage() {
this.closeAllDesktopComponents();
let navigationExtras: NavigationExtras = { queryParams: {"eventos": true,}};