Remove the read-only "Originaltext" date field that confuses editors (#710) #712

Merged
marcel merged 4 commits from feat/issue-710-remove-originaltext into main 2026-06-01 20:35:40 +02:00
2 changed files with 13 additions and 1 deletions
Showing only changes of commit d5bf401085 - Show all commits

View File

@@ -113,7 +113,7 @@ function getFullName(person: Person): string {
<div>
<dt class="font-sans text-xs font-medium text-ink-3">{m.doc_details_field_date()}</dt>
<dd class="text-ink">
{#if documentDate || metaDateRaw}
{#if documentDate}
<DocumentDate
iso={documentDate}
precision={metaDatePrecision}

View File

@@ -58,6 +58,18 @@ describe('DocumentMetadataDrawer', () => {
expect(dashTexts.length).toBeGreaterThan(0);
});
it('shows an em-dash and never the raw cell for an undated, raw-only document', async () => {
render(DocumentMetadataDrawer, {
props: { ...baseProps, documentDate: null, metaDateRaw: 'Sommer 1916' }
});
await expect.element(page.getByText('Sommer 1916')).not.toBeInTheDocument();
const dashTexts = Array.from(document.querySelectorAll('dd, p'))
.map((el) => el.textContent?.trim())
.filter((t) => t === '—');
expect(dashTexts.length).toBeGreaterThan(0);
});
it('renders the no-persons placeholder when sender and receivers are empty', async () => {
render(DocumentMetadataDrawer, { props: baseProps });