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
@@ -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() {