2017-10-13 15:02:34 +02:00
|
|
|
export default Ember.Route.extend({
|
2017-09-29 13:27:03 +02:00
|
|
|
beforeModel() {
|
2017-10-13 15:02:34 +02:00
|
|
|
const appModel = this.modelFor('custom');
|
2017-10-22 05:37:58 +02:00
|
|
|
|
|
|
|
if (appModel) {
|
|
|
|
if (appModel.completed) {
|
|
|
|
this.set('completed', true);
|
|
|
|
} else if (appModel.start) {
|
|
|
|
this.replaceWith('custom.step', appModel.start);
|
|
|
|
}
|
2017-10-13 15:02:34 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
setupController(controller) {
|
|
|
|
const completed = this.get('completed');
|
|
|
|
controller.set('completed', completed);
|
2017-09-29 13:27:03 +02:00
|
|
|
}
|
|
|
|
});
|