mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-11-03 03:16:10 -06:00 
			
		
		
		
	dismiss completed dismisses successful items only
This commit is contained in:
		@@ -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> 
 | 
			
		||||
      <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"/>
 | 
			
		||||
 
 | 
			
		||||
@@ -92,8 +92,8 @@ export class UploadFileWidgetComponent implements OnInit {
 | 
			
		||||
    this.consumerStatusService.dismiss(status)
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  dismissAll() {
 | 
			
		||||
    this.consumerStatusService.dismissAll()
 | 
			
		||||
  dismissCompleted() {
 | 
			
		||||
    this.consumerStatusService.dismissCompleted()
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  ngOnInit(): void {
 | 
			
		||||
 
 | 
			
		||||
@@ -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() {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user