Production
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import { EmptyState } from "../ui/States";
|
||||
import { formatDateTime } 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} · {item.actor_role}</p>
|
||||
<time className="timeline-meta">{formatDateTime(item.at)}</time>
|
||||
{item.comment && <p className="timeline-note">{item.comment}</p>}
|
||||
</div>
|
||||
</li>
|
||||
))}
|
||||
</ol>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user