From 6782da1992eac427d4a2ebbbe292fc4f6bea721e Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Thu, 9 Oct 2025 16:00:16 +0000 Subject: [PATCH] Fix: Display all fields for submissions --- src/components/moderation/SubmissionChangesDisplay.tsx | 2 +- src/lib/submissionChangeDetection.ts | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/moderation/SubmissionChangesDisplay.tsx b/src/components/moderation/SubmissionChangesDisplay.tsx index 1e93e0f1..04cf1d49 100644 --- a/src/components/moderation/SubmissionChangesDisplay.tsx +++ b/src/components/moderation/SubmissionChangesDisplay.tsx @@ -221,7 +221,7 @@ export function SubmissionChangesDisplay({ )} - {changes.action === 'edit' && changes.totalChanges > 0 && ( + {(changes.action === 'create' || changes.action === 'edit') && changes.totalChanges > 0 && ( <> {changes.fieldChanges.length > 0 && (
diff --git a/src/lib/submissionChangeDetection.ts b/src/lib/submissionChangeDetection.ts index 1675a8cc..e51b93ee 100644 --- a/src/lib/submissionChangeDetection.ts +++ b/src/lib/submissionChangeDetection.ts @@ -149,9 +149,13 @@ export async function detectChanges( let hasLocationChange = false; if (action === 'create') { - // For creates, all fields are "added" + // For creates, all fields are "added" - be more permissive to show all data Object.entries(itemData).forEach(([key, value]) => { - if (shouldTrackField(key) && value !== null && value !== undefined && value !== '') { + // For creates, exclude only system fields and internal metadata + const systemFields = ['id', 'created_at', 'updated_at', 'slug', 'images', 'image_assignments']; + const shouldShow = !systemFields.includes(key) && value !== null && value !== undefined && value !== ''; + + if (shouldShow) { fieldChanges.push({ field: key, oldValue: null,