2020-10-27 01:10:18 +01:00
|
|
|
import { Component, OnInit } from '@angular/core';
|
2020-12-14 19:26:36 +01:00
|
|
|
import { PaperlessSavedView } from 'src/app/data/paperless-saved-view';
|
|
|
|
|
import { SavedViewService } from 'src/app/services/rest/saved-view.service';
|
2020-10-31 00:56:20 +01:00
|
|
|
|
2020-10-27 01:10:18 +01:00
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
|
selector: 'app-dashboard',
|
|
|
|
|
templateUrl: './dashboard.component.html',
|
2020-11-22 14:43:59 +01:00
|
|
|
styleUrls: ['./dashboard.component.scss']
|
2020-10-27 01:10:18 +01:00
|
|
|
})
|
|
|
|
|
export class DashboardComponent implements OnInit {
|
|
|
|
|
|
2020-11-22 22:35:39 +01:00
|
|
|
constructor(
|
2020-12-14 20:59:18 +01:00
|
|
|
private savedViewService: SavedViewService) { }
|
2020-10-31 00:22:12 +01:00
|
|
|
|
|
|
|
|
|
2020-12-14 19:26:36 +01:00
|
|
|
savedViews: PaperlessSavedView[] = []
|
2020-10-27 01:10:18 +01:00
|
|
|
|
|
|
|
|
ngOnInit(): void {
|
2020-12-14 19:26:36 +01:00
|
|
|
this.savedViewService.listAll().subscribe(results => {
|
|
|
|
|
this.savedViews = results.results.filter(savedView => savedView.show_on_dashboard)
|
|
|
|
|
})
|
2020-10-31 00:56:20 +01:00
|
|
|
}
|
2020-10-31 00:22:12 +01:00
|
|
|
|
2020-10-27 01:10:18 +01:00
|
|
|
}
|