papertrail/components/help/TicketList.tsx
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

51 lines
1.2 KiB
TypeScript

"use client";
// The ticket list table: renders loading / error / empty states, then a list of
// TicketRow components. Filtering + pagination live in the parent page.
import type { SupportTicketDto } from "@/app/console/help/api";
import { TicketRow } from "./TicketRow";
import { EmptyState } from "./EmptyState";
export function TicketList({
tickets,
loading,
error,
onRetry,
}: {
tickets: SupportTicketDto[];
loading: boolean;
error: string | null;
onRetry: () => void;
}) {
if (loading) {
return <p className="text-sm text-ink/40">Loading tickets...</p>;
}
if (error) {
return (
<div className="bg-white border border-ink/10 rounded-lg p-5">
<p className="text-sm text-red-600">{error}</p>
<button onClick={onRetry} className="mt-2 text-sm text-accent">
Retry
</button>
</div>
);
}
if (tickets.length === 0) {
return (
<EmptyState
title="No tickets match these filters."
hint="Open a new ticket or clear the filters."
/>
);
}
return (
<ul className="space-y-2">
{tickets.map((t) => (
<li key={t.id}>
<TicketRow ticket={t} />
</li>
))}
</ul>
);
}