mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	Retain doc changes on tab switch after refresh doc
This commit is contained in:
		| @@ -236,10 +236,21 @@ export class DocumentDetailComponent | |||||||
|             true |             true | ||||||
|           ) |           ) | ||||||
|           this.suggestions = null |           this.suggestions = null | ||||||
|           if (this.openDocumentService.getOpenDocument(this.documentId)) { |           const openDocument = this.openDocumentService.getOpenDocument( | ||||||
|             this.updateComponent( |             this.documentId | ||||||
|               this.openDocumentService.getOpenDocument(this.documentId) |  | ||||||
|           ) |           ) | ||||||
|  |           if (openDocument) { | ||||||
|  |             if (this.documentForm.dirty) { | ||||||
|  |               Object.assign(openDocument, this.documentForm.value) | ||||||
|  |               openDocument['owner'] = | ||||||
|  |                 this.documentForm.get('permissions_form').value['owner'] | ||||||
|  |               openDocument['permissions'] = | ||||||
|  |                 this.documentForm.get('permissions_form').value[ | ||||||
|  |                   'set_permissions' | ||||||
|  |                 ] | ||||||
|  |               delete openDocument['permissions_form'] | ||||||
|  |             } | ||||||
|  |             this.updateComponent(openDocument) | ||||||
|           } else { |           } else { | ||||||
|             this.openDocumentService.openDocument(doc) |             this.openDocumentService.openDocument(doc) | ||||||
|             this.updateComponent(doc) |             this.updateComponent(doc) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 shamoon
					shamoon