loading indicators for sidebar saved views

This commit is contained in:
Michael Shamoon
2022-05-08 14:16:37 -07:00
parent 010f1f2bd1
commit 7f7ec625c8
3 changed files with 14 additions and 2 deletions

View File

@@ -9,13 +9,19 @@ import { AbstractPaperlessService } from './abstract-paperless-service'
providedIn: 'root',
})
export class SavedViewService extends AbstractPaperlessService<PaperlessSavedView> {
loading: boolean
constructor(http: HttpClient) {
super(http, 'saved_views')
this.reload()
}
private reload() {
this.listAll().subscribe((r) => (this.savedViews = r.results))
this.loading = true
this.listAll().subscribe((r) => {
this.savedViews = r.results
this.loading = false
})
}
private savedViews: PaperlessSavedView[] = []