mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-22 08:31:15 -05:00
Fix: Display all fields for submissions
This commit is contained in:
@@ -221,7 +221,7 @@ export function SubmissionChangesDisplay({
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{changes.action === 'edit' && changes.totalChanges > 0 && (
|
{(changes.action === 'create' || changes.action === 'edit') && changes.totalChanges > 0 && (
|
||||||
<>
|
<>
|
||||||
{changes.fieldChanges.length > 0 && (
|
{changes.fieldChanges.length > 0 && (
|
||||||
<div className="flex flex-col gap-2">
|
<div className="flex flex-col gap-2">
|
||||||
|
|||||||
@@ -149,9 +149,13 @@ export async function detectChanges(
|
|||||||
let hasLocationChange = false;
|
let hasLocationChange = false;
|
||||||
|
|
||||||
if (action === 'create') {
|
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]) => {
|
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({
|
fieldChanges.push({
|
||||||
field: key,
|
field: key,
|
||||||
oldValue: null,
|
oldValue: null,
|
||||||
|
|||||||
Reference in New Issue
Block a user