2020-10-17 03:31:07 +02:00
|
|
|
import DiscourseRoute from "discourse/routes/discourse";
|
2020-11-08 04:24:20 +01:00
|
|
|
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() {
|
2020-11-08 04:24:20 +01:00
|
|
|
return CustomWizardCustomField.listFields();
|
2020-10-17 03:31:07 +02:00
|
|
|
},
|
2021-03-28 11:06:49 +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;
|
2021-10-23 14:06:12 +02:00
|
|
|
const subscription = model.subscription;
|
2021-09-03 10:46:32 +02:00
|
|
|
|
|
|
|
controller.setProperties({
|
|
|
|
customFields,
|
2021-09-24 11:58:42 +02:00
|
|
|
subscribed,
|
2021-10-23 14:06:12 +02:00
|
|
|
subscription,
|
2021-09-03 10:46:32 +02:00
|
|
|
});
|
2021-03-28 11:06:49 +02:00
|
|
|
},
|
|
|
|
});
|