mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	Minor refactoring
This commit is contained in:
		| @@ -108,11 +108,11 @@ export class BulkEditorComponent { | |||||||
|   } |   } | ||||||
|  |  | ||||||
|   applyCorrespondent(selectedCorrespondent: PaperlessCorrespondent[]) { |   applyCorrespondent(selectedCorrespondent: PaperlessCorrespondent[]) { | ||||||
|     this.setCorrespondent.emit(selectedCorrespondent) |     this.setCorrespondent.emit(selectedCorrespondent.length > 0 ? selectedCorrespondent.shift() : null) | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   applyDocumentType(selectedDocumentType: PaperlessDocumentType[]) { |   applyDocumentType(selectedDocumentType: PaperlessDocumentType[]) { | ||||||
|     this.setDocumentType.emit(selectedDocumentType) |     this.setDocumentType.emit(selectedDocumentType.length > 0 ? selectedDocumentType.shift() : null) | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   applyDelete() { |   applyDelete() { | ||||||
|   | |||||||
| @@ -142,10 +142,7 @@ export class DocumentListComponent implements OnInit { | |||||||
|     ) |     ) | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   bulkSetCorrespondent(correspondent: PaperlessCorrespondent[]) { |   bulkSetCorrespondent(correspondent: PaperlessCorrespondent) { | ||||||
|     if (correspondent.length > 0) correspondent = correspondent.shift() |  | ||||||
|     else correspondent = undefined |  | ||||||
|  |  | ||||||
|     let modal = this.modalService.open(ConfirmDialogComponent, {backdrop: 'static'}) |     let modal = this.modalService.open(ConfirmDialogComponent, {backdrop: 'static'}) | ||||||
|     modal.componentInstance.title = "Confirm correspondent assignment" |     modal.componentInstance.title = "Confirm correspondent assignment" | ||||||
|     let messageFragment = correspondent ? `assign the correspondent ${correspondent.name} to` : `remove all correspondents from` |     let messageFragment = correspondent ? `assign the correspondent ${correspondent.name} to` : `remove all correspondents from` | ||||||
| @@ -161,10 +158,7 @@ export class DocumentListComponent implements OnInit { | |||||||
|     }) |     }) | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   bulkSetDocumentType(documentType: PaperlessDocumentType[]) { |   bulkSetDocumentType(documentType: PaperlessDocumentType) { | ||||||
|     if (documentType.length > 0) documentType = documentType.shift() |  | ||||||
|     else documentType = undefined |  | ||||||
|  |  | ||||||
|     let modal = this.modalService.open(ConfirmDialogComponent, {backdrop: 'static'}) |     let modal = this.modalService.open(ConfirmDialogComponent, {backdrop: 'static'}) | ||||||
|     modal.componentInstance.title = "Confirm Document Type assignment" |     modal.componentInstance.title = "Confirm Document Type assignment" | ||||||
|     let messageFragment = documentType ? `assign the document type ${documentType.name} to` : `remove all document types from` |     let messageFragment = documentType ? `assign the document type ${documentType.name} to` : `remove all document types from` | ||||||
| @@ -182,7 +176,7 @@ export class DocumentListComponent implements OnInit { | |||||||
|  |  | ||||||
|   bulkSetTags(tags) { |   bulkSetTags(tags) { | ||||||
|     console.log('bulkSetTags', tags); |     console.log('bulkSetTags', tags); | ||||||
|     // TODO:  |     // TODO: | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   bulkAddTag() { |   bulkAddTag() { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Michael Shamoon
					Michael Shamoon