mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
improve
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
|
||||
<div class="title">
|
||||
<div class="thetitle"><ion-label >Pedidos</ion-label></div>
|
||||
<div class="theicon btn-refresh d-flex">
|
||||
<div class="theicon btn-refresh d-flex align-center">
|
||||
|
||||
|
||||
<!-- <div>
|
||||
@@ -36,6 +36,17 @@
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div>
|
||||
<div class="d-flex" (click)="reorderList('old')" *ngIf="ordinance == 'recent' ">
|
||||
|
||||
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/crescente.svg" ></ion-icon>
|
||||
</div>
|
||||
|
||||
<div class="d-flex" (click)="reorderList('recent')" *ngIf="ordinance != 'recent' ">
|
||||
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/decrescente.svg" ></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
|
||||
<mat-select [(value)]="filterName">
|
||||
|
||||
@@ -46,6 +46,7 @@ export class PedidosPage implements OnInit {
|
||||
listPedidosParecer = []
|
||||
listPedidosDeferimento = []
|
||||
hideSearchBtn: boolean = false;
|
||||
ordinance: string = 'old'
|
||||
|
||||
constructor(
|
||||
private router: Router,
|
||||
@@ -81,28 +82,38 @@ export class PedidosPage implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
reorderList(orderBy: string) {
|
||||
|
||||
this.ordinance = orderBy;
|
||||
|
||||
this.dynamicSearch();
|
||||
}
|
||||
|
||||
async dynamicSearch() {
|
||||
|
||||
if(this.showSearch && this.searchSubject) {
|
||||
|
||||
this.listPedidosParecer = this.pedidosstore.listparecer.filter((task) => {
|
||||
const 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.listPedidosParecer = this.TaskService.reorderList(this.ordinance, listPedidosParecer)
|
||||
|
||||
this.listPedidosDeferimento = this.pedidosstore.listdeferimento.filter((task) => {
|
||||
|
||||
const listPedidosDeferimento = this.pedidosstore.listdeferimento.filter((task) => {
|
||||
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
|
||||
subject = subject.toLowerCase();
|
||||
return subject.includes(this.searchSubject.toLowerCase())
|
||||
})
|
||||
|
||||
this.listPedidosDeferimento = this.TaskService.reorderList(this.ordinance, listPedidosDeferimento)
|
||||
|
||||
} else {
|
||||
|
||||
this.listPedidosParecer = this.pedidosstore.listparecer
|
||||
this.listPedidosDeferimento = this.pedidosstore.listdeferimento
|
||||
|
||||
this.listPedidosParecer = this.TaskService.reorderList(this.ordinance, this.pedidosstore.listparecer)
|
||||
this.listPedidosDeferimento = this.TaskService.reorderList(this.ordinance, this.pedidosstore.listdeferimento)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -145,7 +156,7 @@ export class PedidosPage implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
let allParecer = parecer.concat(parecerPr).reverse();
|
||||
let allParecer = parecer.concat(parecerPr)
|
||||
|
||||
this.parecerList = new Array();
|
||||
|
||||
@@ -168,7 +179,7 @@ export class PedidosPage implements OnInit {
|
||||
this.skeletonLoader = false
|
||||
|
||||
this.deferimentoList = new Array();
|
||||
let res = result.reverse().filter(data => data.workflowInstanceDataFields.Status == "Active")
|
||||
let res = result.filter(data => data.workflowInstanceDataFields.Status == "Active")
|
||||
|
||||
res.forEach(element => {
|
||||
let task: customTask = this.customTaskPipe.transform(element);
|
||||
|
||||
Reference in New Issue
Block a user