funky-framadate-front/src/app/features/consultation/poll-results-detailed/poll-results-detailed.compo...

23 lines
731 B
TypeScript
Raw Normal View History

2020-05-12 19:16:23 +02:00
import { Component, Input, OnInit } from '@angular/core';
2020-06-12 19:17:39 +02:00
import { Answer } from '../../../core/enums/answer.enum';
2020-05-12 19:16:23 +02:00
import { Poll } from '../../../core/models/poll.model';
2020-06-12 19:17:39 +02:00
import { PollService } from '../../../core/services/poll.service';
2020-05-12 19:16:23 +02:00
@Component({
selector: 'app-poll-results-detailed',
templateUrl: './poll-results-detailed.component.html',
styleUrls: ['./poll-results-detailed.component.scss'],
})
export class PollResultsDetailedComponent implements OnInit {
@Input() public poll: Poll;
2020-06-12 19:17:39 +02:00
constructor(private pollService: PollService) {}
2020-05-12 19:16:23 +02:00
ngOnInit(): void {}
2020-06-12 19:17:39 +02:00
public buildAnswersByChoiceLabelByPseudo(): Map<string, Map<string, Answer>> {
return this.pollService.buildAnswersByChoiceLabelByPseudo(this.poll);
}
2020-05-12 19:16:23 +02:00
}