fix(#77 frontend): separate מספר-תיק field on committee upload + editable case_number in edit sheet

Pairs with the backend PR. Stops the citation (מראה-מקום) from being stored
as the identifier, and lets a wrong identifier be corrected after the fact.

- upload sheet: new required 'מספר תיק (מזהה ייחודי)' field for committee
  decisions → sent as case_number; the citation field is now sent as the
  separate citation (→ citation_formatted) instead of as case_number.
- edit sheet: the case_number block is now an editable input (was read-only).
  Halachot/chunks key off case_law_id (UUID), so renaming case_number is safe.
- precedent-library.ts: InternalDecisionUploadInput += citation; PrecedentPatch
  += case_number.
- types.ts: regenerated (api:types) — PrecedentUpdateRequest now carries
  case_number.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-02 12:17:16 +00:00
parent fc0c36b2f8
commit 7be1c3162c
4 changed files with 1065 additions and 24 deletions

View File

@@ -387,6 +387,9 @@ export function isCommitteeCitation(citation: string): boolean {
export type InternalDecisionUploadInput = {
file: File;
case_number: string;
/** Full citation (מראה-מקום), stored as citation_formatted. Distinct from
* the canonical case_number identifier. */
citation?: string;
chair_name: string;
district: CommitteeDistrict | string;
case_name?: string;
@@ -406,6 +409,7 @@ export function useUploadInternalDecision() {
const fd = new FormData();
fd.append("file", input.file);
fd.append("case_number", input.case_number);
if (input.citation) fd.append("citation", input.citation);
fd.append("chair_name", input.chair_name);
fd.append("district", input.district);
if (input.case_name) fd.append("case_name", input.case_name);
@@ -488,6 +492,7 @@ export function useUnlinkRelatedCase(caseId: string) {
}
export type PrecedentPatch = Partial<{
case_number: string;
case_name: string;
court: string;
decision_date: string;

File diff suppressed because it is too large Load Diff