'use client' import type { Document, Tab } from './types' interface DocumentsTabProps { documents: Document[] loading: boolean setSelectedDocument: (id: string) => void setActiveTab: (tab: Tab) => void } export default function DocumentsTab({ documents, loading, setSelectedDocument, setActiveTab }: DocumentsTabProps) { return (

Dokumente verwalten

{loading ? (
Lade Dokumente...
) : documents.length === 0 ? (
Keine Dokumente vorhanden
) : (
{documents.map((doc) => ( ))}
Typ Name Beschreibung Pflicht Erstellt Aktionen
{doc.type} {doc.name} {doc.description} {doc.mandatory ? ( Ja ) : ( Nein )} {new Date(doc.created_at).toLocaleDateString('de-DE')}
)}
) }