Fix: always refresh document after save

This commit is contained in:
shamoon 2024-05-01 12:07:19 -07:00
parent 7be7185418
commit 6c24686509

View File

@ -638,13 +638,17 @@ export class DocumentDetailComponent
this.documentForm.patchValue(docValues) this.documentForm.patchValue(docValues)
this.store.next(this.documentForm.value) this.store.next(this.documentForm.value)
this.openDocumentService.setDirty(this.document, false) this.openDocumentService.setDirty(this.document, false)
this.openDocumentService.save()
this.toastService.showInfo($localize`Document saved successfully.`) this.toastService.showInfo($localize`Document saved successfully.`)
this.networkActive = false this.networkActive = false
this.error = null this.error = null
close && if (close) {
this.close(() => this.close(() =>
this.openDocumentService.refreshDocument(this.documentId) this.openDocumentService.refreshDocument(this.documentId)
) )
} else {
this.openDocumentService.refreshDocument(this.documentId)
}
}, },
error: (error) => { error: (error) => {
this.networkActive = false this.networkActive = false