2018-05-22 15:03:45 +00:00
|
|
|
import Route from '@ember/routing/route';
|
|
|
|
import { inject as service } from '@ember/service';
|
|
|
|
import { hash } from 'rsvp';
|
|
|
|
|
2020-07-09 09:08:47 +00:00
|
|
|
export default Route.extend({
|
2018-10-26 16:36:15 +00:00
|
|
|
repo: service('repository/intention'),
|
2020-04-16 14:15:45 +00:00
|
|
|
model: function(params, transition) {
|
2019-12-17 18:47:37 +00:00
|
|
|
const dc = this.modelFor('dc').dc.Name;
|
|
|
|
const nspace = '*';
|
2018-05-22 15:03:45 +00:00
|
|
|
return hash({
|
|
|
|
isLoading: false,
|
2020-07-09 09:08:47 +00:00
|
|
|
dc: dc,
|
|
|
|
nspace: nspace,
|
|
|
|
item:
|
|
|
|
typeof params.id !== 'undefined' ? this.repo.findBySlug(params.id, dc, nspace) : undefined,
|
2018-05-22 15:03:45 +00:00
|
|
|
});
|
|
|
|
},
|
|
|
|
setupController: function(controller, model) {
|
|
|
|
controller.setProperties(model);
|
|
|
|
},
|
|
|
|
});
|