mirror of
https://framagit.org/framasoft/framadate/funky-framadate-front.git
synced 2023-08-25 13:53:14 +02:00
montrer consultation et préciser si aucun vote
This commit is contained in:
parent
21aa634ce5
commit
56273946c3
@ -160,8 +160,8 @@ export class PollService implements Resolve<Poll> {
|
||||
|
||||
public buildAnswersByChoiceLabelByPseudo(poll: Poll): Map<string, Map<string, Answer>> {
|
||||
const pseudos: Set<string> = new Set();
|
||||
poll.choices.forEach((choice: Choice) => {
|
||||
choice.participants.forEach((users: Set<User>) => {
|
||||
poll.votes.forEach((choice: Choice) => {
|
||||
choice.voters.forEach((users: Set<User>) => {
|
||||
users.forEach((user: User) => {
|
||||
pseudos.add(user.pseudo);
|
||||
});
|
||||
|
@ -4,7 +4,11 @@
|
||||
</div>
|
||||
</div>
|
||||
<section class="loading_poll" *ngIf="fetching"></section>
|
||||
<section class="poll_loaded" *ngIf="!fetching && poll">
|
||||
<section class="poll_loaded padded" *ngIf="!fetching && poll">
|
||||
<div class="alert alert-info" *ngIf="poll.votes.length == 0">
|
||||
aucun vote pour le moment
|
||||
</div>
|
||||
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
<div class="card">
|
||||
|
@ -11,7 +11,7 @@ import { PollService } from '../../core/services/poll.service';
|
||||
styleUrls: ['./consultation.component.scss'],
|
||||
})
|
||||
export class ConsultationComponent implements OnInit, OnDestroy {
|
||||
public isCompactMode = true;
|
||||
public isCompactMode = false;
|
||||
public poll: Poll;
|
||||
public pollSlug: string;
|
||||
public passHash: string;
|
||||
|
@ -3,6 +3,7 @@
|
||||
<div class="column">
|
||||
<label class="label">{{ choice.name }}</label>
|
||||
</div>
|
||||
|
||||
<div class="column is-narrow">
|
||||
<div class="buttons has-addons is-right" (click)="openModal(choice)">
|
||||
<button class="button is-white">
|
||||
|
@ -2,15 +2,17 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th *ngFor="let choice of poll.choices">{{ choice.label }}</th>
|
||||
<th *ngFor="let choice of poll.choices">
|
||||
{{ choice.name }}
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<ng-container *ngFor="let item of buildAnswersByChoiceLabelByPseudo() | keyvalue">
|
||||
<tr>
|
||||
<td>{{ item.key }}</td>
|
||||
<td *ngFor="let subItem of item.value | keyvalue">{{ subItem.value }}</td>
|
||||
</tr>
|
||||
</ng-container>
|
||||
<!-- <ng-container *ngFor="let item of buildAnswersByChoiceLabelByPseudo() | keyvalue">-->
|
||||
<!-- <tr>-->
|
||||
<!-- <td>{{ item.key }}</td>-->
|
||||
<!-- <td *ngFor="let subItem of item.name | keyvalue">{{ subItem.name }}</td>-->
|
||||
<!-- </tr>-->
|
||||
<!-- </ng-container>-->
|
||||
</tbody>
|
||||
</table>
|
||||
|
Loading…
Reference in New Issue
Block a user