feat(geschichten): wire discovery integrations on Person and Document pages
Person detail (/persons/[id]):
- Server load fetches GET /api/geschichten?status=PUBLISHED&personId={id}
in parallel with the existing person/document queries.
- Renders <GeschichtenCard> below the received-documents list when the
person has at least one published story.
Document detail (/documents/[id]):
- Server load adds the same parallel call with documentId={id}.
- DocumentTopBar gains geschichten + canBlogWrite props that flow through
to DocumentMetadataDrawer.
- DocumentMetadataDrawer's grid expands to lg:grid-cols-4 when the
Geschichten column should appear (stories exist OR user can author),
and shows "+ Geschichte anhängen" / "Alle anzeigen" links following the
>= 3-story threshold from issue comment #5758.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -7,6 +7,7 @@ import NameHistoryCard from './NameHistoryCard.svelte';
|
||||
import CoCorrespondentsList from './CoCorrespondentsList.svelte';
|
||||
import PersonDocumentList from './PersonDocumentList.svelte';
|
||||
import PersonRelationshipsCard from './PersonRelationshipsCard.svelte';
|
||||
import GeschichtenCard from '$lib/components/GeschichtenCard.svelte';
|
||||
|
||||
let { data } = $props();
|
||||
|
||||
@@ -92,6 +93,17 @@ const coCorrespondents = $derived.by(() => {
|
||||
emptyMessage={m.person_no_received_docs()}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{#if data.geschichten && data.geschichten.length > 0}
|
||||
<div class="mt-6">
|
||||
<GeschichtenCard
|
||||
geschichten={data.geschichten}
|
||||
personId={person.id}
|
||||
personName={person.displayName}
|
||||
canWrite={data.canBlogWrite ?? false}
|
||||
/>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user