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>
41 lines
1.4 KiB
TypeScript
41 lines
1.4 KiB
TypeScript
interface AuditBreakdownProps {
|
|
title: string;
|
|
rows: { label: string; count: number }[];
|
|
emptyLabel?: string;
|
|
}
|
|
|
|
// Horizontal bar breakdown for a set of labelled counts (e.g. events by action
|
|
// or entity type). Bars are scaled to the largest value in the set.
|
|
export function AuditBreakdown({
|
|
title,
|
|
rows,
|
|
emptyLabel = "No data yet.",
|
|
}: AuditBreakdownProps) {
|
|
const max = rows.reduce((m, r) => Math.max(m, r.count), 0) || 1;
|
|
return (
|
|
<div className="bg-white border border-ink/10 rounded-lg p-5">
|
|
<h2 className="text-sm font-medium text-ink/70">{title}</h2>
|
|
{rows.length === 0 ? (
|
|
<p className="mt-3 text-sm text-ink/40">{emptyLabel}</p>
|
|
) : (
|
|
<ul className="mt-3 space-y-2">
|
|
{rows.map((r) => (
|
|
<li key={r.label}>
|
|
<div className="flex items-center justify-between text-xs text-ink/60">
|
|
<span className="capitalize">{r.label.replace(/_/g, " ")}</span>
|
|
<span className="tabular-nums">{r.count.toLocaleString()}</span>
|
|
</div>
|
|
<div className="mt-1 h-1.5 bg-paper rounded overflow-hidden">
|
|
<div
|
|
className="h-full bg-accent"
|
|
style={{ width: `${Math.round((r.count / max) * 100)}%` }}
|
|
/>
|
|
</div>
|
|
</li>
|
|
))}
|
|
</ul>
|
|
)}
|
|
</div>
|
|
);
|
|
}
|