From 65a8048e2521a7c0760c2485444692109098a95f Mon Sep 17 00:00:00 2001 From: Marcel Date: Fri, 20 Mar 2026 16:22:25 +0100 Subject: [PATCH] feat(conversations): add new document link pre-filled with both persons (#33) Adds a link next to the summary that navigates to the new-document form with senderId and receiverId pre-filled from the current conversation. Co-Authored-By: Claude Sonnet 4.6 --- frontend/messages/de.json | 1 + frontend/messages/en.json | 1 + frontend/messages/es.json | 1 + frontend/src/routes/conversations/+page.svelte | 13 ++++++++++++- 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/frontend/messages/de.json b/frontend/messages/de.json index 3999cf27..52a3f977 100644 --- a/frontend/messages/de.json +++ b/frontend/messages/de.json @@ -142,6 +142,7 @@ "conv_no_results_text": "Versuchen Sie, den Zeitraum anzupassen.", "conv_swap_btn": "Personen tauschen", "conv_summary": "{count} Dokumente · {yearFrom}–{yearTo}", + "conv_new_doc_link": "Neues Dokument in dieser Korrespondenz", "admin_heading": "Admin Dashboard", "admin_tab_users": "Benutzer", diff --git a/frontend/messages/en.json b/frontend/messages/en.json index 2aa6bfb2..75fa54f9 100644 --- a/frontend/messages/en.json +++ b/frontend/messages/en.json @@ -142,6 +142,7 @@ "conv_no_results_text": "Try adjusting the time period.", "conv_swap_btn": "Swap persons", "conv_summary": "{count} documents · {yearFrom}–{yearTo}", + "conv_new_doc_link": "New document in this correspondence", "admin_heading": "Admin Dashboard", "admin_tab_users": "Users", diff --git a/frontend/messages/es.json b/frontend/messages/es.json index f60be0d2..58be11ed 100644 --- a/frontend/messages/es.json +++ b/frontend/messages/es.json @@ -142,6 +142,7 @@ "conv_no_results_text": "Intente ajustar el período de tiempo.", "conv_swap_btn": "Intercambiar personas", "conv_summary": "{count} documentos · {yearFrom}–{yearTo}", + "conv_new_doc_link": "Nuevo documento en esta correspondencia", "admin_heading": "Panel de administración", "admin_tab_users": "Usuarios", diff --git a/frontend/src/routes/conversations/+page.svelte b/frontend/src/routes/conversations/+page.svelte index 3c893a1b..787a44f5 100644 --- a/frontend/src/routes/conversations/+page.svelte +++ b/frontend/src/routes/conversations/+page.svelte @@ -211,7 +211,7 @@ const enrichedDocuments = $derived( {:else} -
+
{#if yearFrom !== null && yearTo !== null}

{m.conv_summary({ count: data.documents.length, yearFrom, yearTo })} @@ -221,6 +221,17 @@ const enrichedDocuments = $derived( {data.documents.length}

{/if} + + + + + {m.conv_new_doc_link()} +