mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-22 07:31:12 -05:00
Fix: Show moderator edits in creation submissions
This commit is contained in:
@@ -229,10 +229,15 @@ export function SubmissionChangesDisplay({
|
||||
<h4 className="text-sm font-medium">Creation Data (with moderator edits highlighted)</h4>
|
||||
<div className="grid gap-2">
|
||||
{changes.fieldChanges.map((change, idx) => {
|
||||
// Highlight fields that were modified (not just added)
|
||||
const wasEditedByModerator = change.changeType === 'modified' &&
|
||||
item.original_data &&
|
||||
item.original_data[change.field] !== undefined;
|
||||
// Highlight fields that were added OR modified by moderator
|
||||
const wasEditedByModerator = item.original_data &&
|
||||
Object.keys(item.original_data).length > 0 &&
|
||||
(
|
||||
// Field was modified from original value
|
||||
(change.changeType === 'modified') ||
|
||||
// Field was added by moderator (not in original submission)
|
||||
(change.changeType === 'added' && item.original_data[change.field] === undefined)
|
||||
);
|
||||
|
||||
return (
|
||||
<div key={idx} className={wasEditedByModerator ? 'border-l-4 border-blue-500 pl-3 bg-blue-50/50 dark:bg-blue-950/30 rounded' : ''}>
|
||||
|
||||
Reference in New Issue
Block a user