decide.nolog.cz/app/components/poll-evaluation-participants-table.js
jelhan bb160cc503
refactor participants table (#164)
- Drops floatthead and additional scrollbar
- Makes header and first column sticky
- Refactors code for readability

Sticky header is only working in Firefox. Chrome and Edge does not support `position: sticky` for `<thead>`. Haven't tested Safari.
2019-04-20 23:29:59 +02:00

17 lines
540 B
JavaScript

import Component from '@ember/component';
import { readOnly } from '@ember/object/computed';
import { raw } from 'ember-awesome-macros';
import { groupBy, sort } from 'ember-awesome-macros/array';
export default Component.extend({
hasTimes: readOnly('poll.hasTimes'),
isFindADate: readOnly('poll.isFindADate'),
isFreeText: readOnly('poll.isFreeText'),
options: readOnly('poll.options'),
optionsGroupedByDays: groupBy('options', raw('day')),
users: readOnly('poll.users'),
usersSorted: sort('users', ['creationDate']),
});