0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-29 12:20:27 +01:00
discourse-custom-wizard/assets/javascripts/discourse/routes/admin-wizards-submissions.js.es6
Angus McLeod 9f40821db0 Various
2017-10-06 10:59:02 +08:00

17 Zeilen
432 B
JavaScript

import CustomWizard from '../models/custom-wizard';
export default Discourse.Route.extend({
model() {
return CustomWizard.findAllSubmissions();
},
afterModel(model, transition) {
if (transition.intent.name !== 'adminWizardSubmissions' && model.length > 0) {
this.transitionTo('adminWizardSubmissions', model[0].id);
}
},
setupController(controller, model){
controller.set("model", model);
}
});