mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-15 02:57:09 +01:00
Update frontend for reworked tasks api endpoint
This commit is contained in:
parent
0a06c291e2
commit
aa999b34e2
4 changed files with 52 additions and 36 deletions
|
|
@ -34,9 +34,10 @@ export class TasksComponent implements OnInit, OnDestroy {
|
|||
}
|
||||
|
||||
dismissTasks(task: PaperlessTask = undefined) {
|
||||
this.tasksService.dismissTasks(
|
||||
task ? new Set([task.id]) : this.selectedTasks
|
||||
)
|
||||
let tasks = task ? new Set([task.id]) : this.selectedTasks
|
||||
if (this.selectedTasks.size == 0)
|
||||
tasks = new Set(this.currentTasks.map((t) => t.id))
|
||||
this.tasksService.dismissTasks(tasks)
|
||||
}
|
||||
|
||||
toggleSelected(task: PaperlessTask) {
|
||||
|
|
@ -49,13 +50,13 @@ export class TasksComponent implements OnInit, OnDestroy {
|
|||
let tasks: PaperlessTask[]
|
||||
switch (this.activeTab) {
|
||||
case 'incomplete':
|
||||
tasks = this.tasksService.incomplete
|
||||
tasks = this.tasksService.incompleteFileTasks
|
||||
break
|
||||
case 'completed':
|
||||
tasks = this.tasksService.completed
|
||||
tasks = this.tasksService.completedFileTasks
|
||||
break
|
||||
case 'failed':
|
||||
tasks = this.tasksService.failed
|
||||
tasks = this.tasksService.failedFileTasks
|
||||
break
|
||||
default:
|
||||
break
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue