diff --git a/frontend/src/lib/document/DocumentMetadataDrawer.svelte b/frontend/src/lib/document/DocumentMetadataDrawer.svelte index 01ecc62a..4b8081e9 100644 --- a/frontend/src/lib/document/DocumentMetadataDrawer.svelte +++ b/frontend/src/lib/document/DocumentMetadataDrawer.svelte @@ -4,6 +4,8 @@ import { formatDate } from '$lib/shared/utils/date'; import { formatDocumentStatus } from '$lib/document/documentStatusLabel'; import { getInitials, personAvatarColor } from '$lib/person/personFormat'; import RelationshipPill from '$lib/person/relationship/RelationshipPill.svelte'; +import DocumentDate from './DocumentDate.svelte'; +import type { DatePrecision } from '$lib/shared/utils/documentDate'; type Person = { id: string; firstName?: string | null; lastName: string; displayName: string }; type Tag = { id: string; name: string }; @@ -16,6 +18,9 @@ type GeschichteSummary = { type Props = { documentDate: string | null; + metaDatePrecision?: DatePrecision | null; + metaDateEnd?: string | null; + metaDateRaw?: string | null; location: string | null; status: string; sender: Person | null; @@ -29,6 +34,9 @@ type Props = { let { documentDate, + metaDatePrecision = null, + metaDateEnd = null, + metaDateRaw = null, location, status, sender, @@ -59,7 +67,6 @@ function formatGeschichteDate(g: GeschichteSummary): string { return formatDate(g.publishedAt.slice(0, 10), 'short'); } -const formattedDate = $derived(documentDate ? formatDate(documentDate) : '—'); const displayLocation = $derived(location ?? '—'); const statusLabel = $derived(formatDocumentStatus(status)); const visibleReceivers = $derived(receivers.slice(0, VISIBLE_RECEIVER_LIMIT)); @@ -105,7 +112,18 @@ function getFullName(person: Person): string {
- {shortDate} - {longDate} -
+ {#if dateLabel} +{dateLabel}
{/if}