@if (taskHasResultMessage(task)) {
diff --git a/src-ui/src/app/components/admin/tasks/tasks.component.scss b/src-ui/src/app/components/admin/tasks/tasks.component.scss
index d8ebc21f0..d5580c56b 100644
--- a/src-ui/src/app/components/admin/tasks/tasks.component.scss
+++ b/src-ui/src/app/components/admin/tasks/tasks.component.scss
@@ -16,6 +16,39 @@ pre {
cursor: pointer;
}
+.tasks-table {
+ width: 100%;
+}
+
+@media (min-width: 992px) {
+ .tasks-table {
+ table-layout: fixed;
+ }
+
+ .tasks-table .select-col {
+ width: 3rem;
+ }
+
+ .tasks-table .created-col {
+ width: 13rem;
+ white-space: nowrap;
+ }
+
+ .tasks-table .results-col {
+ width: 24%;
+ }
+
+ .tasks-table .actions-col {
+ width: 18rem;
+ white-space: nowrap;
+ }
+
+ .tasks-table .name-col,
+ .tasks-table .results-col {
+ overflow: hidden;
+ }
+}
+
.btn .spinner-border-sm {
width: 0.8rem;
height: 0.8rem;
@@ -30,8 +63,6 @@ pre {
.input-group .dropdown .btn {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
- border-top-left-radius: 0;
- border-bottom-left-radius: 0;
}
.z-10 {
diff --git a/src-ui/src/app/components/admin/tasks/tasks.component.spec.ts b/src-ui/src/app/components/admin/tasks/tasks.component.spec.ts
index f6f3405bf..962895295 100644
--- a/src-ui/src/app/components/admin/tasks/tasks.component.spec.ts
+++ b/src-ui/src/app/components/admin/tasks/tasks.component.spec.ts
@@ -532,12 +532,22 @@ describe('TasksComponent', () => {
})
it('should support dismiss and open a document', () => {
- const routerSpy = jest.spyOn(router, 'navigate')
- component.dismissAndGo(tasks[3])
- expect(routerSpy).toHaveBeenCalledWith([
- 'documents',
- tasks[3].related_document_ids?.[0],
- ])
+ const dismissSpy = jest.spyOn(component, 'dismissTask')
+
+ fixture.detectChanges()
+
+ const openDocumentLink = fixture.debugElement
+ .queryAll(By.css('a'))
+ .find((link) => link.nativeElement.textContent.includes('Open Document'))
+
+ expect(openDocumentLink).not.toBeNull()
+
+ openDocumentLink.triggerEventHandler(
+ 'click',
+ new MouseEvent('click', { ctrlKey: true })
+ )
+
+ expect(dismissSpy).toHaveBeenCalledWith(tasks[3])
})
it('should auto refresh, allow toggle', () => {
diff --git a/src-ui/src/app/components/admin/tasks/tasks.component.ts b/src-ui/src/app/components/admin/tasks/tasks.component.ts
index d9a57edce..a56f29622 100644
--- a/src-ui/src/app/components/admin/tasks/tasks.component.ts
+++ b/src-ui/src/app/components/admin/tasks/tasks.component.ts
@@ -1,7 +1,7 @@
import { JsonPipe, NgTemplateOutlet } from '@angular/common'
import { Component, inject, OnDestroy, OnInit } from '@angular/core'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
-import { Router } from '@angular/router'
+import { Router, RouterLink } from '@angular/router'
import {
NgbCollapseModule,
NgbDropdownModule,
@@ -138,6 +138,7 @@ const TRIGGER_SOURCE_OPTIONS: Array<{
FormsModule,
ReactiveFormsModule,
NgTemplateOutlet,
+ RouterLink,
NgbCollapseModule,
NgbDropdownModule,
NgbPaginationModule,
@@ -333,11 +334,6 @@ export class TasksComponent
}
}
- dismissAndGo(task: PaperlessTask) {
- this.dismissTask(task)
- this.router.navigate(['documents', task.related_document_ids?.[0]])
- }
-
expandTask(task: PaperlessTask) {
this.expandedTask = this.expandedTask == task.id ? undefined : task.id
}