'use client' import type { Collection } from './types' function CollectionCard({ collection }: { collection: Collection }) { const statusColors = { ready: 'bg-green-100 text-green-800', indexing: 'bg-yellow-100 text-yellow-800', empty: 'bg-slate-100 text-slate-800', } const statusLabels = { ready: 'Bereit', indexing: 'Indexierung...', empty: 'Leer', } return (

{collection.displayName}

{collection.name}

{statusLabels[collection.status]}

Chunks

{collection.chunkCount.toLocaleString()}

Jahre

{collection.years.length > 0 ? `${Math.min(...collection.years)}-${Math.max(...collection.years)}` : '-'}

Fächer

{collection.subjects.length}

Bundesland

{collection.bundesland}

{collection.subjects.length > 0 && (
{collection.subjects.slice(0, 8).map((subject) => ( {subject} ))} {collection.subjects.length > 8 && ( +{collection.subjects.length - 8} weitere )}
)}
) } export function CollectionsTab({ collections, loading, onRefresh, }: { collections: Collection[] loading: boolean onRefresh: () => void }) { return (

RAG Sammlungen

Verwaltung der indexierten Dokumentensammlungen

{loading && (
)} {!loading && (
{collections.length === 0 ? (

Keine Sammlungen vorhanden

Starten Sie die Ingestion oder laden Sie Dokumente hoch.

) : ( collections.map((col) => ) )}
Neue Sammlung (demnächst)
)}
) }