From 222fb483789ef5ec78064427f74c8afef07c0294 Mon Sep 17 00:00:00 2001 From: jonaswinkler Date: Thu, 4 Feb 2021 16:55:48 +0100 Subject: [PATCH] dismiss completed dismisses successful items only --- .../upload-file-widget/upload-file-widget.component.html | 2 +- .../upload-file-widget/upload-file-widget.component.ts | 4 ++-- src-ui/src/app/services/consumer-status.service.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.html b/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.html index eb1e1da73..c4f7fa21c 100644 --- a/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.html +++ b/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.html @@ -1,6 +1,6 @@
- + Dismiss completed  diff --git a/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.ts b/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.ts index 2412290c0..e74e2bc41 100644 --- a/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.ts +++ b/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.ts @@ -92,8 +92,8 @@ export class UploadFileWidgetComponent implements OnInit { this.consumerStatusService.dismiss(status) } - dismissAll() { - this.consumerStatusService.dismissAll() + dismissCompleted() { + this.consumerStatusService.dismissCompleted() } ngOnInit(): void { diff --git a/src-ui/src/app/services/consumer-status.service.ts b/src-ui/src/app/services/consumer-status.service.ts index 38f29a528..23df0871f 100644 --- a/src-ui/src/app/services/consumer-status.service.ts +++ b/src-ui/src/app/services/consumer-status.service.ts @@ -176,8 +176,8 @@ export class ConsumerStatusService { } } - dismissAll() { - this.consumerStatus = this.consumerStatus.filter(status => status.phase < FileStatusPhase.SUCCESS) + dismissCompleted() { + this.consumerStatus = this.consumerStatus.filter(status => status.phase != FileStatusPhase.SUCCESS) } onDocumentConsumptionFinished() {