0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-10 12:22:54 +01:00
discourse-custom-wizard/assets/javascripts/discourse/routes/admin-wizards-custom-fields.js.es6

22 Zeilen
561 B
Text

2020-10-17 03:31:07 +02:00
import DiscourseRoute from "discourse/routes/discourse";
import CustomWizardCustomField from "../models/custom-wizard-custom-field";
2020-10-17 03:31:07 +02:00
import { A } from "@ember/array";
export default DiscourseRoute.extend({
model() {
return CustomWizardCustomField.listFields();
2020-10-17 03:31:07 +02:00
},
2020-10-17 03:31:07 +02:00
setupController(controller, model) {
2021-09-03 10:46:32 +02:00
const customFields = A(model.custom_fields || []);
2021-09-24 11:58:42 +02:00
const subscribed = model.subscribed;
const subscription = model.subscription;
2021-09-03 10:46:32 +02:00
controller.setProperties({
customFields,
2021-09-24 11:58:42 +02:00
subscribed,
subscription,
2021-09-03 10:46:32 +02:00
});
},
});