2019-10-23 12:39:32 -04:00
|
|
|
import Route from "@ember/routing/route";
|
|
|
|
export default Route.extend({
|
2016-08-24 14:35:07 -04:00
|
|
|
model(params) {
|
2016-08-25 13:14:56 -04:00
|
|
|
const allSteps = this.modelFor("application").steps;
|
2016-10-26 15:44:36 -04:00
|
|
|
const step = allSteps.findBy("id", params.step_id);
|
2016-08-31 13:35:49 -04:00
|
|
|
return step ? step : allSteps[0];
|
2016-08-24 14:35:07 -04:00
|
|
|
},
|
|
|
|
|
2016-08-25 13:14:56 -04:00
|
|
|
setupController(controller, step) {
|
2016-09-19 16:11:15 -04:00
|
|
|
this.controllerFor("application").set("currentStepId", step.get("id"));
|
|
|
|
|
2016-08-25 13:14:56 -04:00
|
|
|
controller.setProperties({
|
|
|
|
step,
|
|
|
|
wizard: this.modelFor("application"),
|
|
|
|
});
|
2016-08-24 14:35:07 -04:00
|
|
|
},
|
|
|
|
});
|