mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-17 10:13:56 -05:00
Retain doc changes on tab switch after refresh doc
This commit is contained in:
parent
646db73061
commit
ebaf509a42
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user