mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-24 14:31:22 -05:00
Fix: Correctly drop and recreate claim_next_submission function
This commit is contained in:
@@ -173,11 +173,10 @@ export const ModerationQueue = forwardRef<ModerationQueueRef>((props, ref) => {
|
||||
reviewer_id,
|
||||
reviewer_notes,
|
||||
escalated,
|
||||
priority,
|
||||
assigned_to,
|
||||
locked_until
|
||||
`)
|
||||
.order('priority', { ascending: false })
|
||||
.order('escalated', { ascending: false })
|
||||
.order('created_at', { ascending: true });
|
||||
|
||||
// Apply tab-based status filtering
|
||||
@@ -2025,15 +2024,11 @@ export const ModerationQueue = forwardRef<ModerationQueueRef>((props, ref) => {
|
||||
<CardContent className="p-4">
|
||||
<div className="flex flex-col sm:flex-row gap-4 items-start sm:items-center justify-between">
|
||||
{/* Stats Grid */}
|
||||
<div className="grid grid-cols-2 sm:grid-cols-4 gap-4 flex-1">
|
||||
<div className="grid grid-cols-2 sm:grid-cols-3 gap-4 flex-1">
|
||||
<div className="text-center sm:text-left">
|
||||
<div className="text-2xl font-bold text-primary">{queue.queueStats.pendingCount}</div>
|
||||
<div className="text-xs text-muted-foreground">Pending</div>
|
||||
</div>
|
||||
<div className="text-center sm:text-left">
|
||||
<div className="text-2xl font-bold text-amber-600 dark:text-amber-400">{queue.queueStats.highPriorityCount}</div>
|
||||
<div className="text-xs text-muted-foreground">High Priority</div>
|
||||
</div>
|
||||
<div className="text-center sm:text-left">
|
||||
<div className="text-2xl font-bold text-blue-600 dark:text-blue-400">{queue.queueStats.assignedToMe}</div>
|
||||
<div className="text-xs text-muted-foreground">Assigned to Me</div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
|
||||
import { Badge } from '@/components/ui/badge';
|
||||
import { Clock, AlertTriangle, CheckCircle, Users } from 'lucide-react';
|
||||
import { Clock, CheckCircle, Users } from 'lucide-react';
|
||||
import { useModerationQueue } from '@/hooks/useModerationQueue';
|
||||
|
||||
export function QueueStatsDashboard() {
|
||||
@@ -19,7 +19,7 @@ export function QueueStatsDashboard() {
|
||||
const slaStatus = getSLAStatus(queueStats.avgWaitHours);
|
||||
|
||||
return (
|
||||
<div className="grid grid-cols-1 md:grid-cols-4 gap-4 mb-6">
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-4 mb-6">
|
||||
<Card>
|
||||
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
|
||||
<CardTitle className="text-sm font-medium">Pending Queue</CardTitle>
|
||||
@@ -70,21 +70,6 @@ export function QueueStatsDashboard() {
|
||||
</p>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
<Card>
|
||||
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
|
||||
<CardTitle className="text-sm font-medium">High Priority</CardTitle>
|
||||
<AlertTriangle className="h-4 w-4 text-muted-foreground" />
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<div className="text-2xl font-bold text-destructive">
|
||||
{queueStats.highPriorityCount}
|
||||
</div>
|
||||
<p className="text-xs text-muted-foreground mt-1">
|
||||
Escalated submissions
|
||||
</p>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user