Add AI Assignment toggle and Tags tab to settings

- Add "Use AI" button to assignments page to switch between algorithmic and GPT-powered suggestions
- Normalize AI suggestions format to match algorithmic format for consistent UI
- Add Tags tab to Settings page with link to expertise tags management
- AI assignment mode shows GPT-analyzed suggestions with confidence scores

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-04 16:56:07 +01:00
parent c0f318a867
commit c45a428d8b
2 changed files with 99 additions and 17 deletions

View File

@@ -18,7 +18,11 @@ import {
Shield,
Settings as SettingsIcon,
Bell,
Tags,
ExternalLink,
} from 'lucide-react'
import Link from 'next/link'
import { Button } from '@/components/ui/button'
import { AISettingsForm } from './ai-settings-form'
import { AIUsageCard } from './ai-usage-card'
import { BrandingSettingsForm } from './branding-settings-form'
@@ -110,11 +114,15 @@ export function SettingsContent({ initialSettings }: SettingsContentProps) {
return (
<Tabs defaultValue="ai" className="space-y-6">
<TabsList className="grid w-full grid-cols-3 lg:grid-cols-7">
<TabsList className="grid w-full grid-cols-4 lg:grid-cols-8">
<TabsTrigger value="ai" className="gap-2">
<Bot className="h-4 w-4" />
<span className="hidden sm:inline">AI</span>
</TabsTrigger>
<TabsTrigger value="tags" className="gap-2">
<Tags className="h-4 w-4" />
<span className="hidden sm:inline">Tags</span>
</TabsTrigger>
<TabsTrigger value="branding" className="gap-2">
<Palette className="h-4 w-4" />
<span className="hidden sm:inline">Branding</span>
@@ -156,6 +164,38 @@ export function SettingsContent({ initialSettings }: SettingsContentProps) {
<AIUsageCard />
</TabsContent>
<TabsContent value="tags">
<Card>
<CardHeader>
<CardTitle className="flex items-center gap-2">
<Tags className="h-5 w-5" />
Expertise Tags
</CardTitle>
<CardDescription>
Manage tags used for jury expertise, project categorization, and AI-powered matching
</CardDescription>
</CardHeader>
<CardContent className="space-y-4">
<p className="text-sm text-muted-foreground">
Expertise tags are used across the platform to:
</p>
<ul className="text-sm text-muted-foreground list-disc list-inside space-y-1">
<li>Categorize jury members by their areas of expertise</li>
<li>Tag projects for better organization and filtering</li>
<li>Power AI-based project tagging</li>
<li>Enable smart jury-project matching</li>
</ul>
<Button asChild>
<Link href="/admin/settings/tags">
<Tags className="mr-2 h-4 w-4" />
Manage Expertise Tags
<ExternalLink className="ml-2 h-3 w-3" />
</Link>
</Button>
</CardContent>
</Card>
</TabsContent>
<TabsContent value="branding">
<Card>
<CardHeader>