feat(ui): IA redesign → production · צרור-1 (אישורים + בית) + שער-Claude-Design #211

Merged
chaim merged 2 commits from worktree-ia-redesign-prod into main 2026-06-11 22:11:52 +00:00
Showing only changes of commit b85aafa8f9 - Show all commits

View File

@@ -24,6 +24,15 @@ const SEVERITY_BADGE: Record<ApprovalSeverity, string> = {
ok: "bg-emerald-50 text-emerald-800 border-emerald-300/60", ok: "bg-emerald-50 text-emerald-800 border-emerald-300/60",
}; };
// Severity expressed as a colored dot next to the title (matches the approved
// IA-redesign mockup): high=danger, medium=warn, low=info, ok=success.
const SEVERITY_DOT: Record<ApprovalSeverity, string> = {
high: "bg-danger",
medium: "bg-warn",
low: "bg-info",
ok: "bg-success",
};
function formatDate(iso?: string | null): string { function formatDate(iso?: string | null): string {
if (!iso) return ""; if (!iso) return "";
try { try {
@@ -42,10 +51,14 @@ function ApprovalCard({ cat }: { cat: ApprovalCategory }) {
return ( return (
<Card className="bg-surface border-rule shadow-sm flex flex-col"> <Card className="bg-surface border-rule shadow-sm flex flex-col">
<CardContent className="px-6 py-5 flex flex-col gap-3 grow"> <CardContent className="px-6 py-5 flex flex-col gap-3 grow">
<div className="flex items-start justify-between gap-3"> <div className="flex items-start gap-3">
<h2 className="text-navy text-lg mb-0 leading-snug">{cat.label}</h2>
<span <span
className={`inline-flex items-center justify-center min-w-[2.25rem] h-7 px-2 rounded-full border text-sm font-semibold ${SEVERITY_BADGE[cat.severity]}`} className={`mt-2 h-2.5 w-2.5 shrink-0 rounded-full ${SEVERITY_DOT[cat.severity]}`}
aria-hidden
/>
<h2 className="text-navy text-lg mb-0 leading-snug grow">{cat.label}</h2>
<span
className={`inline-flex items-center justify-center min-w-[2.25rem] h-7 px-2 rounded-full border text-sm font-semibold tabular-nums ${SEVERITY_BADGE[cat.severity]}`}
aria-label={`${cat.count} פריטים ממתינים`} aria-label={`${cat.count} פריטים ממתינים`}
> >
{cat.count} {cat.count}
@@ -98,9 +111,19 @@ function ApprovalCard({ cat }: { cat: ApprovalCategory }) {
<div className="mt-auto pt-2"> <div className="mt-auto pt-2">
{cat.href ? ( {cat.href ? (
<Button asChild variant="outline" size="sm" className="border-rule"> cleared ? (
<Button asChild variant="outline" size="sm" className="border-rule text-ink-muted">
<Link href={cat.href}>צפייה </Link>
</Button>
) : (
<Button
asChild
size="sm"
className="bg-gold text-white hover:bg-gold-deep border-transparent"
>
<Link href={cat.href}>לטיפול </Link> <Link href={cat.href}>לטיפול </Link>
</Button> </Button>
)
) : ( ) : (
<span className="text-[0.75rem] text-ink-muted">סקירה ידנית (ראה דוח FU-5)</span> <span className="text-[0.75rem] text-ink-muted">סקירה ידנית (ראה דוח FU-5)</span>
)} )}
@@ -133,13 +156,11 @@ export default function ApprovalsPage() {
</p> </p>
</div> </div>
{typeof data?.total_pending === "number" ? ( {typeof data?.total_pending === "number" ? (
<div className="text-end"> <div className="inline-flex items-baseline gap-2 rounded-lg border border-rule bg-gold-wash px-4 py-2.5">
<div className="text-3xl font-semibold text-navy leading-none"> <span className="text-2xl font-semibold text-gold-deep leading-none tabular-nums">
{data.total_pending} {data.total_pending}
</div> </span>
<div className="text-[0.72rem] uppercase tracking-[0.08em] text-ink-muted mt-1"> <span className="text-[0.85rem] text-ink-soft">פריטים ממתינים</span>
פריטים ממתינים
</div>
</div> </div>
) : null} ) : null}
</div> </div>