Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-24 02:10:29 +01:00
27 Zeilen
692 B
JavaScript
27 Zeilen
692 B
JavaScript
import DiscourseRoute from "discourse/routes/discourse";
|
|
import { ajax } from "discourse/lib/ajax";
|
|
import { inject as service } from "@ember/service";
|
|
|
|
export default DiscourseRoute.extend({
|
|
router: service(),
|
|
|
|
model() {
|
|
return ajax(`/admin/wizards/wizard`);
|
|
},
|
|
|
|
setupController(controller, model) {
|
|
const showParams = this.paramsFor("adminWizardsLogsShow");
|
|
|
|
controller.setProperties({
|
|
wizardId: showParams.wizardId,
|
|
wizardList: model.wizard_list,
|
|
});
|
|
},
|
|
|
|
actions: {
|
|
changeWizard(wizardId) {
|
|
this.controllerFor("adminWizardsLogs").set("wizardId", wizardId);
|
|
this.router.transitionTo("adminWizardsLogsShow", wizardId);
|
|
},
|
|
},
|
|
});
|