Folds the standalone /compose decision-editor route into the main case page so there is no more "sub-page" (mockup 18f), with the final 6-tab workflow order: סקירה · טיעונים ועמדות · אימות פסיקה · ההחלטה · טיוטות והערות · סוכנים. - New PositionsPanel — the chair's editing surface (threshold claims + issues SubsectionCards + ChairEditor + background prose + case precedents + finish rail), extracted verbatim from the former /compose "עמדות וטענות" tab. Drops only the doc-strip (the overview DocumentsPanel is the sole owner — no dup). - "טיעונים ועמדות" tab = PositionsPanel above + the aggregated by-party LegalArgumentsPanel in a collapsible below. - "אימות פסיקה" promoted to its own top-level tab (CitationVerificationPanel, was /compose tab 3); placed BEFORE "ההחלטה" — verify citations, then write (INV-AH: the writer cites only verified precedents). - "ההחלטה" stays the single 12-block editor (DecisionBlocksPanel) — no longer duplicated between /compose and the case page. - Tabs are now controlled; the "פתח עורך החלטה" CTA switches to the ההחלטה tab instead of navigating to the deleted route. - /compose route deleted; header-context /compose special-case removed. No duplication remains (G2): blocks editor single, docs single (overview), citation-verify single. Design-gate: mockup 18f approved in Claude Design X17. tsc --noEmit + eslint clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
31 lines
1.3 KiB
TypeScript
31 lines
1.3 KiB
TypeScript
/**
|
|
* Resolves the dynamic subtitle shown next to the brand in the AppShell
|
|
* header. Reflects the current section so the user always sees where they
|
|
* are without scanning the nav row.
|
|
*
|
|
* Special-cases case routes (`/cases/{caseNumber}`) so the subtitle includes
|
|
* the case number — the most useful piece of context during decision drafting.
|
|
*/
|
|
export function headerSubtitle(pathname: string): string {
|
|
if (pathname === "/") return "בית";
|
|
|
|
if (pathname.startsWith("/cases/")) {
|
|
const [, , slug] = pathname.split("/");
|
|
if (!slug || slug === "new") return "תיק חדש";
|
|
const decoded = decodeURIComponent(slug);
|
|
return `ערר ${decoded}`;
|
|
}
|
|
|
|
if (pathname.startsWith("/archive")) return "ארכיון";
|
|
if (pathname.startsWith("/training")) return "אימון סגנון";
|
|
if (pathname.startsWith("/precedents")) return "ספריית פסיקה";
|
|
if (pathname.startsWith("/digests")) return "יומונים";
|
|
if (pathname.startsWith("/methodology")) return "מתודולוגיה";
|
|
if (pathname.startsWith("/skills")) return "מיומנויות";
|
|
if (pathname.startsWith("/diagnostics")) return "אבחון";
|
|
if (pathname.startsWith("/settings")) return "הגדרות";
|
|
if (pathname.startsWith("/feedback")) return "הערות יו״ר";
|
|
|
|
return "ניהול תיקים";
|
|
}
|