mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	Fix: dont dismiss active alerts on "dismiss completed" (#6364)
This commit is contained in:
		| @@ -149,7 +149,7 @@ describe('UploadFileWidgetComponent', () => { | ||||
|     expect(dismissSpy).toHaveBeenCalled() | ||||
|   }) | ||||
|  | ||||
|   it('should allow dismissing all alerts', fakeAsync(() => { | ||||
|   it('should allow dismissing completed alerts', fakeAsync(() => { | ||||
|     mockConsumerStatuses(consumerStatusService) | ||||
|     component.alertsExpanded = true | ||||
|     fixture.detectChanges() | ||||
| @@ -160,7 +160,7 @@ describe('UploadFileWidgetComponent', () => { | ||||
|     component.dismissCompleted() | ||||
|     tick(1000) | ||||
|     fixture.detectChanges() | ||||
|     expect(dismissSpy).toHaveBeenCalledTimes(10) | ||||
|     expect(dismissSpy).toHaveBeenCalledTimes(4) | ||||
|   })) | ||||
| }) | ||||
|  | ||||
|   | ||||
| @@ -115,12 +115,9 @@ export class UploadFileWidgetComponent extends ComponentWithPermissions { | ||||
|   } | ||||
|  | ||||
|   dismissCompleted() { | ||||
|     this.alerts.forEach((a) => a.close()) | ||||
|     if (this.alertsExpanded) { | ||||
|       this.getStatusCompleted().forEach((status) => | ||||
|         this.consumerStatusService.dismiss(status) | ||||
|       ) | ||||
|     } | ||||
|     this.getStatusCompleted().forEach((status) => | ||||
|       this.consumerStatusService.dismiss(status) | ||||
|     ) | ||||
|   } | ||||
|  | ||||
|   public onFileSelected(event: Event) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 shamoon
					shamoon