0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-29 20:20:29 +01:00
discourse-custom-wizard/assets/javascripts/discourse/routes/admin-wizards-submissions-show.js.es6

25 Zeilen
674 B
Text

2021-07-14 08:04:19 +02:00
import { A } from "@ember/array";
import EmberObject from "@ember/object";
import DiscourseRoute from "discourse/routes/discourse";
import CustomWizard from "../models/custom-wizard";
2020-03-21 18:30:11 +01:00
export default DiscourseRoute.extend({
2017-10-05 02:36:46 +02:00
model(params) {
2020-04-13 14:17:22 +02:00
return CustomWizard.submissions(params.wizardId);
2017-10-05 02:36:46 +02:00
},
setupController(controller, model) {
const fields = model.fields.map((f) => {
const fieldsObject = EmberObject.create(f);
fieldsObject.enabled = true;
return fieldsObject;
});
2021-07-14 08:04:19 +02:00
controller.setProperties({
wizard: model.wizard,
fields: A(fields),
2021-07-14 08:04:19 +02:00
submissions: A(model.submissions),
2021-07-14 08:05:13 +02:00
total: model.total,
2021-07-14 08:04:19 +02:00
});
},
2017-10-05 02:36:46 +02:00
});