mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-11-03 03:16:10 -06:00 
			
		
		
		
	confirm dialogs for remove operations
This commit is contained in:
		@@ -182,7 +182,14 @@ export class DocumentListComponent implements OnInit {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  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() {
 | 
			
		||||
@@ -202,7 +209,14 @@ export class DocumentListComponent implements OnInit {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  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() {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user