2018-01-25 17:32:34 +00:00
|
|
|
import Component from '@ember/component';
|
2018-02-02 17:49:18 +00:00
|
|
|
import { inject as service } from '@ember/service';
|
2020-06-10 13:49:16 +00:00
|
|
|
import { action } from '@ember/object';
|
|
|
|
import classic from 'ember-classic-decorator';
|
2018-01-25 17:32:34 +00:00
|
|
|
|
2020-06-10 13:49:16 +00:00
|
|
|
@classic
|
|
|
|
export default class Abstract extends Component {
|
|
|
|
@service system;
|
2018-02-02 17:49:18 +00:00
|
|
|
|
2020-06-10 13:49:16 +00:00
|
|
|
job = null;
|
2018-01-25 17:32:34 +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:32:34 +00:00
|
|
|
|
|
|
|
// Provide actions that require routing
|
2020-06-10 13:49:16 +00:00
|
|
|
gotoTaskGroup() {}
|
|
|
|
gotoJob() {}
|
2018-01-25 17:32:34 +00:00
|
|
|
|
2018-04-19 17:17:47 +00:00
|
|
|
// Set to a { title, description } to surface an error
|
2020-06-10 13:49:16 +00:00
|
|
|
errorMessage = null;
|
2018-04-19 17:17:47 +00:00
|
|
|
|
2020-06-10 13:49:16 +00:00
|
|
|
@action
|
|
|
|
clearErrorMessage() {
|
|
|
|
this.set('errorMessage', null);
|
|
|
|
}
|
|
|
|
|
|
|
|
@action
|
|
|
|
handleError(errorObject) {
|
|
|
|
this.set('errorMessage', errorObject);
|
|
|
|
}
|
|
|
|
}
|