feat(workbench): add DBN Case Workbench guided case-preparation hub
Additive-only change: new workbench.php authenticated page with guided intake flow, evidence map, tool sequence, output checklist, and sessionStorage-only note persistence. Dashboard and public index get a new Case Workbench card. No existing tools, APIs, or prompts modified. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -318,6 +318,121 @@ function dbnToolsT(string $key, ?string $language = null): string
|
||||
return (string)($all[$language][$key] ?? $all['en'][$key] ?? $key);
|
||||
}
|
||||
|
||||
function dbnToolsWorkbenchCopy(?string $language = null): array
|
||||
{
|
||||
$language = dbnToolsNormalizeUiLanguage($language ?? dbnToolsCurrentLanguage());
|
||||
$copy = [
|
||||
'en' => [
|
||||
'title' => 'Case Workbench',
|
||||
'label' => 'Case Workbench',
|
||||
'sub' => 'Guided case flow',
|
||||
'description' => 'Plan a case, map evidence, and open the right legal tools in sequence without storing documents.',
|
||||
'badge' => 'Private session',
|
||||
'kicker' => 'Guided preparation',
|
||||
'hero_title' => 'One calm place to organise the next legal step.',
|
||||
'hero_text' => 'Use this workbench to frame the case, decide which tool to open next, and keep a local evidence map while your documents stay in memory by default.',
|
||||
'privacy_title' => 'Local notes only',
|
||||
'privacy_text' => 'This page saves notes in browser sessionStorage. It does not upload files or call tool APIs.',
|
||||
'clear_session' => 'Clear session',
|
||||
'all_tools' => 'All tools',
|
||||
'intake_title' => 'Case intake',
|
||||
'evidence_title' => 'Evidence map',
|
||||
'flow_title' => 'Recommended tool sequence',
|
||||
'outputs_title' => 'Output checklist',
|
||||
'role' => 'Who are you helping?',
|
||||
'choose' => 'Choose...',
|
||||
'role_parent' => 'Parent',
|
||||
'role_family' => 'Family member',
|
||||
'role_advocate' => 'Advocate or lawyer',
|
||||
'role_supporter' => 'Supporter',
|
||||
'case_type' => 'Case type',
|
||||
'case_barnevernet' => 'Barnevernet / child welfare',
|
||||
'case_custody' => 'Custody or residence',
|
||||
'case_access' => 'Contact / samvær',
|
||||
'case_echr' => 'ECHR / Strasbourg preparation',
|
||||
'deadline' => 'Next deadline',
|
||||
'language' => 'Working language',
|
||||
'main_concern' => 'Main concern',
|
||||
'main_concern_hint' => 'What decision, meeting, deadline, or document are you preparing for?',
|
||||
'documents' => 'Documents',
|
||||
'documents_hint' => 'List letters, decisions, reports, emails, or forms.',
|
||||
'meetings' => 'Meetings and audio',
|
||||
'meetings_hint' => 'List recordings, meeting notes, or conversations to transcribe.',
|
||||
'dates' => 'Dates and deadlines',
|
||||
'dates_hint' => 'List hearings, response deadlines, visits, decisions, and events.',
|
||||
'claims' => 'Claims and facts',
|
||||
'claims_hint' => 'List what the other side says, what you dispute, and what you can prove.',
|
||||
'missing' => 'Missing proof',
|
||||
'missing_hint' => 'List records, witnesses, messages, or sources still needed.',
|
||||
'bring_redact' => 'Bring back: safe text you can share with helpers.',
|
||||
'bring_transcribe' => 'Bring back: speaker notes, quotes, and follow-up issues.',
|
||||
'bring_timeline' => 'Bring back: dated events and urgent deadlines.',
|
||||
'bring_barnevernet' => 'Bring back: red flags, parties, and cited procedural issues.',
|
||||
'bring_research' => 'Bring back: legal angles, source excerpts, and uncertainty notes.',
|
||||
'bring_advocate' => 'Bring back: strongest brief sections and weak points.',
|
||||
'bring_corpus' => 'Bring back: source titles, sections, and exact citation context.',
|
||||
'open_tool' => 'Open tool',
|
||||
'output_lawyer' => 'Lawyer handoff pack',
|
||||
'output_barnevernet_response' => 'Barnevernet response preparation',
|
||||
'output_meeting_prep' => 'Meeting preparation note',
|
||||
'output_strasbourg' => 'Strasbourg / ECHR research prep',
|
||||
'next_step' => 'Next practical step',
|
||||
'next_step_hint' => 'Write the next action, owner, and deadline.',
|
||||
],
|
||||
'no' => [
|
||||
'title' => 'Saksarbeidsbenk',
|
||||
'label' => 'Saksarbeidsbenk',
|
||||
'sub' => 'Veiledet saksflyt',
|
||||
'description' => 'Planlegg saken, kartlegg bevis og åpne riktig verktøy i riktig rekkefølge uten å lagre dokumenter.',
|
||||
'badge' => 'Privat økt',
|
||||
'kicker' => 'Veiledet forberedelse',
|
||||
'hero_title' => 'Ett rolig sted for neste juridiske steg.',
|
||||
'hero_text' => 'Bruk arbeidsbenken til å ramme inn saken, velge neste verktøy og holde et lokalt beviskart mens dokumenter behandles i minnet som standard.',
|
||||
'privacy_title' => 'Kun lokale notater',
|
||||
'privacy_text' => 'Denne siden lagrer notater i nettleserens sessionStorage. Den laster ikke opp filer og kaller ikke verktøy-API-er.',
|
||||
],
|
||||
'uk' => [
|
||||
'title' => 'Робочий простір справи',
|
||||
'label' => 'Робочий простір справи',
|
||||
'sub' => 'Керований шлях справи',
|
||||
'description' => 'Плануйте справу, картуйте докази й відкривайте потрібні інструменти по черзі без збереження документів.',
|
||||
'badge' => 'Приватна сесія',
|
||||
'kicker' => 'Керована підготовка',
|
||||
'hero_title' => 'Одне спокійне місце для наступного юридичного кроку.',
|
||||
'hero_text' => 'Використовуйте цей простір, щоб описати справу, вибрати наступний інструмент і вести локальну карту доказів.',
|
||||
'privacy_title' => 'Лише локальні нотатки',
|
||||
'privacy_text' => 'Сторінка зберігає нотатки в sessionStorage браузера. Вона не завантажує файли і не викликає API інструментів.',
|
||||
],
|
||||
'pl' => [
|
||||
'title' => 'Panel pracy nad sprawą',
|
||||
'label' => 'Panel pracy nad sprawą',
|
||||
'sub' => 'Prowadzony tok sprawy',
|
||||
'description' => 'Zaplanuj sprawę, uporządkuj dowody i otwieraj właściwe narzędzia po kolei bez zapisywania dokumentów.',
|
||||
'badge' => 'Prywatna sesja',
|
||||
'kicker' => 'Prowadzone przygotowanie',
|
||||
'hero_title' => 'Jedno spokojne miejsce na kolejny krok prawny.',
|
||||
'hero_text' => 'Użyj panelu, aby opisać sprawę, wybrać następne narzędzie i prowadzić lokalną mapę dowodów.',
|
||||
'privacy_title' => 'Tylko lokalne notatki',
|
||||
'privacy_text' => 'Strona zapisuje notatki w sessionStorage przeglądarki. Nie przesyła plików i nie wywołuje API narzędzi.',
|
||||
],
|
||||
];
|
||||
|
||||
return array_merge($copy['en'], $copy[$language] ?? []);
|
||||
}
|
||||
|
||||
function dbnToolsWorkbenchMeta(?string $language = null): array
|
||||
{
|
||||
$copy = dbnToolsWorkbenchCopy($language);
|
||||
return [
|
||||
'label' => $copy['label'],
|
||||
'sub' => $copy['sub'],
|
||||
'description' => $copy['description'],
|
||||
'badge' => $copy['badge'],
|
||||
'url' => 'workbench.php',
|
||||
'icon' => 'WB',
|
||||
];
|
||||
}
|
||||
|
||||
function dbnToolsLaunchedTools(?string $language = null): array
|
||||
{
|
||||
$language = dbnToolsNormalizeUiLanguage($language ?? dbnToolsCurrentLanguage());
|
||||
|
||||
Reference in New Issue
Block a user