project listing linking to actual data

This commit is contained in:
Timo Bejan 2020-10-14 10:30:25 +03:00
parent 7b7dac1150
commit 621cc678c8
3 changed files with 15 additions and 4 deletions

View File

@ -89,7 +89,7 @@
<div class="project-stats-item">
<mat-icon svgIcon="red:files"></mat-icon>
<div>
<div class="heading">1324</div>
<div class="heading">{{totalPages}}</div>
<div>Analyzed pages</div>
</div>
</div>

View File

@ -39,9 +39,9 @@ export class ProjectListingScreenComponent implements OnInit {
{ value: this.inactiveProjects, color: 'archived', label: 'Archived' }
];
this.documentsChartData = [
{ value: 20, color: 'unassigned', label: 'unassigned' },
{ value: 40, color: 'under-review', label: 'under review' },
{ value: 16, color: 'under-approval', label: 'under approval' },
{ value: this.appStateService.totalDocuments, color: 'unassigned', label: 'unassigned' },
// { value: 40, color: 'under-review', label: 'under review' },
// { value: 16, color: 'under-approval', label: 'under approval' },
]
}
@ -81,6 +81,9 @@ export class ProjectListingScreenComponent implements OnInit {
});
}
get totalPages(){
return this.appStateService.totalAnalysedPages;
}
documentCount(project: ProjectWrapper) {
return project.files.length;

View File

@ -56,6 +56,14 @@ export class AppStateService {
return this._appState.activeFile;
}
get totalAnalysedPages(){
return this._appState.totalAnalysedPages;
}
get totalDocuments(){
return this._appState.totalDocuments ;
}
async loadAllProjects() {
const projects = await this._projectControllerService.getProjects().toPromise();
if(projects) {