funky-framadate-front/src/app/pages/voting/voting-summary/voting-summary.component.ts

41 lines
817 B
TypeScript
Raw Normal View History

import {Component, Input, OnInit} from '@angular/core';
2020-01-16 10:20:15 +01:00
import {ConfigService} from "../../../services/config.service";
2020-01-20 14:36:26 +01:00
import {mockPoll3} from "../../../config/mocks/mock-poll3";
2019-08-21 14:28:50 +02:00
@Component({
selector: 'framadate-voting-summary',
templateUrl: './voting-summary.component.html',
styleUrls: ['./voting-summary.component.scss']
2019-08-21 14:28:50 +02:00
})
export class VotingSummaryComponent implements OnInit {
preferred: string = 'rien';
@Input() pollconfig = mockPoll3;
constructor(public config: ConfigService) {
2019-08-21 14:28:50 +02:00
}
2019-08-21 14:28:50 +02:00
ngOnInit() {
this.computePreferred();
}
2020-01-29 17:30:39 +01:00
getKeys(obj) {
return Object.keys(obj)
}
/**
* find the most "yes"
*/
computePreferred() {
this.pollconfig.stacks.forEach(stack => {
// find the favourite
});
}
2019-08-21 14:28:50 +02:00
}