1
0
Fork 0
Dieser Commit ist enthalten in:
Angus McLeod 2022-10-05 17:20:25 +02:00
Ursprung 1f077ce22b
Commit 94e1d4988d
4 geänderte Dateien mit 10 neuen und 8 gelöschten Zeilen

Datei anzeigen

@ -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);
} }

Datei anzeigen

@ -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
}

Datei anzeigen

@ -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);
}, },