0d30c58bf0
Snapshot of the working tree on srv1071960 (branch main), taken during server cleanup. .env files, node_modules, builds, logs and media were excluded.
23 lines
915 B
TypeScript
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>
|
|
);
|
|
}
|