Remove committee_type from case wizard and header

The committee_type field in FastAPI's CaseCreateRequest is a leftover
with no meaningful UI. Appeals against a ועדה מקומית / ועדה מחוזית are
legally distinguishable by case-number range, not by a picked committee
label; appeals against a ועדת ערר decision go to בית משפט לעניינים
מנהליים and never enter this system at all. The backend retains its
"ועדה מקומית" default, which is what we'd send anyway.

Drop the Select from the wizard's basics step and the "ועדה" row from
the case detail header. The Case TS type keeps the optional field so
existing API responses still parse cleanly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-11 16:36:50 +00:00
parent 10540a38b4
commit 75ea6825b2
4 changed files with 6 additions and 37 deletions

View File

@@ -834,13 +834,13 @@
"description": "Port new case wizard, bulk upload, inline forms on case detail. Use react-hook-form + zod with schemas in lib/schemas/<entity>.ts. Build shared <WizardShell> from shadcn Card + Progress + Tabs. Build <DropZone> (react-dropzone + shadcn). Integrate SSE for upload progress via lib/sse.ts. Plan: ~/.claude/plans/joyful-marinating-sutton.md.", "description": "Port new case wizard, bulk upload, inline forms on case detail. Use react-hook-form + zod with schemas in lib/schemas/<entity>.ts. Build shared <WizardShell> from shadcn Card + Progress + Tabs. Build <DropZone> (react-dropzone + shadcn). Integrate SSE for upload progress via lib/sse.ts. Plan: ~/.claude/plans/joyful-marinating-sutton.md.",
"details": "See full plan at ~/.claude/plans/joyful-marinating-sutton.md for architecture, critical files, risks, and open questions. This task is phase 4 of 7 in the legal-ai UI rewrite from vanilla HTML to Next.js 15 + shadcn/ui.", "details": "See full plan at ~/.claude/plans/joyful-marinating-sutton.md for architecture, critical files, risks, and open questions. This task is phase 4 of 7 in the legal-ai UI rewrite from vanilla HTML to Next.js 15 + shadcn/ui.",
"testStrategy": "Users can create a new case via the multi-step wizard (case appears in Gitea + Paperclip), upload documents with live SSE progress, and edit case fields inline.", "testStrategy": "Users can create a new case via the multi-step wizard (case appears in Gitea + Paperclip), upload documents with live SSE progress, and edit case fields inline.",
"status": "in-progress", "status": "done",
"dependencies": [ "dependencies": [
"85" "85"
], ],
"priority": "medium", "priority": "medium",
"subtasks": [], "subtasks": [],
"updatedAt": "2026-04-11T16:18:28.714Z" "updatedAt": "2026-04-11T16:25:55.569Z"
}, },
{ {
"id": "87", "id": "87",
@@ -884,9 +884,9 @@
], ],
"metadata": { "metadata": {
"version": "1.0.0", "version": "1.0.0",
"lastModified": "2026-04-11T16:18:28.714Z", "lastModified": "2026-04-11T16:25:55.570Z",
"taskCount": 58, "taskCount": 58,
"completedCount": 52, "completedCount": 53,
"tags": [ "tags": [
"master" "master"
] ]

View File

@@ -55,10 +55,6 @@ export function CaseHeader({ data }: { data?: CaseDetail }) {
עודכן עודכן
</dt> </dt>
<dd className="text-ink-soft tabular-nums">{formatDate(data?.updated_at)}</dd> <dd className="text-ink-soft tabular-nums">{formatDate(data?.updated_at)}</dd>
<dt className="text-ink-muted text-[0.72rem] uppercase tracking-wider">
ועדה
</dt>
<dd className="text-ink-soft">{data?.committee_type ?? "—"}</dd>
</dl> </dl>
</div> </div>
</CardContent> </CardContent>

View File

@@ -16,7 +16,7 @@ import {
import { PartiesField } from "@/components/wizard/parties-field"; import { PartiesField } from "@/components/wizard/parties-field";
import { useCreateCase } from "@/lib/api/cases"; import { useCreateCase } from "@/lib/api/cases";
import { import {
caseCreateSchema, committeeTypes, expectedOutcomes, caseCreateSchema, expectedOutcomes,
type CaseCreateInput, type CaseCreateInput,
} from "@/lib/schemas/case"; } from "@/lib/schemas/case";
@@ -31,7 +31,7 @@ type StepKey = (typeof STEPS)[number]["key"];
/* Fields validated at each step — lets the user fix just what's on screen /* Fields validated at each step — lets the user fix just what's on screen
* before moving forward, instead of surfacing all errors from page 1. */ * before moving forward, instead of surfacing all errors from page 1. */
const STEP_FIELDS: Record<StepKey, (keyof CaseCreateInput)[]> = { const STEP_FIELDS: Record<StepKey, (keyof CaseCreateInput)[]> = {
basics: ["case_number", "title", "committee_type"], basics: ["case_number", "title"],
parties: ["appellants", "respondents"], parties: ["appellants", "respondents"],
details: ["subject", "hearing_date", "expected_outcome", "notes", "property_address", "permit_number"], details: ["subject", "hearing_date", "expected_outcome", "notes", "property_address", "permit_number"],
}; };
@@ -57,7 +57,6 @@ export function CaseWizard() {
subject: "", subject: "",
property_address: "", property_address: "",
permit_number: "", permit_number: "",
committee_type: "ועדה מקומית",
hearing_date: "", hearing_date: "",
notes: "", notes: "",
expected_outcome: "", expected_outcome: "",
@@ -137,25 +136,6 @@ export function CaseWizard() {
<Input id="title" {...form.register("title")} className="mt-1" /> <Input id="title" {...form.register("title")} className="mt-1" />
<FieldError message={form.formState.errors.title?.message} /> <FieldError message={form.formState.errors.title?.message} />
</div> </div>
<div>
<Label className="text-navy">סוג ועדה</Label>
<Controller
control={form.control}
name="committee_type"
render={({ field }) => (
<Select value={field.value} onValueChange={field.onChange} dir="rtl">
<SelectTrigger className="mt-1">
<SelectValue />
</SelectTrigger>
<SelectContent>
{committeeTypes.map((t) => (
<SelectItem key={t} value={t}>{t}</SelectItem>
))}
</SelectContent>
</Select>
)}
/>
</div>
</div> </div>
)} )}

View File

@@ -24,12 +24,6 @@ const dateString = z
message: "תאריך חייב להיות בפורמט YYYY-MM-DD", message: "תאריך חייב להיות בפורמט YYYY-MM-DD",
}); });
export const committeeTypes = [
"ועדה מקומית",
"ועדה מחוזית",
"ועדת ערר",
] as const;
export const expectedOutcomes = [ export const expectedOutcomes = [
{ value: "", label: "— לא נקבע —" }, { value: "", label: "— לא נקבע —" },
{ value: "rejection", label: "דחייה" }, { value: "rejection", label: "דחייה" },
@@ -54,7 +48,6 @@ export const caseCreateSchema = z.object({
subject: z.string().trim().max(500), subject: z.string().trim().max(500),
property_address: z.string().trim().max(200), property_address: z.string().trim().max(200),
permit_number: z.string().trim().max(100), permit_number: z.string().trim().max(100),
committee_type: z.enum(committeeTypes),
hearing_date: dateString, hearing_date: dateString,
notes: z.string().trim().max(2000), notes: z.string().trim().max(2000),
expected_outcome: z.enum( expected_outcome: z.enum(