discourse/plugins/poll/assets/javascripts/components/poll-results-number-voters.js.es6

17 lines
509 B
Text
Raw Normal View History

2016-06-07 06:55:01 -04:00
import computed from 'ember-addons/ember-computed-decorators';
import User from 'discourse/models/user';
import PollVoters from 'discourse/plugins/poll/components/poll-voters';
export default PollVoters.extend({
2016-06-09 09:33:17 -04:00
@computed("poll.voters", "pollsVoters")
canLoadMore(voters, pollsVoters) {
return pollsVoters.length < voters;
2016-06-07 06:55:01 -04:00
},
2016-06-09 09:33:17 -04:00
@computed("poll.options", "offset")
voterIds(options) {
const ids = [].concat(...(options.map(option => option.voter_ids)));
return this._getIds(ids);
2016-06-07 06:55:01 -04:00
}
});