Files
celtic-life-science/web/src/components/reports/ApprovalTimeline.tsx
T
Shubhankar45 0d30c58bf0 Server backup 2026-11-07 of uncommitted work in projects/pharma-web-celtic
Snapshot of the working tree on srv1071960 (branch main), taken during
server cleanup. .env files, node_modules, builds, logs and media were excluded.
2026-11-07 05:43:12 +00:00

23 lines
915 B
TypeScript

import { EmptyState } from "../ui/States";
import { formatDateTime, roleLabel } from "../../lib/format";
import type { Approval } from "../../types";
export function ApprovalTimeline({ items }: { items: Approval[] }) {
if (items.length === 0) return <EmptyState icon="clock" title="No activity yet" description="Workflow actions will appear here." />;
return (
<ol className="timeline">
{items.map((item, i) => (
<li key={`${item.at}-${i}`}>
<span className="timeline-dot" />
<div>
<p className="timeline-action">{item.action.replaceAll("_", " ")}</p>
<p className="timeline-meta">{item.actor_name} · {roleLabel(item.actor_role)}</p>
<time className="timeline-meta">{formatDateTime(item.at)}</time>
{item.comment && <p className="timeline-note">{item.comment}</p>}
</div>
</li>
))}
</ol>
);
}