improvements in pending task

This commit is contained in:
tiago.kayaya
2021-04-30 10:06:54 +01:00
parent b7337ab9dd
commit 84dad542aa
15 changed files with 562 additions and 13 deletions
@@ -19,9 +19,12 @@ export class GabineteDigitalPage implements OnInit {
public profile:string;
count_exp_dailywork=0;
count_desp_dailywork=0;
count_par_dailywork=0;
count_def_dailywork=0;
count_desp_dailywork=0;
count_desp_pending=0;
count_par_dailywork=0;
count_par_pending=0;
count_def_dailywork=0;
count_def_pending=0;
count_exp_pp : string;
count_exp_pd : string;
count_dip_apr : string;
@@ -42,6 +45,7 @@ export class GabineteDigitalPage implements OnInit {
showExpedients = true;
showPedidos = false;
showDespachos = false;
showPendentes = false;
showExpedientDetail = false;
emptyTextDescription = 'Sem opção selecionada';
@@ -118,26 +122,35 @@ export class GabineteDigitalPage implements OnInit {
this.showExpedients = false;
this.showPedidos = false;
this.showDespachos = false;
this.showPendentes = false;
this.showExpedientDetail = false;
}
LoadCounts() {
this.showLoader = true;
this.processesbackend.GetTasksList("Expediente", true).subscribe(res =>{
this.processesbackend.GetTasksList("Expediente", false).subscribe(res =>{
this.showLoader = false;
this.count_exp_dailywork = res;
this.count_exp_dailywork = Object.keys(res).length;
console.log(res);
});
this.processesbackend.GetTasksList("Despacho", true).subscribe(res =>{
this.processesbackend.GetTasksList("Despacho", false).subscribe(res =>{
this.showLoader = false;
this.count_desp_dailywork = res;
this.count_desp_dailywork = Object.keys(res).length;
let pendingList = res.filter(data => data.workflowInstanceDataFields.Status == "Pending");
this.count_desp_pending = Object.keys(pendingList).length;
});
this.processesbackend.GetTasksList("Pedido de Parecer", true).subscribe(res =>{
this.processesbackend.GetTasksList("Pedido de Parecer", false).subscribe(res =>{
this.showLoader = false;
this.count_par_dailywork = res;
this.count_par_dailywork = Object.keys(res).length;
let pendingList = res.filter(data => data.workflowInstanceDataFields.Status == "Pending");
this.count_par_pending = Object.keys(pendingList).length;
});
this.processesbackend.GetTasksList("Pedido de Deferimento", true).subscribe(res =>{
this.processesbackend.GetTasksList("Pedido de Deferimento", false).subscribe(res =>{
this.showLoader = false;
this.count_def_dailywork = res;
this.count_def_dailywork = Object.keys(res).length;
let pendingList = res.filter(data => data.workflowInstanceDataFields.Status == "Pending");
this.count_def_pending = Object.keys(pendingList).length;
});
this.processesbackend.GetToApprovedEvents('PR','true').subscribe(res=>{
this.count_ev_pr = res;
@@ -244,6 +257,16 @@ export class GabineteDigitalPage implements OnInit {
}
}
openPendentesPage(segment:string){
this.closeAllDesktopComponents();
if( window.innerWidth <= 1024){
this.openExpedientList();
}
else{
this.showPendentes = true;
}
}
async openExpedientList(){
this.closeAllDesktopComponent();