Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-24 10:20:28 +01:00
cf50a7deb3
* Apply prettier * applied prettier for similar-topics-validator Co-authored-by: Faizaan Gagan <fzngagan@gmail.com>
24 Zeilen
632 B
JavaScript
24 Zeilen
632 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);
|
|
},
|
|
},
|
|
});
|