Skip to content
Snippets Groups Projects

Fix statistics list

Merged Lukas Mauß requested to merge 207-statistics-doesn-t-work into master
All threads resolved!
Compare and
8 files
+ 31
18
Compare changes
  • Side-by-side
  • Inline
Files
8
<mat-toolbar></mat-toolbar>
<mat-progress-bar class="progress-theme" mode="determinate" value="{{total}}"
*ngIf="total > status.good" color="primary"></mat-progress-bar>
*ngIf="total >= status.good" color="primary"></mat-progress-bar>
<mat-progress-bar class="progress-theme" mode="determinate" value="{{total}}"
*ngIf="total < status.good && total >= status.okay" color="accent"></mat-progress-bar>
<mat-progress-bar class="progress-theme" mode="determinate" value="{{total}}"
@@ -23,25 +23,25 @@
'positive' : cp.percent >= status.good,
'okay' : cp.percent >= status.okay && cp.percent < status.good,
'negative' : cp.percent < status.okay,
'empty' : cp.percent < status.zero }" (click)="goToStats(cp.contentId)">{{cp.percent.toFixed() + ' %'}}</mat-cell>
'empty invisible' : cp.percent < status.zero }" (click)="goToStats(cp.contentId)">{{cp.percent.toFixed() + ' %'}}</mat-cell>
</ng-container>
<ng-container matColumnDef="counts">
<mat-header-cell *matHeaderCellDef> {{'statistic.answers' | translate}} </mat-header-cell>
<ng-container matColumnDef="abstentions">
<mat-header-cell *matHeaderCellDef> {{'statistic.abstentions' | translate}} </mat-header-cell>
<mat-cell *matCellDef="let cp" [ngClass]="{
'positive' : cp.percent >= status.good,
'okay' : cp.percent >= status.okay && cp.percent < status.good,
'negative' : cp.percent < status.okay,
'empty' : cp.percent < status.zero }" (click)="goToStats(cp.contentId)">{{cp.counts}}</mat-cell>
'empty invisible' : cp.percent < status.zero }" (click)="goToStats(cp.contentId)">{{cp.abstentions}}</mat-cell>
</ng-container>
<ng-container matColumnDef="abstentions">
<mat-header-cell *matHeaderCellDef> {{'statistic.abstentions' | translate}} </mat-header-cell>
<ng-container matColumnDef="counts">
<mat-header-cell *matHeaderCellDef> {{'statistic.answers' | translate}} </mat-header-cell>
<mat-cell *matCellDef="let cp" [ngClass]="{
'positive' : cp.percent >= status.good,
'okay' : cp.percent >= status.okay && cp.percent < status.good,
'negative' : cp.percent < status.okay,
'empty' : cp.percent < status.zero }" (click)="goToStats(cp.contentId)">{{cp.abstentions}}</mat-cell>
'empty invisible' : cp.percent < status.zero }" (click)="goToStats(cp.contentId)">{{cp.counts}}</mat-cell>
</ng-container>
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>