Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2025-04-11 17:37:02 +02:00
FIX: ensure null fields are displayed in submission admin
Dieser Commit ist enthalten in:
Ursprung
ac347394f9
Commit
ce8ec8e514
2 geänderte Dateien mit 4 neuen und 6 gelöschten Zeilen
|
@ -35,14 +35,12 @@ export default Controller.extend({
|
||||||
@discourseComputed("submissions.[]", "fields.@each.enabled")
|
@discourseComputed("submissions.[]", "fields.@each.enabled")
|
||||||
displaySubmissions(submissions, fields) {
|
displaySubmissions(submissions, fields) {
|
||||||
let result = [];
|
let result = [];
|
||||||
|
let enabledFields = fields.filter((f) => f.enabled);
|
||||||
|
|
||||||
submissions.forEach((submission) => {
|
submissions.forEach((submission) => {
|
||||||
let sub = {};
|
let sub = {};
|
||||||
|
enabledFields.forEach((field) => {
|
||||||
Object.keys(submission).forEach((fieldId) => {
|
sub[field.id] = submission[field.id];
|
||||||
if (fields.some((f) => f.id === fieldId && f.enabled)) {
|
|
||||||
sub[fieldId] = submission[fieldId];
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
result.push(sub);
|
result.push(sub);
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
# name: discourse-custom-wizard
|
# name: discourse-custom-wizard
|
||||||
# about: Forms for Discourse. Better onboarding, structured posting, data enrichment, automated actions and much more.
|
# about: Forms for Discourse. Better onboarding, structured posting, data enrichment, automated actions and much more.
|
||||||
# version: 2.11.1
|
# version: 2.11.2
|
||||||
# authors: Angus McLeod, Faizaan Gagan, Robert Barrow, Keegan George, Kaitlin Maddever, Juan Marcos Gutierrez Ramos
|
# authors: Angus McLeod, Faizaan Gagan, Robert Barrow, Keegan George, Kaitlin Maddever, Juan Marcos Gutierrez Ramos
|
||||||
# url: https://github.com/paviliondev/discourse-custom-wizard
|
# url: https://github.com/paviliondev/discourse-custom-wizard
|
||||||
# contact_emails: development@pavilion.tech
|
# contact_emails: development@pavilion.tech
|
||||||
|
|
Laden …
Tabelle hinzufügen
In neuem Issue referenzieren