2020-01-18 10:13:50 +01:00
|
|
|
import classic from 'ember-classic-decorator';
|
2019-04-20 23:29:59 +02:00
|
|
|
import { readOnly } from '@ember/object/computed';
|
2020-01-18 10:13:50 +01:00
|
|
|
import Component from '@ember/component';
|
2019-04-20 23:29:59 +02:00
|
|
|
import { raw } from 'ember-awesome-macros';
|
|
|
|
import { groupBy, sort } from 'ember-awesome-macros/array';
|
2015-11-12 15:52:14 +01:00
|
|
|
|
2020-01-18 10:13:50 +01:00
|
|
|
@classic
|
|
|
|
export default class PollEvaluationParticipantsTable extends Component {
|
|
|
|
@readOnly('poll.hasTimes')
|
|
|
|
hasTimes;
|
|
|
|
|
|
|
|
@readOnly('poll.isFindADate')
|
|
|
|
isFindADate;
|
|
|
|
|
|
|
|
@readOnly('poll.isFreeText')
|
|
|
|
isFreeText;
|
|
|
|
|
|
|
|
@readOnly('poll.options')
|
|
|
|
options;
|
2015-11-12 15:52:14 +01:00
|
|
|
|
2020-01-18 10:13:50 +01:00
|
|
|
@groupBy('options', raw('day'))
|
|
|
|
optionsGroupedByDays;
|
2015-11-12 15:52:14 +01:00
|
|
|
|
2020-01-18 10:13:50 +01:00
|
|
|
@readOnly('poll.users')
|
|
|
|
users;
|
2015-11-12 15:52:14 +01:00
|
|
|
|
2020-01-18 10:13:50 +01:00
|
|
|
@sort('users', ['creationDate'])
|
|
|
|
usersSorted;
|
|
|
|
}
|