Skip to content
Snippets Groups Projects
Commit 74d61fd2 authored by Hagen Dreßler's avatar Hagen Dreßler
Browse files

Fix answer-statistic

parent b783e7ab
Branches
Tags
1 merge request!93Resolve "answer statistics (logic)" 2nd
Pipeline #13604 passed with stage
in 33 seconds
...@@ -25,9 +25,9 @@ ...@@ -25,9 +25,9 @@
<div align="right"> Selected: {{ choice.answers }} times</div> <div align="right"> Selected: {{ choice.answers }} times</div>
</div> </div>
<div fxLayoutAlign="center" fxLayoutGap="10px"> <div fxLayoutAlign="center" fxLayoutGap="10px">
<button mat-raised-button color="primary" (click)="showEvaluation(selectedContent.index-1)">Before</button> <button mat-raised-button color="primary" (click)="showEvaluation(selectedContent.index - 1)">Before</button>
<div><b>{{ selectedContent.index }} / {{ selectedContent.length }}</b></div> <div><b>{{ selectedContent.index }} / {{ selectedContent.length }}</b></div>
<button mat-raised-button color="primary" (click)="showEvaluation(selectedContent.index+1)">Next</button> <button mat-raised-button color="primary" (click)="showEvaluation(selectedContent.index + 1)">Next</button>
</div> </div>
</mat-tab> </mat-tab>
</mat-tab-group> </mat-tab-group>
......
...@@ -62,7 +62,7 @@ export class AnswerStatisticsComponent implements OnInit { ...@@ -62,7 +62,7 @@ export class AnswerStatisticsComponent implements OnInit {
} }
} }
showStatistic(value) { /** refactor answer class structure for less code and more abstraction*/ showStatistic(value) { // refactor answer class structure for less code and more abstraction
this.statistics = []; this.statistics = [];
for (const question of this.content) { for (const question of this.content) {
if (value === '1') { if (value === '1') {
...@@ -93,6 +93,6 @@ export class AnswerStatisticsComponent implements OnInit { ...@@ -93,6 +93,6 @@ export class AnswerStatisticsComponent implements OnInit {
} }
showEvaluation(index: number) { showEvaluation(index: number) {
/** coming with api connection, logic doesnt make sense without knowledge about api **/ // coming with api connection, logic doesnt make sense without knowledge about api
} }
} }
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment