'use client' import Link from 'next/link' import type { Route } from 'next' import { trpc } from '@/lib/trpc/client' import { Badge } from '@/components/ui/badge' import { Button } from '@/components/ui/button' import { Card, CardContent, CardHeader, CardTitle, } from '@/components/ui/card' import { Skeleton } from '@/components/ui/skeleton' import { Plus, Layers, GitBranch, Calendar, Workflow, Pencil, Settings2, } from 'lucide-react' import { cn } from '@/lib/utils' import { formatDistanceToNow } from 'date-fns' import { useEdition } from '@/contexts/edition-context' const statusConfig = { DRAFT: { label: 'Draft', bgClass: 'bg-gray-100 text-gray-700', dotClass: 'bg-gray-500', }, ACTIVE: { label: 'Active', bgClass: 'bg-emerald-100 text-emerald-700', dotClass: 'bg-emerald-500', }, CLOSED: { label: 'Closed', bgClass: 'bg-blue-100 text-blue-700', dotClass: 'bg-blue-500', }, ARCHIVED: { label: 'Archived', bgClass: 'bg-muted text-muted-foreground', dotClass: 'bg-muted-foreground', }, } as const export default function PipelineListPage() { const { currentEdition } = useEdition() const programId = currentEdition?.id const { data: pipelines, isLoading } = trpc.pipeline.list.useQuery( { programId: programId! }, { enabled: !!programId } ) if (!programId) { return (
Select an edition to view pipelines
No Edition Selected
Select an edition from the sidebar to view its pipelines
Manage evaluation pipelines for {currentEdition?.name}
Pipelines organize your project evaluation workflow into tracks and stages. Create your first pipeline to get started with managing project evaluations.
{pipeline.slug}
{description}
)}