caelum0x 695a365ae4 feat: PaperTrail — enterprise evidence-verification platform
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>
2026-07-08 07:21:22 +03:00

32 lines
1.1 KiB
TypeScript

import type { ReviewWithPeople } from "@/lib/reviews/types";
// Shared display helpers for the reviews module UI. Colocated with the
// presentational components so the module owns its own formatting.
export function refLabel(review: ReviewWithPeople): string {
if (review.claimId) return `Claim ${review.claimId.slice(0, 8)}`;
if (review.projectId) return `Project ${review.projectId.slice(0, 8)}`;
return "—";
}
export function formatDate(value: string | null): string {
if (!value) return "—";
const d = new Date(value);
return Number.isNaN(d.getTime()) ? "—" : d.toLocaleDateString();
}
export function formatDateTime(value: string | null): string {
if (!value) return "—";
const d = new Date(value);
return Number.isNaN(d.getTime()) ? "—" : d.toLocaleString();
}
export const STATUS_OPTIONS: { value: string; label: string }[] = [
{ value: "", label: "All statuses" },
{ value: "pending", label: "Pending" },
{ value: "in_review", label: "In review" },
{ value: "approved", label: "Approved" },
{ value: "rejected", label: "Rejected" },
{ value: "cancelled", label: "Cancelled" },
];