Fix moderation queue issues

This commit is contained in:
gpt-engineer-app[bot]
2025-11-03 16:43:21 +00:00
parent 47b317b7c0
commit eee4b1c626
7 changed files with 220 additions and 27 deletions

View File

@@ -161,10 +161,10 @@ export interface ModerationItem {
/** Raw content data (structure varies by type) */
content: any;
/** Timestamp when the item was created */
/** Timestamp when the item was created (primary field) */
created_at: string;
/** Timestamp when the item was submitted */
/** Timestamp when the item was submitted (same as created_at) */
submitted_at?: string;
/** Timestamp when the item was last updated */
@@ -173,13 +173,40 @@ export interface ModerationItem {
/** ID of the user who submitted this item */
user_id: string;
/** ID of the submitter (from view, same as user_id) */
submitter_id?: string;
/** Current status of the item */
status: string;
/** Type of submission (e.g., 'park', 'ride', 'review') */
submission_type?: string;
/** Pre-loaded submitter profile from view */
/** Pre-loaded submitter profile from view (new structure) */
submitter_profile?: {
user_id: string;
username: string;
display_name?: string | null;
avatar_url?: string | null;
};
/** Pre-loaded reviewer profile from view (new structure) */
reviewer_profile?: {
user_id: string;
username: string;
display_name?: string | null;
avatar_url?: string | null;
};
/** Pre-loaded assigned moderator profile from view */
assigned_profile?: {
user_id: string;
username: string;
display_name?: string | null;
avatar_url?: string | null;
};
/** Legacy: Submitter (old field name for backward compatibility) */
submitter?: {
user_id: string;
username: string;
@@ -187,7 +214,7 @@ export interface ModerationItem {
avatar_url?: string;
};
/** Pre-loaded reviewer profile from view */
/** Legacy: Reviewer (old field name for backward compatibility) */
reviewer?: {
user_id: string;
username: string;
@@ -198,8 +225,8 @@ export interface ModerationItem {
/** Legacy: Profile information of the submitting user */
user_profile?: {
username: string;
display_name?: string;
avatar_url?: string;
display_name?: string | null;
avatar_url?: string | null;
};
/** Display name of the entity being modified */
@@ -220,13 +247,6 @@ export interface ModerationItem {
/** Notes left by the reviewing moderator */
reviewer_notes?: string;
/** Legacy: Profile information of the reviewing moderator */
reviewer_profile?: {
username: string;
display_name?: string;
avatar_url?: string;
};
/** Whether this submission has been escalated for senior review */
escalated?: boolean;