Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-22 09:20:29 +01:00
Fix linting
Dieser Commit ist enthalten in:
Ursprung
1f077ce22b
Commit
94e1d4988d
4 geänderte Dateien mit 10 neuen und 8 gelöschten Zeilen
|
@ -20,7 +20,7 @@ export default Controller.extend({
|
||||||
CustomWizardAdmin.submissions(wizardId, page)
|
CustomWizardAdmin.submissions(wizardId, page)
|
||||||
.then((result) => {
|
.then((result) => {
|
||||||
if (result.submissions) {
|
if (result.submissions) {
|
||||||
const { fields, submissions } = formatModel(result);
|
const { submissions } = formatModel(result);
|
||||||
|
|
||||||
this.get("submissions").pushObjects(submissions);
|
this.get("submissions").pushObjects(submissions);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,11 @@ import EmberObject from "@ember/object";
|
||||||
|
|
||||||
function formatModel(model) {
|
function formatModel(model) {
|
||||||
let fields = [
|
let fields = [
|
||||||
EmberObject.create({ id: "submitted_at", label: "Submitted At", enabled: true }),
|
EmberObject.create({
|
||||||
|
id: "submitted_at",
|
||||||
|
label: "Submitted At",
|
||||||
|
enabled: true,
|
||||||
|
}),
|
||||||
EmberObject.create({ id: "username", label: "User", enabled: true }),
|
EmberObject.create({ id: "username", label: "User", enabled: true }),
|
||||||
];
|
];
|
||||||
let submissions = [];
|
let submissions = [];
|
||||||
|
@ -32,6 +36,4 @@ function formatModel(model) {
|
||||||
return { fields, submissions };
|
return { fields, submissions };
|
||||||
}
|
}
|
||||||
|
|
||||||
export {
|
export { formatModel };
|
||||||
formatModel
|
|
||||||
}
|
|
||||||
|
|
|
@ -215,8 +215,8 @@ CustomWizardAdmin.reopenClass({
|
||||||
return ajax(`/admin/wizards/submissions/${wizardId}`, {
|
return ajax(`/admin/wizards/submissions/${wizardId}`, {
|
||||||
type: "GET",
|
type: "GET",
|
||||||
data: {
|
data: {
|
||||||
page
|
page,
|
||||||
}
|
},
|
||||||
}).catch(popupAjaxError);
|
}).catch(popupAjaxError);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Laden …
In neuem Issue referenzieren