diff --git a/frontend/src/lib/document/DocumentEditLayout.svelte b/frontend/src/lib/document/DocumentEditLayout.svelte index c32887c6..2b72e58c 100644 --- a/frontend/src/lib/document/DocumentEditLayout.svelte +++ b/frontend/src/lib/document/DocumentEditLayout.svelte @@ -209,7 +209,6 @@ async function handleReplaceFile(e: Event) { bind:dateIso={dateIso} bind:precision={datePrecision} bind:endDateIso={dateEndIso} - rawDate={doc.metaDateRaw ?? ''} initialDateIso={doc.documentDate ?? ''} initialLocation={doc.location ?? ''} initialSenderName={doc.sender?.displayName ?? ''} diff --git a/frontend/src/lib/document/WhoWhenSection.svelte b/frontend/src/lib/document/WhoWhenSection.svelte index 8c49a72b..4912f8d7 100644 --- a/frontend/src/lib/document/WhoWhenSection.svelte +++ b/frontend/src/lib/document/WhoWhenSection.svelte @@ -16,7 +16,6 @@ let { dateIso = $bindable(''), precision = $bindable('DAY'), endDateIso = $bindable(''), - rawDate = '', initialDateIso = '', initialLocation = '', initialSenderName = '', @@ -30,7 +29,6 @@ let { dateIso?: string; precision?: DatePrecision; endDateIso?: string; - rawDate?: string; initialDateIso?: string; initialLocation?: string; initialSenderName?: string; @@ -179,15 +177,6 @@ $effect(() => { {/if} - - - {#if rawDate && rawDate.trim().length > 0} -
-

{m.date_original_label()}

-

{rawDate}

- -
- {/if} {/if} diff --git a/frontend/src/lib/document/WhoWhenSection.svelte.test.ts b/frontend/src/lib/document/WhoWhenSection.svelte.test.ts index f2d7746f..136c260c 100644 --- a/frontend/src/lib/document/WhoWhenSection.svelte.test.ts +++ b/frontend/src/lib/document/WhoWhenSection.svelte.test.ts @@ -93,13 +93,12 @@ describe('WhoWhenSection — precision controls', () => { expect(document.querySelector('input#metaDateEnd')).not.toBeNull(); }); - it('renders the raw cell as static text (not an editable input) and escapes it', async () => { - render(WhoWhenSection, { rawDate: 'Sommer 1916' }); - const raw = document.querySelector('[data-testid="who-when-raw"]'); - expect(raw).not.toBeNull(); - // Verbatim shown as escaped text; no injected element. - expect(raw?.textContent).toContain('Sommer 1916'); - expect(raw?.querySelector('b')).toBeNull(); + it('never renders the raw cell, and never re-submits it via a hidden input', async () => { + render(WhoWhenSection, {}); + // The confusing "Originaltext" line is gone … + expect(document.querySelector('[data-testid="who-when-raw"]')).toBeNull(); + // … and editing no longer round-trips metaDateRaw to the backend. + expect(document.querySelector('input[name="metaDateRaw"]')).toBeNull(); }); });