This commit is contained in:
Peter Maquiran
2023-05-23 11:56:12 +01:00
parent 181a9dbd76
commit 033a6c331c
49 changed files with 832 additions and 278 deletions
@@ -3,7 +3,7 @@
<div class="title">
<div class="thetitle"><ion-label >Todas as tarefas</ion-label></div>
<div class="theicon d-flex">
<div class="theicon d-flex align-center">
<div>
<div title="Pesquisa" *ngIf="!hideSearchBtn" class="mr-20 d-flex align-center cursor-pointer">
<div (click)="openSearch();showSearch=true" *ngIf="!showSearch" class="d-flex">
@@ -40,6 +40,18 @@
</div>
</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">
@@ -27,6 +27,7 @@ export class AllProcessesPage implements OnInit {
})
AllProcess = []
ordinance: string = 'old'
constructor(
private router: Router,
@@ -71,30 +72,40 @@ export class AllProcessesPage implements OnInit {
}
openSearch() {
this.dynamicSearch()
// this.dynamicSearch()
}
async closeSearch() {
this.searchSubject = ''
this.dynamicSearch()
// this.dynamicSearch()
}
async basicSearch() {
this.dynamicSearch()
// this.dynamicSearch()
}
reorderList(orderBy: string) {
this.ordinance = orderBy;
this.dynamicSearch();
}
async dynamicSearch() {
if(this.showSearch && this.searchSubject) {
this.AllProcess = this.TaskService.AllProcess.filter((task) => {
const AllProcess = this.TaskService.AllProcess.filter((task) => {
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
subject = subject.toLowerCase();
return subject.includes(this.searchSubject.toLowerCase())
})
} else {
this.AllProcess = this.TaskService.AllProcess
}
this.AllProcess = this.TaskService.reorderList(this.ordinance, AllProcess)
} else {
const AllProcess = this.TaskService.AllProcess
this.AllProcess = this.TaskService.reorderList(this.ordinance, AllProcess)
}
}
checkFilter() {