Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-30 04:30:29 +01:00
17 Zeilen
417 B
JavaScript
17 Zeilen
417 B
JavaScript
import CustomWizard from '../models/custom-wizard';
|
|
|
|
export default Discourse.Route.extend({
|
|
model() {
|
|
return CustomWizard.all();
|
|
},
|
|
|
|
afterModel(model, transition) {
|
|
if (transition.intent.name !== 'adminWizardSubmissions' && model.length > 0) {
|
|
this.transitionTo('adminWizardSubmissions', model[0].id);
|
|
}
|
|
},
|
|
|
|
setupController(controller, model){
|
|
controller.set("model", model);
|
|
}
|
|
});
|