diff --git a/web-ui/src/components/cases/kpi-cards.tsx b/web-ui/src/components/cases/kpi-cards.tsx index 9c37497..26377b8 100644 --- a/web-ui/src/components/cases/kpi-cards.tsx +++ b/web-ui/src/components/cases/kpi-cards.tsx @@ -18,7 +18,7 @@ const TONE_STYLES: Record = { function bucketize(cases: Case[] | undefined): Bucket[] { const c = cases ?? []; const inProgress = c.filter((x) => - ["processing", "documents_ready", "outcome_set", "brainstorming", "direction_approved"].includes(x.status), + ["processing", "documents_ready", "analyst_verified", "research_complete", "outcome_set", "brainstorming", "direction_approved", "analysis_enriched", "ready_for_writing"].includes(x.status), ).length; const drafting = c.filter((x) => ["drafting", "qa_review", "drafted"].includes(x.status), diff --git a/web-ui/src/components/cases/status-badge.tsx b/web-ui/src/components/cases/status-badge.tsx index b8942b0..51dfd1d 100644 --- a/web-ui/src/components/cases/status-badge.tsx +++ b/web-ui/src/components/cases/status-badge.tsx @@ -2,7 +2,8 @@ import { Badge } from "@/components/ui/badge"; import { FilePlus2, Upload, Loader2, FileCheck, Target, Lightbulb, Compass, PenLine, SearchCheck, FileText, - FileOutput, CheckCircle2, Award, + FileOutput, CheckCircle2, Award, ShieldCheck, BookOpen, + Microscope, PlayCircle, } from "lucide-react"; import type { CaseStatus } from "@/lib/api/cases"; import type { LucideIcon } from "lucide-react"; @@ -12,11 +13,15 @@ const STATUS_LABELS: Record = { uploading: "מעלה", processing: "בעיבוד", documents_ready: "מסמכים מוכנים", + analyst_verified: "ניתוח אומת", + research_complete: "מחקר הושלם", outcome_set: "תוצאה נקבעה", brainstorming: "סיעור מוחות", direction_approved: "כיוון אושר", + analysis_enriched: "ניתוח הועמק", + ready_for_writing: "מוכן לכתיבה", drafting: "בכתיבה", - qa_review: "QA", + qa_review: "בדיקת איכות", drafted: "טיוטה", exported: "יוצא", reviewed: "נבדק", @@ -28,9 +33,13 @@ const STATUS_ICONS: Record = { uploading: Upload, processing: Loader2, documents_ready: FileCheck, + analyst_verified: ShieldCheck, + research_complete: BookOpen, outcome_set: Target, brainstorming: Lightbulb, direction_approved: Compass, + analysis_enriched: Microscope, + ready_for_writing: PlayCircle, drafting: PenLine, qa_review: SearchCheck, drafted: FileText, @@ -44,9 +53,13 @@ const STATUS_DESCRIPTIONS: Record = { uploading: "מסמכים בתהליך העלאה לשרת", processing: "המערכת מעבדת ומנתחת את המסמכים", documents_ready: "כל המסמכים עובדו ומוכנים לעבודה", + analyst_verified: "ניתוח ראשוני אומת — ממתין למחקר תקדימים", + research_complete: "מחקר תקדימים הושלם — ממתין לבחירת תוצאה", outcome_set: "נקבעה תוצאה צפויה לערר", brainstorming: "ניתוח כיוונים אפשריים להחלטה", - direction_approved: "כיוון ההחלטה אושר — ניתן להתחיל כתיבה", + direction_approved: "כיוון ההחלטה אושר — בהעמקת ניתוח", + analysis_enriched: "ניתוח הועמק ופסיקה אומתה — מוכן לכתיבה", + ready_for_writing: "הכל מוכן — ממתין לכותב ההחלטה", drafting: "טיוטת ההחלטה בתהליך כתיבה", qa_review: "הטיוטה בבדיקת איכות אוטומטית", drafted: "טיוטה ראשונה מוכנה לעיון", @@ -66,9 +79,13 @@ const STATUS_TONE: Record = { uploading: "bg-rule-soft text-ink-muted border-rule", processing: "bg-info-bg text-info border-info/30", documents_ready: "bg-info-bg text-info border-info/40", + analyst_verified: "bg-info-bg text-info border-info/40", + research_complete:"bg-info-bg text-info border-info/40", outcome_set: "bg-info-bg text-info border-info/40", brainstorming: "bg-gold-wash text-gold-deep border-gold/40", direction_approved:"bg-gold-wash text-gold-deep border-gold/50", + analysis_enriched:"bg-gold-wash text-gold-deep border-gold/50", + ready_for_writing:"bg-gold-wash text-gold-deep border-gold/50", drafting: "bg-warn-bg text-warn border-warn/40", qa_review: "bg-warn-bg text-warn border-warn/40", drafted: "bg-warn-bg text-warn border-warn/50", diff --git a/web-ui/src/components/cases/status-changer.tsx b/web-ui/src/components/cases/status-changer.tsx index bd636b5..ed5530c 100644 --- a/web-ui/src/components/cases/status-changer.tsx +++ b/web-ui/src/components/cases/status-changer.tsx @@ -17,8 +17,8 @@ import { useUpdateCase, type CaseStatus } from "@/lib/api/cases"; const ALL_STATUSES: CaseStatus[] = [ "new", "uploading", "processing", - "documents_ready", "outcome_set", - "brainstorming", "direction_approved", + "documents_ready", "analyst_verified", "research_complete", "outcome_set", + "brainstorming", "direction_approved", "analysis_enriched", "ready_for_writing", "drafting", "qa_review", "drafted", "exported", "reviewed", "final", ]; diff --git a/web-ui/src/components/cases/status-donut.tsx b/web-ui/src/components/cases/status-donut.tsx index 513d85d..5e40ac1 100644 --- a/web-ui/src/components/cases/status-donut.tsx +++ b/web-ui/src/components/cases/status-donut.tsx @@ -13,8 +13,8 @@ type GroupKey = "intake" | "prep" | "thinking" | "writing" | "done"; const GROUP_OF: Record = { new: "intake", uploading: "intake", processing: "intake", - documents_ready: "prep", outcome_set: "prep", - brainstorming: "thinking", direction_approved: "thinking", + documents_ready: "prep", analyst_verified: "prep", research_complete: "prep", outcome_set: "prep", + brainstorming: "thinking", direction_approved: "thinking", analysis_enriched: "thinking", ready_for_writing: "thinking", drafting: "writing", qa_review: "writing", drafted: "writing", exported: "done", reviewed: "done", final: "done", }; diff --git a/web-ui/src/components/cases/status-guide.tsx b/web-ui/src/components/cases/status-guide.tsx index f8e42b8..1c8f4e8 100644 --- a/web-ui/src/components/cases/status-guide.tsx +++ b/web-ui/src/components/cases/status-guide.tsx @@ -18,8 +18,8 @@ type PhaseGroup = { const PHASE_GROUPS: PhaseGroup[] = [ { label: "קליטה ועיבוד", statuses: ["new", "uploading", "processing"] }, - { label: "הכנת תיק", statuses: ["documents_ready", "outcome_set"] }, - { label: "ניתוח וכיוון", statuses: ["brainstorming", "direction_approved"] }, + { label: "הכנת תיק", statuses: ["documents_ready", "analyst_verified", "research_complete", "outcome_set"] }, + { label: "ניתוח וכיוון", statuses: ["brainstorming", "direction_approved", "analysis_enriched", "ready_for_writing"] }, { label: "כתיבת טיוטה", statuses: ["drafting", "qa_review", "drafted"] }, { label: "סגירה", statuses: ["exported", "reviewed", "final"] }, ]; diff --git a/web-ui/src/components/cases/workflow-timeline.tsx b/web-ui/src/components/cases/workflow-timeline.tsx index 52bf75b..fa3ff0e 100644 --- a/web-ui/src/components/cases/workflow-timeline.tsx +++ b/web-ui/src/components/cases/workflow-timeline.tsx @@ -23,8 +23,8 @@ type Phase = { const PHASES: Phase[] = [ { key: "intake", label: "קליטה ועיבוד", icon: FolderInput, statuses: ["new", "uploading", "processing"] }, - { key: "prep", label: "הכנת תיק", icon: ClipboardList, statuses: ["documents_ready", "outcome_set"] }, - { key: "thinking", label: "ניתוח וכיוון", icon: Brain, statuses: ["brainstorming", "direction_approved"] }, + { key: "prep", label: "הכנת תיק", icon: ClipboardList, statuses: ["documents_ready", "analyst_verified", "research_complete", "outcome_set"] }, + { key: "thinking", label: "ניתוח וכיוון", icon: Brain, statuses: ["brainstorming", "direction_approved", "analysis_enriched", "ready_for_writing"] }, { key: "writing", label: "כתיבת טיוטה", icon: PenLine, statuses: ["drafting", "qa_review", "drafted"] }, { key: "done", label: "סגירה", icon: CheckCircle2, statuses: ["exported", "reviewed", "final"] }, ]; diff --git a/web-ui/src/lib/api/cases.ts b/web-ui/src/lib/api/cases.ts index 509898b..88bd5cf 100644 --- a/web-ui/src/lib/api/cases.ts +++ b/web-ui/src/lib/api/cases.ts @@ -18,9 +18,13 @@ export type CaseStatus = | "uploading" | "processing" | "documents_ready" + | "analyst_verified" + | "research_complete" | "outcome_set" | "brainstorming" | "direction_approved" + | "analysis_enriched" + | "ready_for_writing" | "drafting" | "qa_review" | "drafted"