forked from tykayn/funky-framadate-front
display detailled array of answers
This commit is contained in:
parent
13dbe0f89b
commit
adc7c255d8
@ -15,7 +15,7 @@ import { ToastService } from '../../core/services/toast.service';
|
|||||||
styleUrls: ['./consultation.component.scss'],
|
styleUrls: ['./consultation.component.scss'],
|
||||||
})
|
})
|
||||||
export class ConsultationComponent implements OnInit, OnDestroy {
|
export class ConsultationComponent implements OnInit, OnDestroy {
|
||||||
public isCompactMode = true;
|
public isCompactMode = false;
|
||||||
public poll: Poll;
|
public poll: Poll;
|
||||||
public pollSlug: string;
|
public pollSlug: string;
|
||||||
public pass_hash: string;
|
public pass_hash: string;
|
||||||
|
@ -6,7 +6,10 @@
|
|||||||
</th>
|
</th>
|
||||||
<th *ngFor="let choice of poll.choices">
|
<th *ngFor="let choice of poll.choices">
|
||||||
<!-- {{choice.id}}-->
|
<!-- {{choice.id}}-->
|
||||||
<span class="label" *ngIf="poll.kind == 'text'">{{ choice.name }} </span>
|
<span class="label" *ngIf="poll.kind == 'text'">
|
||||||
|
{{ choice.id }}
|
||||||
|
{{ choice.name }}
|
||||||
|
</span>
|
||||||
<span class="label" *ngIf="poll.kind == 'date'">
|
<span class="label" *ngIf="poll.kind == 'date'">
|
||||||
{{ make_date(choice.name) | date: 'fullDate':'Europe/Paris':'fr_FR' }}
|
{{ make_date(choice.name) | date: 'fullDate':'Europe/Paris':'fr_FR' }}
|
||||||
</span>
|
</span>
|
||||||
@ -26,8 +29,11 @@
|
|||||||
<td>
|
<td>
|
||||||
Favori
|
Favori
|
||||||
</td>
|
</td>
|
||||||
<td *ngFor="let choice of poll.choices">
|
<td
|
||||||
<span class="max_score" *ngIf="poll.max_score > 0 && choice.score == poll.max_score">
|
*ngFor="let choice of poll.choices"
|
||||||
|
[ngClass]="{ 'background-yes': poll.max_score > 0 && choice.score == poll.max_score }"
|
||||||
|
>
|
||||||
|
<span class="max_score background-yes" *ngIf="poll.max_score > 0 && choice.score == poll.max_score">
|
||||||
<i class="fa fa-star fa-2x"></i>
|
<i class="fa fa-star fa-2x"></i>
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
@ -47,13 +53,10 @@
|
|||||||
<sub> le {{ stack.created_at | date: 'short':'Europe/Paris':'fr_FR' }} </sub>
|
<sub> le {{ stack.created_at | date: 'short':'Europe/Paris':'fr_FR' }} </sub>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<ng-container *ngFor="let item of poll.choices">
|
<ng-container *ngFor="let vote of stack.votes">
|
||||||
<td *ngIf="!stackHasVotesForChoice(stack, item.id)"></td>
|
<td *ngIf="vote.value" class="stack-vote background-{{ vote.value }}">
|
||||||
<td
|
{{ vote.choice_id }})
|
||||||
*ngIf="stackHasVotesForChoice(stack, item.id)"
|
{{ vote.value }}
|
||||||
class="stack-vote background-{{ getValue(stack, item.id) }}"
|
|
||||||
>
|
|
||||||
{{ getValue(stack, item.id) }}
|
|
||||||
</td>
|
</td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</tr>
|
</tr>
|
||||||
|
Loading…
Reference in New Issue
Block a user