Spaces:
Running
Running
Avijit Ghosh
commited on
Commit
·
8cfd3a8
1
Parent(s):
7bfe5bc
fixed some bugs
Browse files- app/about/page.tsx +4 -4
- app/evaluation/[id]/page.client.tsx +10 -9
- components/ai-evaluation-dashboard.tsx +25 -20
- components/category-evaluation.tsx +13 -11
- components/evaluation-form.tsx +4 -4
app/about/page.tsx
CHANGED
|
@@ -12,9 +12,9 @@ export default function AboutPage() {
|
|
| 12 |
const { theme, setTheme } = useTheme()
|
| 13 |
|
| 14 |
return (
|
| 15 |
-
<div className="container mx-auto px-4 py-8 max-w-4xl">
|
| 16 |
<div className="mb-6">
|
| 17 |
-
<div className="flex items-center justify-between mb-4">
|
| 18 |
<Link href="/">
|
| 19 |
<Button variant="ghost">
|
| 20 |
<ArrowLeft className="mr-2 h-4 w-4" />
|
|
@@ -32,8 +32,8 @@ export default function AboutPage() {
|
|
| 32 |
<span className="sr-only">Toggle theme</span>
|
| 33 |
</Button>
|
| 34 |
</div>
|
| 35 |
-
<h1 className="text-4xl font-bold mb-2">About AI Evaluation Dashboard</h1>
|
| 36 |
-
<p className="text-xl text-muted-foreground">
|
| 37 |
A comprehensive platform for documenting and sharing AI system evaluations
|
| 38 |
</p>
|
| 39 |
</div>
|
|
|
|
| 12 |
const { theme, setTheme } = useTheme()
|
| 13 |
|
| 14 |
return (
|
| 15 |
+
<div className="container mx-auto px-4 sm:px-6 py-4 sm:py-8 max-w-4xl">
|
| 16 |
<div className="mb-6">
|
| 17 |
+
<div className="flex flex-col sm:flex-row items-start sm:items-center justify-between gap-3 mb-4">
|
| 18 |
<Link href="/">
|
| 19 |
<Button variant="ghost">
|
| 20 |
<ArrowLeft className="mr-2 h-4 w-4" />
|
|
|
|
| 32 |
<span className="sr-only">Toggle theme</span>
|
| 33 |
</Button>
|
| 34 |
</div>
|
| 35 |
+
<h1 className="text-2xl sm:text-3xl lg:text-4xl font-bold mb-2">About AI Evaluation Dashboard</h1>
|
| 36 |
+
<p className="text-lg sm:text-xl text-muted-foreground">
|
| 37 |
A comprehensive platform for documenting and sharing AI system evaluations
|
| 38 |
</p>
|
| 39 |
</div>
|
app/evaluation/[id]/page.client.tsx
CHANGED
|
@@ -294,9 +294,9 @@ export default function EvaluationDetailsPage() {
|
|
| 294 |
|
| 295 |
return (
|
| 296 |
<TooltipProvider>
|
| 297 |
-
<div className="container mx-auto px-4 py-8 max-w-4xl">
|
| 298 |
<div className="mb-6">
|
| 299 |
-
<div className="flex items-center justify-between">
|
| 300 |
<Button onClick={() => router.push("/")} variant="outline" size="sm">
|
| 301 |
<ArrowLeft className="h-4 w-4 mr-2" />
|
| 302 |
Back to Dashboard
|
|
@@ -305,7 +305,7 @@ export default function EvaluationDetailsPage() {
|
|
| 305 |
<Link href="/about">
|
| 306 |
<Button variant="ghost" size="sm">
|
| 307 |
<Info className="h-4 w-4 mr-2" />
|
| 308 |
-
About
|
| 309 |
</Button>
|
| 310 |
</Link>
|
| 311 |
<Button
|
|
@@ -320,13 +320,14 @@ export default function EvaluationDetailsPage() {
|
|
| 320 |
</Button>
|
| 321 |
<Button variant="outline" size="sm" onClick={exportReport}>
|
| 322 |
<Download className="h-4 w-4 mr-2" />
|
| 323 |
-
Export Report
|
|
|
|
| 324 |
</Button>
|
| 325 |
</div>
|
| 326 |
</div>
|
| 327 |
|
| 328 |
<div className="mt-3 text-center">
|
| 329 |
-
<h1 className="text-3xl font-heading">{evaluation.systemName}</h1>
|
| 330 |
<p className="text-muted-foreground">{evaluation.provider}</p>
|
| 331 |
</div>
|
| 332 |
</div>
|
|
@@ -730,13 +731,13 @@ export default function EvaluationDetailsPage() {
|
|
| 730 |
className="cursor-pointer hover:bg-muted/50 transition-colors p-3 -m-3 rounded-lg mb-4"
|
| 731 |
onClick={toggleCapabilitiesStats}
|
| 732 |
>
|
| 733 |
-
<h3 className="flex items-center justify-between text-lg font-semibold">
|
| 734 |
<div className="flex items-center gap-2">
|
| 735 |
<Brain className="h-4 w-4 text-blue-600" />
|
| 736 |
Capabilities
|
| 737 |
</div>
|
| 738 |
<div className="flex items-center gap-2">
|
| 739 |
-
<span className="text-sm font-normal text-muted-foreground">
|
| 740 |
{capabilitiesStatsExpanded ? 'Hide details' : 'Show details'}
|
| 741 |
</span>
|
| 742 |
{capabilitiesStatsExpanded ? (
|
|
@@ -877,13 +878,13 @@ export default function EvaluationDetailsPage() {
|
|
| 877 |
className="cursor-pointer hover:bg-muted/50 transition-colors p-3 -m-3 rounded-lg mb-4"
|
| 878 |
onClick={toggleRisksStats}
|
| 879 |
>
|
| 880 |
-
<h3 className="flex items-center justify-between text-lg font-semibold">
|
| 881 |
<div className="flex items-center gap-2">
|
| 882 |
<ShieldAlert className="h-4 w-4 text-red-600" />
|
| 883 |
Risks
|
| 884 |
</div>
|
| 885 |
<div className="flex items-center gap-2">
|
| 886 |
-
<span className="text-sm font-normal text-muted-foreground">
|
| 887 |
{risksStatsExpanded ? 'Hide details' : 'Show details'}
|
| 888 |
</span>
|
| 889 |
{risksStatsExpanded ? (
|
|
|
|
| 294 |
|
| 295 |
return (
|
| 296 |
<TooltipProvider>
|
| 297 |
+
<div className="container mx-auto px-4 sm:px-6 py-4 sm:py-8 max-w-4xl">
|
| 298 |
<div className="mb-6">
|
| 299 |
+
<div className="flex flex-col sm:flex-row items-start sm:items-center justify-between gap-3">
|
| 300 |
<Button onClick={() => router.push("/")} variant="outline" size="sm">
|
| 301 |
<ArrowLeft className="h-4 w-4 mr-2" />
|
| 302 |
Back to Dashboard
|
|
|
|
| 305 |
<Link href="/about">
|
| 306 |
<Button variant="ghost" size="sm">
|
| 307 |
<Info className="h-4 w-4 mr-2" />
|
| 308 |
+
<span className="hidden sm:inline">About</span>
|
| 309 |
</Button>
|
| 310 |
</Link>
|
| 311 |
<Button
|
|
|
|
| 320 |
</Button>
|
| 321 |
<Button variant="outline" size="sm" onClick={exportReport}>
|
| 322 |
<Download className="h-4 w-4 mr-2" />
|
| 323 |
+
<span className="hidden sm:inline">Export Report</span>
|
| 324 |
+
<span className="sm:hidden">Export</span>
|
| 325 |
</Button>
|
| 326 |
</div>
|
| 327 |
</div>
|
| 328 |
|
| 329 |
<div className="mt-3 text-center">
|
| 330 |
+
<h1 className="text-2xl sm:text-3xl font-heading">{evaluation.systemName}</h1>
|
| 331 |
<p className="text-muted-foreground">{evaluation.provider}</p>
|
| 332 |
</div>
|
| 333 |
</div>
|
|
|
|
| 731 |
className="cursor-pointer hover:bg-muted/50 transition-colors p-3 -m-3 rounded-lg mb-4"
|
| 732 |
onClick={toggleCapabilitiesStats}
|
| 733 |
>
|
| 734 |
+
<h3 className="flex items-center justify-between text-base sm:text-lg font-semibold">
|
| 735 |
<div className="flex items-center gap-2">
|
| 736 |
<Brain className="h-4 w-4 text-blue-600" />
|
| 737 |
Capabilities
|
| 738 |
</div>
|
| 739 |
<div className="flex items-center gap-2">
|
| 740 |
+
<span className="text-xs sm:text-sm font-normal text-muted-foreground">
|
| 741 |
{capabilitiesStatsExpanded ? 'Hide details' : 'Show details'}
|
| 742 |
</span>
|
| 743 |
{capabilitiesStatsExpanded ? (
|
|
|
|
| 878 |
className="cursor-pointer hover:bg-muted/50 transition-colors p-3 -m-3 rounded-lg mb-4"
|
| 879 |
onClick={toggleRisksStats}
|
| 880 |
>
|
| 881 |
+
<h3 className="flex items-center justify-between text-base sm:text-lg font-semibold">
|
| 882 |
<div className="flex items-center gap-2">
|
| 883 |
<ShieldAlert className="h-4 w-4 text-red-600" />
|
| 884 |
Risks
|
| 885 |
</div>
|
| 886 |
<div className="flex items-center gap-2">
|
| 887 |
+
<span className="text-xs sm:text-sm font-normal text-muted-foreground">
|
| 888 |
{risksStatsExpanded ? 'Hide details' : 'Show details'}
|
| 889 |
</span>
|
| 890 |
{risksStatsExpanded ? (
|
components/ai-evaluation-dashboard.tsx
CHANGED
|
@@ -286,8 +286,8 @@ export function AIEvaluationDashboard({ onBack, onSaveEvaluation }: AIEvaluation
|
|
| 286 |
<div className="min-h-screen bg-background flex flex-col">
|
| 287 |
{/* Header */}
|
| 288 |
<header className="border-b bg-card">
|
| 289 |
-
<div className="container mx-auto px-6 py-4">
|
| 290 |
-
<div className="flex items-center justify-between">
|
| 291 |
<div className="flex items-center gap-4">
|
| 292 |
{onBack && (
|
| 293 |
<Button variant="ghost" size="sm" onClick={onBack} className="gap-2">
|
|
@@ -296,26 +296,29 @@ export function AIEvaluationDashboard({ onBack, onSaveEvaluation }: AIEvaluation
|
|
| 296 |
</Button>
|
| 297 |
)}
|
| 298 |
<div>
|
| 299 |
-
<h1 className="text-2xl font-bold font-heading text-foreground">New Eval Card</h1>
|
| 300 |
-
<p className="text-muted-foreground">Create comprehensive AI system evaluation card</p>
|
| 301 |
</div>
|
| 302 |
</div>
|
| 303 |
-
<div className="flex items-center gap-4">
|
| 304 |
-
<div className="text-right">
|
| 305 |
<p className="text-sm text-muted-foreground">Overall Progress</p>
|
| 306 |
<div className="flex items-center gap-2">
|
| 307 |
<Progress value={getOverallProgress()} className="w-24" />
|
| 308 |
<span className="text-sm font-medium">{Math.round(getOverallProgress())}%</span>
|
| 309 |
</div>
|
| 310 |
</div>
|
| 311 |
-
|
| 312 |
-
|
| 313 |
-
|
| 314 |
-
|
| 315 |
-
|
| 316 |
-
|
| 317 |
-
|
| 318 |
-
|
|
|
|
|
|
|
|
|
|
| 319 |
</div>
|
| 320 |
</div>
|
| 321 |
</div>
|
|
@@ -323,8 +326,8 @@ export function AIEvaluationDashboard({ onBack, onSaveEvaluation }: AIEvaluation
|
|
| 323 |
|
| 324 |
{/* Step tabs navigation */}
|
| 325 |
<div className="border-b bg-card">
|
| 326 |
-
<div className="container mx-auto px-6">
|
| 327 |
-
<div className="flex items-center space-x-8">
|
| 328 |
{steps.map((step) => {
|
| 329 |
const isActive = currentStep === step.id
|
| 330 |
const isCompleted =
|
|
@@ -336,7 +339,7 @@ export function AIEvaluationDashboard({ onBack, onSaveEvaluation }: AIEvaluation
|
|
| 336 |
return (
|
| 337 |
<div
|
| 338 |
key={step.id}
|
| 339 |
-
className={`flex items-center gap-3 py-4 border-b-2 transition-colors ${
|
| 340 |
isActive
|
| 341 |
? "border-primary text-primary"
|
| 342 |
: isCompleted
|
|
@@ -345,7 +348,7 @@ export function AIEvaluationDashboard({ onBack, onSaveEvaluation }: AIEvaluation
|
|
| 345 |
}`}
|
| 346 |
>
|
| 347 |
<div
|
| 348 |
-
className={`flex items-center justify-center w-8 h-8 rounded-full text-sm font-medium ${
|
| 349 |
isActive
|
| 350 |
? "bg-primary text-primary-foreground"
|
| 351 |
: isCompleted
|
|
@@ -355,7 +358,7 @@ export function AIEvaluationDashboard({ onBack, onSaveEvaluation }: AIEvaluation
|
|
| 355 |
>
|
| 356 |
{step.number}
|
| 357 |
</div>
|
| 358 |
-
<span className="font-medium">{step.label}</span>
|
| 359 |
</div>
|
| 360 |
)
|
| 361 |
})}
|
|
@@ -363,7 +366,9 @@ export function AIEvaluationDashboard({ onBack, onSaveEvaluation }: AIEvaluation
|
|
| 363 |
</div>
|
| 364 |
</div>
|
| 365 |
|
| 366 |
-
|
|
|
|
|
|
|
| 367 |
</div>
|
| 368 |
)
|
| 369 |
}
|
|
|
|
| 286 |
<div className="min-h-screen bg-background flex flex-col">
|
| 287 |
{/* Header */}
|
| 288 |
<header className="border-b bg-card">
|
| 289 |
+
<div className="container mx-auto px-4 sm:px-6 py-4">
|
| 290 |
+
<div className="flex flex-col sm:flex-row items-start sm:items-center justify-between gap-3">
|
| 291 |
<div className="flex items-center gap-4">
|
| 292 |
{onBack && (
|
| 293 |
<Button variant="ghost" size="sm" onClick={onBack} className="gap-2">
|
|
|
|
| 296 |
</Button>
|
| 297 |
)}
|
| 298 |
<div>
|
| 299 |
+
<h1 className="text-xl sm:text-2xl font-bold font-heading text-foreground">New Eval Card</h1>
|
| 300 |
+
<p className="text-sm sm:text-base text-muted-foreground">Create comprehensive AI system evaluation card</p>
|
| 301 |
</div>
|
| 302 |
</div>
|
| 303 |
+
<div className="flex flex-col sm:flex-row items-start sm:items-center gap-3 sm:gap-4 w-full sm:w-auto">
|
| 304 |
+
<div className="text-left sm:text-right">
|
| 305 |
<p className="text-sm text-muted-foreground">Overall Progress</p>
|
| 306 |
<div className="flex items-center gap-2">
|
| 307 |
<Progress value={getOverallProgress()} className="w-24" />
|
| 308 |
<span className="text-sm font-medium">{Math.round(getOverallProgress())}%</span>
|
| 309 |
</div>
|
| 310 |
</div>
|
| 311 |
+
<div className="flex items-center gap-2 w-full sm:w-auto">
|
| 312 |
+
{evaluationData.systemInfo && (
|
| 313 |
+
<Badge variant="secondary" className="font-medium">
|
| 314 |
+
{evaluationData.systemInfo.name}
|
| 315 |
+
</Badge>
|
| 316 |
+
)}
|
| 317 |
+
<Button onClick={handleSaveEvaluation} className="gap-2 w-full sm:w-auto">
|
| 318 |
+
<span className="hidden sm:inline">Save Eval Card</span>
|
| 319 |
+
<span className="sm:hidden">Save</span>
|
| 320 |
+
</Button>
|
| 321 |
+
</div>
|
| 322 |
</div>
|
| 323 |
</div>
|
| 324 |
</div>
|
|
|
|
| 326 |
|
| 327 |
{/* Step tabs navigation */}
|
| 328 |
<div className="border-b bg-card">
|
| 329 |
+
<div className="container mx-auto px-4 sm:px-6 py-4">
|
| 330 |
+
<div className="flex items-center space-x-4 sm:space-x-8 overflow-x-auto">
|
| 331 |
{steps.map((step) => {
|
| 332 |
const isActive = currentStep === step.id
|
| 333 |
const isCompleted =
|
|
|
|
| 339 |
return (
|
| 340 |
<div
|
| 341 |
key={step.id}
|
| 342 |
+
className={`flex items-center gap-2 sm:gap-3 py-4 border-b-2 transition-colors whitespace-nowrap ${
|
| 343 |
isActive
|
| 344 |
? "border-primary text-primary"
|
| 345 |
: isCompleted
|
|
|
|
| 348 |
}`}
|
| 349 |
>
|
| 350 |
<div
|
| 351 |
+
className={`flex items-center justify-center w-6 h-6 sm:w-8 sm:h-8 rounded-full text-xs sm:text-sm font-medium ${
|
| 352 |
isActive
|
| 353 |
? "bg-primary text-primary-foreground"
|
| 354 |
: isCompleted
|
|
|
|
| 358 |
>
|
| 359 |
{step.number}
|
| 360 |
</div>
|
| 361 |
+
<span className="font-medium text-sm sm:text-base">{step.label}</span>
|
| 362 |
</div>
|
| 363 |
)
|
| 364 |
})}
|
|
|
|
| 366 |
</div>
|
| 367 |
</div>
|
| 368 |
|
| 369 |
+
<div className="container mx-auto px-4 sm:px-6 py-4 sm:py-6 flex-1 min-h-0">
|
| 370 |
+
{renderCurrentStep()}
|
| 371 |
+
</div>
|
| 372 |
</div>
|
| 373 |
)
|
| 374 |
}
|
components/category-evaluation.tsx
CHANGED
|
@@ -303,19 +303,19 @@ export function CategoryEvaluation({ category, score, onScoreUpdate, onSaveDetai
|
|
| 303 |
<div className="space-y-6">
|
| 304 |
<Card>
|
| 305 |
<CardHeader>
|
| 306 |
-
<div className="flex items-center justify-between">
|
| 307 |
<div className="flex-1">
|
| 308 |
-
<CardTitle className="font-heading flex items-center gap-2">
|
| 309 |
-
{category.name}
|
| 310 |
<Badge variant={category.type === "capability" ? "secondary" : "destructive"}>{category.type}</Badge>
|
| 311 |
</CardTitle>
|
| 312 |
<CardDescription className="mt-2">{category.description}</CardDescription>
|
| 313 |
</div>
|
| 314 |
{isComplete && (
|
| 315 |
-
<div className="text-right">
|
| 316 |
<div className="flex items-center gap-2 mb-1">
|
| 317 |
<CheckCircle className="h-5 w-5 text-green-600" />
|
| 318 |
-
<span className="font-medium">Score: {currentScore.totalScore}/{currentScore.totalApplicable || currentScore.totalQuestions}</span>
|
| 319 |
</div>
|
| 320 |
<Badge
|
| 321 |
variant={
|
|
@@ -418,14 +418,14 @@ export function CategoryEvaluation({ category, score, onScoreUpdate, onSaveDetai
|
|
| 418 |
|
| 419 |
{benchmarkAnswers[question.id] === "yes" && (
|
| 420 |
<div className="space-y-4 ml-4 p-4 bg-muted/30 rounded-lg">
|
| 421 |
-
<div className="flex items-center justify-between">
|
| 422 |
<Label className="text-sm font-medium">Sources & Evidence</Label>
|
| 423 |
<Button
|
| 424 |
type="button"
|
| 425 |
variant="outline"
|
| 426 |
size="sm"
|
| 427 |
onClick={() => addSource(question.id, "benchmark")}
|
| 428 |
-
className="flex items-center gap-1"
|
| 429 |
>
|
| 430 |
<Plus className="h-3 w-3" />
|
| 431 |
Add Source
|
|
@@ -434,13 +434,14 @@ export function CategoryEvaluation({ category, score, onScoreUpdate, onSaveDetai
|
|
| 434 |
|
| 435 |
{(benchmarkSources[question.id] || []).map((source, index) => (
|
| 436 |
<div key={source.id} className="space-y-3 p-3 border rounded-lg bg-background">
|
| 437 |
-
<div className="flex items-center justify-between">
|
| 438 |
<span className="text-sm font-medium">Source {index + 1}</span>
|
| 439 |
<Button
|
| 440 |
type="button"
|
| 441 |
variant="ghost"
|
| 442 |
size="sm"
|
| 443 |
onClick={() => removeSource(question.id, source.id, "benchmark")}
|
|
|
|
| 444 |
>
|
| 445 |
<Trash2 className="h-3 w-3" />
|
| 446 |
</Button>
|
|
@@ -566,14 +567,14 @@ export function CategoryEvaluation({ category, score, onScoreUpdate, onSaveDetai
|
|
| 566 |
|
| 567 |
{processAnswers[question.id] === "yes" && (
|
| 568 |
<div className="space-y-4 ml-4 p-4 bg-muted/30 rounded-lg">
|
| 569 |
-
<div className="flex items-center justify-between">
|
| 570 |
<Label className="text-sm font-medium">Documentation & Evidence</Label>
|
| 571 |
<Button
|
| 572 |
type="button"
|
| 573 |
variant="outline"
|
| 574 |
size="sm"
|
| 575 |
onClick={() => addSource(question.id, "process")}
|
| 576 |
-
className="flex items-center gap-1"
|
| 577 |
>
|
| 578 |
<Plus className="h-3 w-3" />
|
| 579 |
Add Documentation
|
|
@@ -582,13 +583,14 @@ export function CategoryEvaluation({ category, score, onScoreUpdate, onSaveDetai
|
|
| 582 |
|
| 583 |
{(processSources[question.id] || []).map((source, index) => (
|
| 584 |
<div key={source.id} className="space-y-3 p-3 border rounded-lg bg-background">
|
| 585 |
-
<div className="flex items-center justify-between">
|
| 586 |
<span className="text-sm font-medium">Document {index + 1}</span>
|
| 587 |
<Button
|
| 588 |
type="button"
|
| 589 |
variant="ghost"
|
| 590 |
size="sm"
|
| 591 |
onClick={() => removeSource(question.id, source.id, "process")}
|
|
|
|
| 592 |
>
|
| 593 |
<Trash2 className="h-3 w-3" />
|
| 594 |
</Button>
|
|
|
|
| 303 |
<div className="space-y-6">
|
| 304 |
<Card>
|
| 305 |
<CardHeader>
|
| 306 |
+
<div className="flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4">
|
| 307 |
<div className="flex-1">
|
| 308 |
+
<CardTitle className="font-heading flex flex-col sm:flex-row sm:items-center gap-2">
|
| 309 |
+
<span>{category.name}</span>
|
| 310 |
<Badge variant={category.type === "capability" ? "secondary" : "destructive"}>{category.type}</Badge>
|
| 311 |
</CardTitle>
|
| 312 |
<CardDescription className="mt-2">{category.description}</CardDescription>
|
| 313 |
</div>
|
| 314 |
{isComplete && (
|
| 315 |
+
<div className="text-left sm:text-right">
|
| 316 |
<div className="flex items-center gap-2 mb-1">
|
| 317 |
<CheckCircle className="h-5 w-5 text-green-600" />
|
| 318 |
+
<span className="font-medium text-sm sm:text-base">Score: {currentScore.totalScore}/{currentScore.totalApplicable || currentScore.totalQuestions}</span>
|
| 319 |
</div>
|
| 320 |
<Badge
|
| 321 |
variant={
|
|
|
|
| 418 |
|
| 419 |
{benchmarkAnswers[question.id] === "yes" && (
|
| 420 |
<div className="space-y-4 ml-4 p-4 bg-muted/30 rounded-lg">
|
| 421 |
+
<div className="flex flex-col sm:flex-row sm:items-center sm:justify-between gap-2">
|
| 422 |
<Label className="text-sm font-medium">Sources & Evidence</Label>
|
| 423 |
<Button
|
| 424 |
type="button"
|
| 425 |
variant="outline"
|
| 426 |
size="sm"
|
| 427 |
onClick={() => addSource(question.id, "benchmark")}
|
| 428 |
+
className="flex items-center gap-1 self-start sm:self-auto"
|
| 429 |
>
|
| 430 |
<Plus className="h-3 w-3" />
|
| 431 |
Add Source
|
|
|
|
| 434 |
|
| 435 |
{(benchmarkSources[question.id] || []).map((source, index) => (
|
| 436 |
<div key={source.id} className="space-y-3 p-3 border rounded-lg bg-background">
|
| 437 |
+
<div className="flex flex-col sm:flex-row sm:items-center sm:justify-between gap-2">
|
| 438 |
<span className="text-sm font-medium">Source {index + 1}</span>
|
| 439 |
<Button
|
| 440 |
type="button"
|
| 441 |
variant="ghost"
|
| 442 |
size="sm"
|
| 443 |
onClick={() => removeSource(question.id, source.id, "benchmark")}
|
| 444 |
+
className="self-start sm:self-auto"
|
| 445 |
>
|
| 446 |
<Trash2 className="h-3 w-3" />
|
| 447 |
</Button>
|
|
|
|
| 567 |
|
| 568 |
{processAnswers[question.id] === "yes" && (
|
| 569 |
<div className="space-y-4 ml-4 p-4 bg-muted/30 rounded-lg">
|
| 570 |
+
<div className="flex flex-col sm:flex-row sm:items-center sm:justify-between gap-2">
|
| 571 |
<Label className="text-sm font-medium">Documentation & Evidence</Label>
|
| 572 |
<Button
|
| 573 |
type="button"
|
| 574 |
variant="outline"
|
| 575 |
size="sm"
|
| 576 |
onClick={() => addSource(question.id, "process")}
|
| 577 |
+
className="flex items-center gap-1 self-start sm:self-auto"
|
| 578 |
>
|
| 579 |
<Plus className="h-3 w-3" />
|
| 580 |
Add Documentation
|
|
|
|
| 583 |
|
| 584 |
{(processSources[question.id] || []).map((source, index) => (
|
| 585 |
<div key={source.id} className="space-y-3 p-3 border rounded-lg bg-background">
|
| 586 |
+
<div className="flex flex-col sm:flex-row sm:items-center sm:justify-between gap-2">
|
| 587 |
<span className="text-sm font-medium">Document {index + 1}</span>
|
| 588 |
<Button
|
| 589 |
type="button"
|
| 590 |
variant="ghost"
|
| 591 |
size="sm"
|
| 592 |
onClick={() => removeSource(question.id, source.id, "process")}
|
| 593 |
+
className="self-start sm:self-auto"
|
| 594 |
>
|
| 595 |
<Trash2 className="h-3 w-3" />
|
| 596 |
</Button>
|
components/evaluation-form.tsx
CHANGED
|
@@ -71,19 +71,19 @@ export function EvaluationForm({
|
|
| 71 |
{/* Progress Header */}
|
| 72 |
<Card>
|
| 73 |
<CardHeader>
|
| 74 |
-
<div className="flex items-center justify-between">
|
| 75 |
<div>
|
| 76 |
-
<CardTitle className="font-heading">Detailed Evaluation</CardTitle>
|
| 77 |
<CardDescription>Complete the evaluation for each selected category</CardDescription>
|
| 78 |
</div>
|
| 79 |
-
<div className="text-right">
|
| 80 |
<div className="flex items-center gap-2 mb-2">
|
| 81 |
<span className="text-sm font-medium">Progress:</span>
|
| 82 |
<Badge variant="secondary">
|
| 83 |
{completedCount}/{totalCount}
|
| 84 |
</Badge>
|
| 85 |
</div>
|
| 86 |
-
<Progress value={progress} className="w-32" />
|
| 87 |
</div>
|
| 88 |
</div>
|
| 89 |
</CardHeader>
|
|
|
|
| 71 |
{/* Progress Header */}
|
| 72 |
<Card>
|
| 73 |
<CardHeader>
|
| 74 |
+
<div className="flex flex-col sm:flex-row items-start sm:items-center justify-between gap-3">
|
| 75 |
<div>
|
| 76 |
+
<CardTitle className="text-lg sm:text-xl font-heading">Detailed Evaluation</CardTitle>
|
| 77 |
<CardDescription>Complete the evaluation for each selected category</CardDescription>
|
| 78 |
</div>
|
| 79 |
+
<div className="text-left sm:text-right w-full sm:w-auto">
|
| 80 |
<div className="flex items-center gap-2 mb-2">
|
| 81 |
<span className="text-sm font-medium">Progress:</span>
|
| 82 |
<Badge variant="secondary">
|
| 83 |
{completedCount}/{totalCount}
|
| 84 |
</Badge>
|
| 85 |
</div>
|
| 86 |
+
<Progress value={progress} className="w-full sm:w-32" />
|
| 87 |
</div>
|
| 88 |
</div>
|
| 89 |
</CardHeader>
|