2017-12-15 21:39:18 +00:00
|
|
|
import Component from '@ember/component';
|
2017-09-26 18:57:46 +00:00
|
|
|
import { lazyClick } from '../helpers/lazy-click';
|
2017-09-19 14:47:10 +00:00
|
|
|
|
|
|
|
export default Component.extend({
|
|
|
|
tagName: 'tr',
|
|
|
|
classNames: ['job-row', 'is-interactive'],
|
|
|
|
|
|
|
|
job: null,
|
|
|
|
|
|
|
|
onClick() {},
|
|
|
|
|
|
|
|
click(event) {
|
2017-09-26 18:57:46 +00:00
|
|
|
lazyClick([this.get('onClick'), event]);
|
2017-09-19 14:47:10 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
didReceiveAttrs() {
|
|
|
|
// Reload the job in order to get detail information
|
|
|
|
const job = this.get('job');
|
2017-10-23 17:29:26 +00:00
|
|
|
if (job && !job.get('isLoading')) {
|
2017-09-19 14:47:10 +00:00
|
|
|
job.reload();
|
|
|
|
}
|
|
|
|
},
|
|
|
|
});
|