mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-21 05:45:50 +00:00
remove limites
This commit is contained in:
@@ -68,6 +68,13 @@ export class EventsPage implements OnInit {
|
||||
showCorrespondenciasLoader = false
|
||||
loadingAllTask = false
|
||||
|
||||
|
||||
filterName: 'Para hoje' | 'Novos'| 'Lidos'| 'Não lidos'| 'OverdueTasks' | 'Todos' = 'Não lidos'
|
||||
showSearch = true;
|
||||
searchSubject: string = '';
|
||||
AllProcess = []
|
||||
ordinance: string = 'old'
|
||||
|
||||
constructor(
|
||||
private eventService: EventsService,
|
||||
private router: Router,
|
||||
@@ -102,6 +109,13 @@ export class EventsPage implements OnInit {
|
||||
this.listToPresentexpediente = []
|
||||
})
|
||||
|
||||
this.TaskService.registerCallback({
|
||||
id: import.meta.url,
|
||||
funx:() => {
|
||||
this.dynamicSearch()
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -128,6 +142,34 @@ export class EventsPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
|
||||
async dynamicSearch() {
|
||||
|
||||
const ordinance = this.ordinance
|
||||
if(this.showSearch && this.searchSubject) {
|
||||
|
||||
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())
|
||||
}).filter( task => this.TaskService.filter(task, this.filterName))
|
||||
|
||||
|
||||
if(ordinance == this.ordinance) {
|
||||
this.AllProcess = this.TaskService.reorderList(this.ordinance, AllProcess)
|
||||
}
|
||||
} else {
|
||||
const AllProcess = this.TaskService.AllProcess
|
||||
|
||||
if(ordinance == this.ordinance) {
|
||||
this.AllProcess = this.TaskService.reorderList(this.ordinance, AllProcess)
|
||||
.filter( task => this.TaskService.filter(task, this.filterName))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
async loadAllTask() {
|
||||
this.loadingAllTask = true
|
||||
await this.TaskService.LoadTask()
|
||||
|
||||
Reference in New Issue
Block a user