0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-27 03:20:27 +01:00
discourse-custom-wizard/assets/javascripts/discourse/routes/admin-wizards-submissions.js.es6
Angus McLeod ab18769820 various
2020-04-13 22:17:22 +10:00

24 Zeilen
Kein EOL
639 B
JavaScript

import DiscourseRoute from "discourse/routes/discourse";
import { ajax } from 'discourse/lib/ajax';
export default DiscourseRoute.extend({
model() {
return ajax(`/admin/wizards/wizard`);
},
setupController(controller, model) {
const showParams = this.paramsFor('adminWizardsSubmissionsShow');
controller.setProperties({
wizardId: showParams.wizardId,
wizardList: model.wizard_list
})
},
actions: {
changeWizard(wizardId) {
this.controllerFor('adminWizardsSubmissions').set('wizardId', wizardId);
this.transitionTo('adminWizardsSubmissionsShow', wizardId);
}
}
});