2018-01-25 17:31:48 +00:00
|
|
|
import Component from '@ember/component';
|
|
|
|
import { computed } from '@ember/object';
|
|
|
|
import { alias } from '@ember/object/computed';
|
|
|
|
import Sortable from 'nomad-ui/mixins/sortable';
|
2020-06-10 13:49:16 +00:00
|
|
|
import { classNames } from '@ember-decorators/component';
|
|
|
|
import classic from 'ember-classic-decorator';
|
2018-01-25 17:31:48 +00:00
|
|
|
|
2020-06-10 13:49:16 +00:00
|
|
|
@classic
|
|
|
|
@classNames('boxed-section')
|
|
|
|
export default class TaskGroups extends Component.extend(Sortable) {
|
|
|
|
job = null;
|
2018-01-25 17:31:48 +00:00
|
|
|
|
|
|
|
// Provide a value that is bound to a query param
|
2020-06-10 13:49:16 +00:00
|
|
|
sortProperty = null;
|
|
|
|
sortDescending = null;
|
2018-01-25 17:31:48 +00:00
|
|
|
|
2018-01-25 22:18:53 +00:00
|
|
|
// Provide an action with access to the router
|
2020-06-10 13:49:16 +00:00
|
|
|
gotoTaskGroup() {}
|
2018-01-25 17:31:48 +00:00
|
|
|
|
2020-06-10 13:49:16 +00:00
|
|
|
@computed('job.taskGroups.[]')
|
|
|
|
get taskGroups() {
|
2018-01-25 17:31:48 +00:00
|
|
|
return this.get('job.taskGroups') || [];
|
2020-06-10 13:49:16 +00:00
|
|
|
}
|
2018-01-25 17:31:48 +00:00
|
|
|
|
2020-06-10 13:49:16 +00:00
|
|
|
@alias('taskGroups') listToSort;
|
|
|
|
@alias('listSorted') sortedTaskGroups;
|
|
|
|
}
|