Multi-tenant platform (182 pages, 228 API routes, ~30 modules) built on a deterministic verification core: clinical-trial claims checked against ClinicalTrials.gov registered results and raw event counts (ARR/NNT/RR+CI recomputed in code, oracle-tested), code-enforced exact-span grounding, and multi-source cross-verification. Auth/RBAC/multi-tenancy, document processing at scale (unpdf + Docling), agentic workflows, Claude Science connector, compliance/audit, billing, public API, and more. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
38 lines
1.1 KiB
TypeScript
38 lines
1.1 KiB
TypeScript
import { StatusBadge } from "@/components/documents/StatusBadge";
|
|
import type { DocumentDetail } from "@/lib/documents/types";
|
|
import { formatBytes } from "./format";
|
|
|
|
// Title row for the document detail page: filename, status, type/size, and a
|
|
// delete action.
|
|
|
|
interface DocumentHeaderProps {
|
|
doc: DocumentDetail;
|
|
deleting: boolean;
|
|
onDelete: () => void;
|
|
}
|
|
|
|
export function DocumentHeader({ doc, deleting, onDelete }: DocumentHeaderProps) {
|
|
return (
|
|
<div className="mt-3 flex items-start justify-between gap-4">
|
|
<div>
|
|
<h1 className="text-2xl font-semibold text-ink/80 break-all">
|
|
{doc.filename}
|
|
</h1>
|
|
<div className="mt-2 flex items-center gap-3">
|
|
<StatusBadge status={doc.status} />
|
|
<span className="text-xs text-ink/40">
|
|
{doc.mime_type} · {formatBytes(doc.size_bytes)}
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<button
|
|
onClick={onDelete}
|
|
disabled={deleting}
|
|
className="shrink-0 rounded border border-red-300 px-3 py-1.5 text-sm text-red-600 disabled:opacity-50"
|
|
>
|
|
{deleting ? "Deleting..." : "Delete"}
|
|
</button>
|
|
</div>
|
|
);
|
|
}
|