Fix doc detail button reset on error

This commit is contained in:
shamoon
2023-03-31 13:47:35 -07:00
parent d7068ca42b
commit 2fd217ef1f
2 changed files with 4 additions and 3 deletions

View File

@@ -462,12 +462,13 @@ export class DocumentDetailComponent
save() {
this.networkActive = true
this.store.next(this.documentForm.value)
this.documentsService
.update(this.document)
.pipe(first())
.subscribe({
next: () => {
this.store.next(this.documentForm.value)
this.toastService.showInfo($localize`Document saved successfully.`)
this.close()
this.networkActive = false
this.error = null