mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	confirm dialogs for remove operations
This commit is contained in:
		| @@ -182,7 +182,14 @@ export class DocumentListComponent implements OnInit { | |||||||
|   } |   } | ||||||
|  |  | ||||||
|   bulkRemoveCorrespondent() { |   bulkRemoveCorrespondent() { | ||||||
|     this.executeBulkOperation('set_correspondent', {"correspondent": null}).subscribe(r => {}) |     let modal = this.modalService.open(ConfirmDialogComponent, {backdrop: 'static'}) | ||||||
|  |     modal.componentInstance.title = "Remove correspondent" | ||||||
|  |     modal.componentInstance.message = `This operation will remove the correspondent from all ${this.list.selected.size} selected document(s).` | ||||||
|  |     modal.componentInstance.confirmClicked.subscribe(() => { | ||||||
|  |       this.executeBulkOperation('set_correspondent', {"correspondent": null}).subscribe(r => { | ||||||
|  |         modal.close() | ||||||
|  |       }) | ||||||
|  |     }) | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   bulkSetDocumentType() { |   bulkSetDocumentType() { | ||||||
| @@ -202,7 +209,14 @@ export class DocumentListComponent implements OnInit { | |||||||
|   } |   } | ||||||
|  |  | ||||||
|   bulkRemoveDocumentType() { |   bulkRemoveDocumentType() { | ||||||
|     this.executeBulkOperation('set_document_type', {"document_type": null}).subscribe(r => {}) |     let modal = this.modalService.open(ConfirmDialogComponent, {backdrop: 'static'}) | ||||||
|  |     modal.componentInstance.title = "Remove document type" | ||||||
|  |     modal.componentInstance.message = `This operation will remove the document type from all ${this.list.selected.size} selected document(s).` | ||||||
|  |     modal.componentInstance.confirmClicked.subscribe(() => { | ||||||
|  |       this.executeBulkOperation('set_document_type', {"document_type": null}).subscribe(r => { | ||||||
|  |         modal.close() | ||||||
|  |       }) | ||||||
|  |     }) | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   bulkAddTag() { |   bulkAddTag() { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 jonaswinkler
					jonaswinkler