fix(documents): always render undated badge in DocumentRow desktop column
Some checks failed
CI / Unit & Component Tests (pull_request) Failing after 2m54s
CI / OCR Service Tests (pull_request) Successful in 20s
CI / Backend Unit Tests (pull_request) Successful in 3m40s
CI / fail2ban Regex (pull_request) Successful in 41s
CI / Semgrep Security Scan (pull_request) Successful in 19s
CI / Compose Bucket Idempotency (pull_request) Successful in 1m2s
Some checks failed
CI / Unit & Component Tests (pull_request) Failing after 2m54s
CI / OCR Service Tests (pull_request) Successful in 20s
CI / Backend Unit Tests (pull_request) Successful in 3m40s
CI / fail2ban Regex (pull_request) Successful in 41s
CI / Semgrep Security Scan (pull_request) Successful in 19s
CI / Compose Bucket Idempotency (pull_request) Successful in 1m2s
The desktop right-column kept a leftover {#if doc.documentDate}…{:else}—{/if}
fallback that emitted a bare em-dash for undated documents, while the mobile
block already always rendered <DocumentDate>. DocumentDate defensively maps a
null date to the "Datum unbekannt" badge, so render it unconditionally — an
undated document is an absence, not an error, and never shows a bare "—".
Refs #668
This commit is contained in:
@@ -187,16 +187,15 @@ function safeTagColor(color: string | null | undefined): string {
|
|||||||
<!-- Right column — desktop only -->
|
<!-- Right column — desktop only -->
|
||||||
<div class="hidden flex-col gap-2 pl-4 font-sans text-sm text-ink-2 sm:flex sm:w-44 lg:w-56">
|
<div class="hidden flex-col gap-2 pl-4 font-sans text-sm text-ink-2 sm:flex sm:w-44 lg:w-56">
|
||||||
<div>
|
<div>
|
||||||
{#if doc.documentDate}
|
<!-- An undated document is an absence, not an error (#668): DocumentDate
|
||||||
|
defensively maps a null date to the "Datum unbekannt" badge, so we
|
||||||
|
always render it — never a bare em-dash fallback. -->
|
||||||
<DocumentDate
|
<DocumentDate
|
||||||
iso={doc.documentDate}
|
iso={doc.documentDate}
|
||||||
precision={doc.metaDatePrecision}
|
precision={doc.metaDatePrecision}
|
||||||
end={doc.metaDateEnd}
|
end={doc.metaDateEnd}
|
||||||
showRaw={false}
|
showRaw={false}
|
||||||
/>
|
/>
|
||||||
{:else}
|
|
||||||
—
|
|
||||||
{/if}
|
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span class="font-bold tracking-wide text-ink-3 uppercase">{m.docs_list_from()}</span>
|
<span class="font-bold tracking-wide text-ink-3 uppercase">{m.docs_list_from()}</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user