2021-04-30 15:42:50 +02:00
|
|
|
<div class="date-choices" *ngIf="poll.kind == 'date'">
|
|
|
|
<div class="box" *ngFor="let group of poll.choices_grouped">
|
|
|
|
<h3 class="title is-3">
|
2021-05-20 13:25:45 +02:00
|
|
|
<button
|
|
|
|
class="icon button padded"
|
|
|
|
(click)="toggleAllOfChoice(group)"
|
|
|
|
[ngClass]="{ 'has-background-primary': group.subSetToYes }"
|
|
|
|
>
|
|
|
|
<i class="fa fa-check-circle-o fa"></i>
|
|
|
|
</button>
|
2022-02-07 13:58:23 +01:00
|
|
|
{{ showAsDate(group.date_string) | date: 'fullDate':'Europe/Paris' }}
|
2021-04-30 15:42:50 +02:00
|
|
|
</h3>
|
2021-05-20 12:51:25 +02:00
|
|
|
<div class="time-slice-choice" *ngFor="let choice of group.choices">
|
2021-04-30 15:42:50 +02:00
|
|
|
<div class="columns is-vcentered is-mobile">
|
|
|
|
<div class="column">
|
2021-04-30 15:49:43 +02:00
|
|
|
<label class="label">
|
|
|
|
{{ choice.name }}
|
2021-04-30 15:42:50 +02:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
<div class="column is-narrow">
|
|
|
|
<span class="max_score" *ngIf="poll.max_score > 0 && choice.score == poll.max_score">
|
|
|
|
<i class="fa fa-star fa-2x"></i>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
<div class="column is-narrow">
|
2021-11-22 15:30:23 +01:00
|
|
|
<!-- <button class="button is-white" (click)="openModal(poll, timeSlice)">-->
|
2021-05-20 12:51:25 +02:00
|
|
|
<!-- <i class="fa fa-info-circle"></i>-->
|
|
|
|
<!-- </button>-->
|
2021-04-30 15:42:50 +02:00
|
|
|
</div>
|
|
|
|
<div class="column is-narrow">
|
|
|
|
<div class="buttons has-addons is-right">
|
|
|
|
<!-- TODO limit answers possible with poll allowed_answers-->
|
2021-11-18 12:51:59 +01:00
|
|
|
<app-choice-button
|
|
|
|
[poll]="poll"
|
|
|
|
[choice]="choice"
|
|
|
|
[answerKind]="'YES'"
|
|
|
|
*ngIf="poll.allowed_answers.indexOf('yes') !== -1"
|
|
|
|
></app-choice-button>
|
|
|
|
<app-choice-button
|
|
|
|
[poll]="poll"
|
|
|
|
[choice]="choice"
|
|
|
|
[answerKind]="'MAYBE'"
|
|
|
|
*ngIf="poll.allowed_answers.indexOf('maybe') !== -1"
|
|
|
|
></app-choice-button>
|
|
|
|
<app-choice-button
|
|
|
|
[poll]="poll"
|
|
|
|
[choice]="choice"
|
|
|
|
[answerKind]="'NO'"
|
|
|
|
*ngIf="poll.allowed_answers.indexOf('no') !== -1"
|
|
|
|
></app-choice-button>
|
2021-04-30 15:42:50 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-04-27 11:06:17 +02:00
|
|
|
</div>
|
2021-04-30 15:42:50 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="texts" *ngIf="poll.kind == 'text'">
|
|
|
|
<div class="box" *ngFor="let choice of poll.choices">
|
|
|
|
<div class="columns is-vcentered is-mobile">
|
|
|
|
<div class="column">
|
|
|
|
<label class="label" *ngIf="poll.kind == 'text'">{{ choice.name }} </label>
|
|
|
|
</div>
|
|
|
|
<div class="column is-narrow">
|
|
|
|
<span class="max_score" *ngIf="poll.max_score > 0 && choice.score == poll.max_score">
|
|
|
|
<i class="fa fa-star fa-2x"></i>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
<div class="column is-narrow">
|
|
|
|
<button class="button is-white" (click)="openModal(poll, choice)">
|
|
|
|
<i class="fa fa-info-circle"></i>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<div class="column is-narrow">
|
|
|
|
<div class="buttons has-addons is-right">
|
|
|
|
<!-- TODO limit answers possible with poll allowed_answers-->
|
|
|
|
<app-choice-button [poll]="poll" [choice]="choice" [answerKind]="'YES'"></app-choice-button>
|
|
|
|
<app-choice-button [poll]="poll" [choice]="choice" [answerKind]="'MAYBE'"></app-choice-button>
|
|
|
|
<app-choice-button [poll]="poll" [choice]="choice" [answerKind]="'NO'"></app-choice-button>
|
|
|
|
</div>
|
2021-04-27 11:06:17 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-05-12 19:16:23 +02:00
|
|
|
</div>
|
|
|
|
</div>
|