From 86d4aa897124d8be200824d4c03218f5ab6ff58d Mon Sep 17 00:00:00 2001 From: Chaim Date: Tue, 16 Jun 2026 17:47:25 +0000 Subject: [PATCH] =?UTF-8?q?feat(home):=20=D7=94=D7=A1=D7=A8=D7=AA=20=D7=9B?= =?UTF-8?q?=D7=A8=D7=98=D7=99=D7=A1=20"=D7=AA=D7=99=D7=A7=D7=99=D7=9D=20?= =?UTF-8?q?=D7=9C=D7=A4=D7=99=20=D7=A1=D7=98=D7=98=D7=95=D7=A1"=20?= =?UTF-8?q?=E2=80=94=20=D7=93=D7=95=D7=A0=D7=90=D7=98-=D7=94=D7=A1=D7=98?= =?UTF-8?q?=D7=98=D7=95=D7=A1=20=D7=9C=D7=91=D7=93=D7=95=20(#1)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit כרטיס-הפסים האופקיים "תיקים לפי סטטוס" שכפל את דונאט "פיזור סטטוסים" שבטור-הצד. מסיר את הכרטיס + statusBars useMemo + STATUS_BARS + ה-type CaseStatus המיותר. הדונאט נשאר כמקור-יחיד לפיזור-הסטטוסים בדף הבית. מאושר דרך שער-העיצוב (Claude Design, כרטיס 04-home). Invariant: G2 — הסרת יצוג-סטטוס מקביל; מקור-תצוגה יחיד (הדונאט). Co-Authored-By: Claude Opus 4.8 (1M context) --- web-ui/src/app/page.tsx | 50 +++-------------------------------------- 1 file changed, 3 insertions(+), 47 deletions(-) diff --git a/web-ui/src/app/page.tsx b/web-ui/src/app/page.tsx index 0454b7e..a513f47 100644 --- a/web-ui/src/app/page.tsx +++ b/web-ui/src/app/page.tsx @@ -9,7 +9,7 @@ import { AppealTypeBars, subtypeOf } from "@/components/cases/appeal-type-bars"; import { CasesTable } from "@/components/cases/cases-table"; import { Card, CardContent } from "@/components/ui/card"; import { Button } from "@/components/ui/button"; -import { useCases, type Case, type CaseStatus } from "@/lib/api/cases"; +import { useCases, type Case } from "@/lib/api/cases"; import { usePendingApprovals, type ApprovalSeverity, @@ -23,17 +23,6 @@ const SEVERITY_DOT: Record = { ok: "bg-success", }; -// "תיקים לפי סטטוס" horizontal status bars (mockup 04: .bar / .track / .fill). -// Driven by the same live cases the KPI row uses — five status groups onto the -// gold/info/success/danger/muted palette. -type StatusBarRow = { label: string; fill: string; match: CaseStatus[] }; -const STATUS_BARS: StatusBarRow[] = [ - { label: "בהכנה", fill: "bg-info", match: ["new", "uploading", "processing", "documents_ready", "analyst_verified", "research_complete", "outcome_set"] }, - { label: "ניתוח וכיוון", fill: "bg-gold", match: ["brainstorming", "direction_approved", "analysis_enriched", "ready_for_writing"] }, - { label: "בכתיבה", fill: "bg-warn", match: ["drafting", "qa_review", "drafted"] }, - { label: "הושלם", fill: "bg-success", match: ["exported", "reviewed", "final"] }, -]; - export default function HomePage() { const { data, isPending, error } = useCases(true); // INV-IA1 pointer: surface the single approvals aggregate on the dashboard, @@ -52,16 +41,6 @@ export default function HomePage() { return { permits, levies }; }, [data]); - const statusBars = useMemo(() => { - const cases = data ?? []; - const counts = STATUS_BARS.map((b) => ({ - ...b, - n: cases.filter((c) => b.match.includes(c.status)).length, - })); - const max = Math.max(1, ...counts.map((c) => c.n)); - return { counts, max }; - }, [data]); - return (
@@ -93,31 +72,8 @@ export default function HomePage() { {/* two-column body — main flow + narrow gold gate rail (mockup 04 .cols) */}
- {/* תיקים לפי סטטוס — horizontal bars (mockup 04) */} - - -

תיקים לפי סטטוס

-
    - {statusBars.counts.map((b) => ( -
  • - - {b.label} - - - - - - {isPending ? "—" : b.n} - -
  • - ))} -
-
-
- + {/* "תיקים לפי סטטוס" (פסים אופקיים) הוסר — פיזור-הסטטוסים מוצג + בדונאט "פיזור סטטוסים" בטור-הצד (#1). */} {/* live case tables kept in full (richer than the mockup's single feed) */}