mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	rxjs7 compatibility
This commit is contained in:
		| @@ -356,7 +356,7 @@ export class FilterableDropdownComponent { | |||||||
|       if (this.editing) { |       if (this.editing) { | ||||||
|         this.selectionModel.reset() |         this.selectionModel.reset() | ||||||
|       } |       } | ||||||
|       this.open.next() |       this.open.next(this) | ||||||
|     } else { |     } else { | ||||||
|       this.filterText = '' |       this.filterText = '' | ||||||
|       if (this.applyOnClose && this.selectionModel.isDirty()) { |       if (this.applyOnClose && this.selectionModel.isDirty()) { | ||||||
|   | |||||||
| @@ -206,18 +206,18 @@ export class DocumentDetailComponent | |||||||
|         }) |         }) | ||||||
|       ) |       ) | ||||||
|       .pipe(takeUntil(this.unsubscribeNotifier)) |       .pipe(takeUntil(this.unsubscribeNotifier)) | ||||||
|       .subscribe( |       .subscribe({ | ||||||
|         ({ doc, dirty }) => { |         next: ({ doc, dirty }) => { | ||||||
|           this.openDocumentService.setDirty(doc.id, dirty) |           this.openDocumentService.setDirty(doc.id, dirty) | ||||||
|         }, |         }, | ||||||
|         (error) => { |         error: (error) => { | ||||||
|           this.router.navigate(['404']) |           this.router.navigate(['404']) | ||||||
|         } |         }, | ||||||
|       ) |       }) | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   ngOnDestroy(): void { |   ngOnDestroy(): void { | ||||||
|     this.unsubscribeNotifier.next() |     this.unsubscribeNotifier.next(this) | ||||||
|     this.unsubscribeNotifier.complete() |     this.unsubscribeNotifier.complete() | ||||||
|   } |   } | ||||||
|  |  | ||||||
| @@ -226,25 +226,25 @@ export class DocumentDetailComponent | |||||||
|     this.documentsService |     this.documentsService | ||||||
|       .getMetadata(doc.id) |       .getMetadata(doc.id) | ||||||
|       .pipe(first()) |       .pipe(first()) | ||||||
|       .subscribe( |       .subscribe({ | ||||||
|         (result) => { |         next: (result) => { | ||||||
|           this.metadata = result |           this.metadata = result | ||||||
|         }, |         }, | ||||||
|         (error) => { |         error: (error) => { | ||||||
|           this.metadata = null |           this.metadata = null | ||||||
|         } |         }, | ||||||
|       ) |       }) | ||||||
|     this.documentsService |     this.documentsService | ||||||
|       .getSuggestions(doc.id) |       .getSuggestions(doc.id) | ||||||
|       .pipe(first()) |       .pipe(first()) | ||||||
|       .subscribe( |       .subscribe({ | ||||||
|         (result) => { |         next: (result) => { | ||||||
|           this.suggestions = result |           this.suggestions = result | ||||||
|         }, |         }, | ||||||
|         (error) => { |         error: (error) => { | ||||||
|           this.suggestions = null |           this.suggestions = null | ||||||
|         } |         }, | ||||||
|       ) |       }) | ||||||
|     this.title = this.documentTitlePipe.transform(doc.title) |     this.title = this.documentTitlePipe.transform(doc.title) | ||||||
|     this.documentForm.patchValue(doc) |     this.documentForm.patchValue(doc) | ||||||
|   } |   } | ||||||
| @@ -315,17 +315,17 @@ export class DocumentDetailComponent | |||||||
|     this.documentsService |     this.documentsService | ||||||
|       .update(this.document) |       .update(this.document) | ||||||
|       .pipe(first()) |       .pipe(first()) | ||||||
|       .subscribe( |       .subscribe({ | ||||||
|         (result) => { |         next: (result) => { | ||||||
|           this.close() |           this.close() | ||||||
|           this.networkActive = false |           this.networkActive = false | ||||||
|           this.error = null |           this.error = null | ||||||
|         }, |         }, | ||||||
|         (error) => { |         error: (error) => { | ||||||
|           this.networkActive = false |           this.networkActive = false | ||||||
|           this.error = error.error |           this.error = error.error | ||||||
|         } |         }, | ||||||
|       ) |       }) | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   saveEditNext() { |   saveEditNext() { | ||||||
| @@ -351,8 +351,8 @@ export class DocumentDetailComponent | |||||||
|         }) |         }) | ||||||
|       ) |       ) | ||||||
|       .pipe(first()) |       .pipe(first()) | ||||||
|       .subscribe( |       .subscribe({ | ||||||
|         ({ updateResult, nextDocId, closeResult }) => { |         next: ({ updateResult, nextDocId, closeResult }) => { | ||||||
|           this.error = null |           this.error = null | ||||||
|           this.networkActive = false |           this.networkActive = false | ||||||
|           if (closeResult && updateResult && nextDocId) { |           if (closeResult && updateResult && nextDocId) { | ||||||
| @@ -360,11 +360,11 @@ export class DocumentDetailComponent | |||||||
|             this.titleInput?.focus() |             this.titleInput?.focus() | ||||||
|           } |           } | ||||||
|         }, |         }, | ||||||
|         (error) => { |         error: (error) => { | ||||||
|           this.networkActive = false |           this.networkActive = false | ||||||
|           this.error = error.error |           this.error = error.error | ||||||
|         } |         }, | ||||||
|       ) |       }) | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   close() { |   close() { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Michael Shamoon
					Michael Shamoon