dismiss completed dismisses successful items only

This commit is contained in:
jonaswinkler 2021-02-04 16:55:48 +01:00
parent 5718f50c4f
commit 222fb48378
3 changed files with 5 additions and 5 deletions

View File

@ -1,6 +1,6 @@
<app-widget-frame title="Upload new documents" i18n-title>
<div header-buttons>
<a *ngIf="getStatusCompleted().length > 0" (click)="dismissAll()" [routerLink]="" >
<a *ngIf="getStatusSuccess().length > 0" (click)="dismissCompleted()" [routerLink]="" >
<span i18n="This button dismisses all status messages about processed documents on the dashboard (failed and successful)">Dismiss completed</span>&nbsp;
<svg xmlns="http://www.w3.org/2000/svg" width="1rem" height="1rem" fill="currentColor" class="bi bi-check2-all" viewBox="0 0 16 16">
<path d="M12.354 4.354a.5.5 0 0 0-.708-.708L5 10.293 1.854 7.146a.5.5 0 1 0-.708.708l3.5 3.5a.5.5 0 0 0 .708 0l7-7zm-4.208 7l-.896-.897.707-.707.543.543 6.646-6.647a.5.5 0 0 1 .708.708l-7 7a.5.5 0 0 1-.708 0z"/>

View File

@ -92,8 +92,8 @@ export class UploadFileWidgetComponent implements OnInit {
this.consumerStatusService.dismiss(status)
}
dismissAll() {
this.consumerStatusService.dismissAll()
dismissCompleted() {
this.consumerStatusService.dismissCompleted()
}
ngOnInit(): void {

View File

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