This commit is contained in:
jonaswinkler 2021-01-03 21:44:53 +01:00
parent a96ab9a9a4
commit d935dcd350
15 changed files with 80 additions and 72 deletions

View file

@ -90,6 +90,7 @@ export class DocumentListComponent implements OnInit {
let modal = this.modalService.open(SaveViewConfigDialogComponent, {backdrop: 'static'})
modal.componentInstance.defaultName = this.filterEditor.generateFilterName()
modal.componentInstance.saveClicked.subscribe(formValue => {
modal.componentInstance.buttonsEnabled = false
let savedView = {
name: formValue.name,
show_on_dashboard: formValue.showOnDashboard,
@ -101,6 +102,9 @@ export class DocumentListComponent implements OnInit {
this.savedViewService.create(savedView).subscribe(() => {
modal.close()
this.toastService.showInfo($localize`View "${savedView.name}" created successfully.`)
}, error => {
modal.componentInstance.error = error.error
modal.componentInstance.buttonsEnabled = true
})
})
}