Fix: cleanup saved view references on custom field deletion, auto-refresh views, show error on saved view save (#9225)

This commit is contained in:
shamoon
2025-02-26 10:09:41 -08:00
committed by GitHub
parent 61cb5103ed
commit edc0e6f859
7 changed files with 154 additions and 42 deletions

View File

@@ -377,12 +377,20 @@ export class DocumentListComponent
this.savedViewService
.patch(savedView)
.pipe(first())
.subscribe((view) => {
this.unmodifiedSavedView = view
this.toastService.showInfo(
$localize`View "${this.list.activeSavedViewTitle}" saved successfully.`
)
this.unmodifiedFilterRules = this.list.filterRules
.subscribe({
next: (view) => {
this.unmodifiedSavedView = view
this.toastService.showInfo(
$localize`View "${this.list.activeSavedViewTitle}" saved successfully.`
)
this.unmodifiedFilterRules = this.list.filterRules
},
error: (err) => {
this.toastService.showError(
$localize`Failed to save view "${this.list.activeSavedViewTitle}".`,
err
)
},
})
}
}