2016-08-25 02:35:07 +08:00
|
|
|
export default Ember.Route.extend({
|
|
|
|
model(params) {
|
2018-06-15 23:03:24 +08:00
|
|
|
const allSteps = this.modelFor("application").steps;
|
|
|
|
const step = allSteps.findBy("id", params.step_id);
|
2016-09-01 01:35:49 +08:00
|
|
|
return step ? step : allSteps[0];
|
2016-08-25 02:35:07 +08:00
|
|
|
},
|
|
|
|
|
2016-08-26 01:14:56 +08:00
|
|
|
setupController(controller, step) {
|
2018-06-15 23:03:24 +08:00
|
|
|
this.controllerFor("application").set("currentStepId", step.get("id"));
|
2016-09-20 04:11:15 +08:00
|
|
|
|
2016-08-26 01:14:56 +08:00
|
|
|
controller.setProperties({
|
2018-06-15 23:03:24 +08:00
|
|
|
step,
|
|
|
|
wizard: this.modelFor("application")
|
2016-08-26 01:14:56 +08:00
|
|
|
});
|
2016-08-25 02:35:07 +08:00
|
|
|
}
|
|
|
|
});
|