refactor(person): remove redundant conversations link from header
Some checks failed
CI / Unit & Component Tests (push) Failing after 1m17s
CI / Backend Unit Tests (push) Successful in 1m52s
CI / E2E Tests (push) Has started running

The co-correspondent chips already link directly to the conversation view
pre-filled with both persons, making the generic "Konversationen anzeigen"
header link redundant. Removed the link and the person_btn_conversations
i18n key from all three locales.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-03-20 11:27:25 +01:00
parent 931a8dac95
commit 761c903111
5 changed files with 9 additions and 13 deletions

View File

@@ -166,17 +166,20 @@ test.describe('Person detail — sent and received documents', () => {
});
test.describe('Person detail — conversations link', () => {
test('has a conversations link that pre-fills the person', async ({ page }) => {
test('co-correspondent chips link to conversations pre-filled with both persons', async ({ page }) => {
await page.goto('/persons');
// Exclude /persons/new to avoid matching the "New person" button
const firstLink = page.locator('a[href^="/persons/"]:not([href="/persons/new"])').first();
const href = await firstLink.getAttribute('href');
const personId = href!.split('/persons/')[1];
await firstLink.click();
// Use the specific person-detail link text, not the nav "Konversationen" link
const convLink = page.getByRole('link', { name: /Konversationen anzeigen/i });
await expect(convLink).toBeVisible();
await expect(convLink).toHaveAttribute('href', `/conversations?senderId=${personId}`);
await page.waitForSelector('[data-hydrated]');
// Co-correspondent chips link to /conversations?senderId=X&receiverId=Y
const chip = page.locator(`a[href^="/conversations?senderId=${personId}&receiverId="]`).first();
if (await chip.count() > 0) {
const chipHref = await chip.getAttribute('href');
expect(chipHref).toMatch(/\/conversations\?senderId=.+&receiverId=.+/);
}
});
});

View File

@@ -189,5 +189,4 @@
"comp_taginput_placeholder_filter": "Nach Schlagworten filtern...",
"comp_taginput_remove": "Schlagwort entfernen",
"comp_taginput_create_hint": "Enter drücken um Schlagwort zu erstellen.",
"person_btn_conversations": "Konversationen anzeigen"
}

View File

@@ -189,5 +189,4 @@
"comp_taginput_placeholder_filter": "Filter by tags...",
"comp_taginput_remove": "Remove tag",
"comp_taginput_create_hint": "Press Enter to create tag.",
"person_btn_conversations": "View conversations"
}

View File

@@ -189,5 +189,4 @@
"comp_taginput_placeholder_filter": "Filtrar por etiquetas...",
"comp_taginput_remove": "Eliminar etiqueta",
"comp_taginput_create_hint": "Pulse Enter para crear etiqueta.",
"person_btn_conversations": "Ver conversaciones"
}

View File

@@ -199,10 +199,6 @@
{person.firstName} {person.lastName}
</h1>
<div class="ml-4 flex-shrink-0 flex items-center gap-2">
<a href="/conversations?senderId={person.id}" class="inline-flex items-center gap-1 text-sm font-medium text-brand-navy/60 hover:text-brand-navy transition-colors">
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"/></svg>
{m.person_btn_conversations()}
</a>
{#if data.canWrite}
<button onclick={() => (editMode = true)} class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-bold uppercase tracking-widest border border-gray-300 text-gray-500 rounded hover:border-brand-navy hover:text-brand-navy transition-colors">
<img src="/degruyter-icons/Simple/Small-16px/SVG/Action/Edit-Content-SM.svg" alt="" aria-hidden="true" class="w-3.5 h-3.5" />