// Panel 3 cho 3-panel layout — gom WorkflowSummaryCard (timeline policy) + // approval history (ai/khi/quyết định gì) vào 1 stack. import { ArrowRight, Clock } from 'lucide-react' import { PhaseBadge } from '@/components/PhaseBadge' import { WorkflowSummaryCard } from '@/components/WorkflowSummaryCard' import type { ContractDetail } from '@/types/contracts' const fmt = (s: string) => new Date(s).toLocaleString('vi-VN') export function WorkflowHistoryPanel({ contract: c }: { contract: ContractDetail }) { return (
{c.workflow && }

Lịch sử duyệt ({c.approvals.length})

    {c.approvals.length === 0 &&
  1. Chưa có lịch sử.
  2. } {c.approvals.map(a => (
  3. {a.approverName ?? 'Hệ thống'}
    {fmt(a.approvedAt)}
    {a.comment && (
    {a.comment}
    )}
  4. ))}
) }