This commit is contained in:
Peter Maquiran
2023-05-08 10:52:54 +01:00
parent 073f04e541
commit ef882e8ff1
24 changed files with 861 additions and 328 deletions
@@ -43,7 +43,8 @@ export class PedidosPage implements OnInit {
showSearch = false
searchSubject = ''
list = []
listPedidosParecer = []
listPedidosDeferimento = []
hideSearchBtn: boolean = false;
constructor(
@@ -74,6 +75,9 @@ export class PedidosPage implements OnInit {
}
});
this.dynamicSearch()
}
@@ -81,13 +85,24 @@ export class PedidosPage implements OnInit {
if(this.showSearch && this.searchSubject) {
this.list = this.TaskService.despachoStore.list.filter((task) => {
this.listPedidosParecer = this.pedidosstore.listparecer.filter((task) => {
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
subject = subject.toLowerCase();
return subject.includes(this.searchSubject.toLowerCase())
})
this.listPedidosDeferimento = this.pedidosstore.listdeferimento.filter((task) => {
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
subject = subject.toLowerCase();
return subject.includes(this.searchSubject.toLowerCase())
})
} else {
this.list = this.TaskService.AllProcess
this.listPedidosParecer = this.pedidosstore.listparecer
this.listPedidosDeferimento = this.pedidosstore.listdeferimento
}
}
@@ -129,6 +144,7 @@ export class PedidosPage implements OnInit {
this.skeletonLoader = false
}
let allParecer = parecer.concat(parecerPr).reverse();
this.parecerList = new Array();
@@ -142,6 +158,8 @@ export class PedidosPage implements OnInit {
this.pedidosstore.resetparecer(this.sortService.sortDate(this.parecerList, 'CreateDate'));
this.dynamicSearch()
}
else if(this.segment == 'deferimento') {
this.taskType = "Pedido de Deferimento";
@@ -159,6 +177,7 @@ export class PedidosPage implements OnInit {
this.pedidosstore.resetdeferimento(this.sortService.sortDate(this.deferimentoList, 'CreateDate'));
this.dynamicSearch()
},() => {
this.skeletonLoader = false