Fix case detail: document fields, expected-outcome label, drop debug note

Three user-reported bugs on /cases/[caseNumber]:

1. Documents tab showed "9 מסמכים" in the count but rendered nothing —
   DocumentsPanel was reading filename/category/status/size_bytes/uploaded_at,
   but the real FastAPI payload (case_get → db.list_documents) returns
   title/doc_type/extraction_status/page_count/created_at. Rewrote the
   panel against the actual document row shape, added a CaseDocument
   type alias in lib/api/cases.ts, mapped doc_type to Hebrew labels
   (כתב ערר / כתב תשובה / ...) and extraction_status likewise.

2. The "פעולות" tab showed a debug-flavoured paragraph "עריכת פרטי התיק
   נשמרת מיד דרך PUT /api/cases/1033-25" — that was internal wording,
   not user copy. Removed.

3. Overview tab showed the raw enum value "full_acceptance" in the
   expected-outcome line. Mapped through the existing expectedOutcomes
   label array so it now reads "קבלה מלאה".

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-11 18:00:24 +00:00
parent cbe9d60901
commit 916360e9b2
4 changed files with 121 additions and 70 deletions

View File

@@ -46,15 +46,21 @@ export type Case = {
hearing_date?: string | null;
};
export type CaseDocument = {
id: string;
case_id: string;
doc_type: string;
title: string;
file_path: string;
page_count: number | null;
extraction_status: string;
created_at: string;
practice_area?: PracticeArea;
appeal_subtype?: AppealSubtype;
};
export type CaseDetail = Case & {
documents?: Array<{
id: number | string;
filename: string;
category?: string | null;
status?: string;
uploaded_at?: string;
size_bytes?: number;
}>;
documents?: CaseDocument[];
blocks?: Array<{ code: string; status?: string; char_count?: number }>;
};