Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2025-04-02 05:17:01 +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")
|
||||
displaySubmissions(submissions, fields) {
|
||||
let result = [];
|
||||
let enabledFields = fields.filter((f) => f.enabled);
|
||||
|
||||
submissions.forEach((submission) => {
|
||||
let sub = {};
|
||||
|
||||
Object.keys(submission).forEach((fieldId) => {
|
||||
if (fields.some((f) => f.id === fieldId && f.enabled)) {
|
||||
sub[fieldId] = submission[fieldId];
|
||||
}
|
||||
enabledFields.forEach((field) => {
|
||||
sub[field.id] = submission[field.id];
|
||||
});
|
||||
result.push(sub);
|
||||
});
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
# name: discourse-custom-wizard
|
||||
# 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
|
||||
# url: https://github.com/paviliondev/discourse-custom-wizard
|
||||
# contact_emails: development@pavilion.tech
|
||||
|
|
Laden …
Tabelle hinzufügen
In neuem Issue referenzieren