2017-12-15 21:39:18 +00:00
|
|
|
import { inject as controller } from '@ember/controller';
|
|
|
|
import { inject as service } from '@ember/service';
|
|
|
|
import Mixin from '@ember/object/mixin';
|
2017-10-23 23:59:30 +00:00
|
|
|
|
2020-06-09 21:03:28 +00:00
|
|
|
// eslint-disable-next-line ember/no-new-mixins
|
2017-10-23 23:59:30 +00:00
|
|
|
export default Mixin.create({
|
2017-12-15 21:39:18 +00:00
|
|
|
system: service(),
|
|
|
|
jobsController: controller('jobs'),
|
2017-10-23 23:59:30 +00:00
|
|
|
|
|
|
|
actions: {
|
|
|
|
gotoJobs(namespace) {
|
|
|
|
// Since the setupController hook doesn't fire when transitioning up the
|
|
|
|
// route hierarchy, the two sides of the namespace bindings need to be manipulated
|
|
|
|
// in order for the jobs route model to reload.
|
|
|
|
this.set('jobsController.jobNamespace', namespace.get('id'));
|
|
|
|
this.transitionToRoute('jobs');
|
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|