2021-04-27 12:14:57 +02:00
|
|
|
{{ poll.choices.length }} choix
|
2021-04-24 13:04:21 +02:00
|
|
|
<div
|
|
|
|
class="box"
|
2021-04-27 12:14:57 +02:00
|
|
|
*ngFor="let choice of poll.choices"
|
2021-04-24 13:04:21 +02:00
|
|
|
[ngClass]="{ 'active has-background-success': choice.enabled }"
|
|
|
|
(click)="choice.enabled = !choice.enabled"
|
|
|
|
>
|
2020-05-12 19:16:23 +02:00
|
|
|
<div class="columns is-vcentered is-mobile">
|
|
|
|
<div class="column">
|
2021-04-27 12:14:57 +02:00
|
|
|
<label class="label" *ngIf="poll.kind == 'text'">{{ choice.name }} </label>
|
|
|
|
<label class="label" *ngIf="poll.kind == 'date'">
|
|
|
|
{{ choice.name }} : {{ choice.name | date: 'short':'Europe/Paris':'fr_FR' }}
|
|
|
|
</label>
|
2020-05-12 19:16:23 +02:00
|
|
|
</div>
|
2021-04-27 11:06:17 +02:00
|
|
|
<div class="column is-narrow">
|
2021-04-27 12:14:57 +02:00
|
|
|
<span class="max_score" *ngIf="poll.max_score > 0 && choice.score == poll.max_score">
|
2021-04-27 11:06:17 +02:00
|
|
|
<i class="fa fa-star fa-2x"></i>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
<div class="column is-narrow">
|
2021-04-27 12:38:12 +02:00
|
|
|
<button class="button is-white" (click)="openModal(poll, choice)">
|
2021-04-27 11:06:17 +02:00
|
|
|
<i class="fa fa-info-circle"></i>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<div class="column is-narrow">
|
|
|
|
<div class="buttons has-addons is-right">
|
2021-04-28 12:22:40 +02:00
|
|
|
<button
|
|
|
|
class="button is-white"
|
|
|
|
[ngClass]="{ 'is-primary': storageService.choiceHasAnswerOfValue(choice.id, 'yes') }"
|
|
|
|
(click)="toggleAnswer(choice.id, 'yes')"
|
|
|
|
*ngIf="poll.allowed_answers.indexOf('yes') !== -1"
|
|
|
|
>
|
2021-04-27 11:06:17 +02:00
|
|
|
<img class="image is-24x24" src="../../../assets/img/icon_voter_YES.svg" />
|
2021-04-24 12:46:26 +02:00
|
|
|
|
2021-04-27 12:14:57 +02:00
|
|
|
<span class="counter" *ngIf="choice[answerEnum.YES].count * 1 > 0">
|
2021-04-27 11:06:17 +02:00
|
|
|
{{ choice[answerEnum.YES].count }}
|
|
|
|
</span>
|
|
|
|
</button>
|
2021-04-28 12:22:40 +02:00
|
|
|
<button
|
|
|
|
class="button is-white"
|
|
|
|
[ngClass]="{ 'is-primary': storageService.choiceHasAnswerOfValue(choice.id, 'maybe') }"
|
|
|
|
(click)="toggleAnswer(choice.id, 'maybe')"
|
|
|
|
*ngIf="poll.allowed_answers.indexOf('maybe') !== -1"
|
|
|
|
>
|
2021-04-27 11:06:17 +02:00
|
|
|
<img class="image is-24x24" src="../../../assets/img/icon_voter_MAYBE.svg" />
|
2021-04-27 12:14:57 +02:00
|
|
|
<span class="counter" *ngIf="choice[answerEnum.YES].count * 1 > 0">
|
2021-04-27 11:06:17 +02:00
|
|
|
{{ choice[answerEnum.MAYBE].count }}
|
|
|
|
</span>
|
|
|
|
</button>
|
2021-04-28 12:22:40 +02:00
|
|
|
<button
|
|
|
|
class="button is-white"
|
|
|
|
[ngClass]="{ 'is-primary': storageService.choiceHasAnswerOfValue(choice.id, 'no') }"
|
|
|
|
(click)="toggleAnswer(choice.id, 'no')"
|
|
|
|
*ngIf="poll.allowed_answers.indexOf('no') !== -1"
|
|
|
|
>
|
2021-04-27 11:06:17 +02:00
|
|
|
<img class="image is-24x24" src="../../../assets/img/croix.svg" />
|
2021-04-27 12:14:57 +02:00
|
|
|
<span class="counter" *ngIf="choice[answerEnum.YES].count * 1 > 0">
|
2021-04-27 11:06:17 +02:00
|
|
|
{{ choice[answerEnum.NO].count }}
|
|
|
|
</span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-05-12 19:16:23 +02:00
|
|
|
</div>
|
|
|
|
</div>
|