feat(ui): collapsible date filter with sort + filter toggle on person row
Some checks failed
CI / Unit & Component Tests (push) Failing after 1m13s
CI / Backend Unit Tests (push) Has been cancelled
CI / Unit & Component Tests (pull_request) Failing after 1m10s
CI / Backend Unit Tests (pull_request) Failing after 2m33s

Move sort button and filter toggle to the person row, matching the
document search page pattern (sort + filter + count inline). Date
range inputs are now a collapsible section behind the filter toggle,
using slide transition and the same grid layout as the document
search advanced filters. Fix date input padding (add px-3).

Refs: #179

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-04-06 22:34:14 +02:00
parent c4715f1637
commit c8b4bce003
4 changed files with 124 additions and 119 deletions

View File

@@ -28,6 +28,7 @@ $effect(() => {
});
const isSinglePerson = $derived(!!senderId && !receiverId);
let showAdvanced = $state(false);
const RECENT_STORAGE_KEY = 'korrespondenz_recent_persons';
const MAX_RECENT = 5;
@@ -107,20 +108,23 @@ function selectPerson(id: string) {
bind:receiverId={receiverId}
initialSenderName={data.initialValues.senderName}
initialReceiverName={data.initialValues.receiverName}
onapplyFilters={applyFilters}
onswapPersons={swapPersons}
/>
<CorrespondenzFilterControls
senderId={senderId}
bind:fromDate={fromDate}
bind:toDate={toDate}
bind:sortDir={sortDir}
sortDir={sortDir}
showAdvanced={showAdvanced}
documentCount={data.documents.length}
onapplyFilters={applyFilters}
onswapPersons={swapPersons}
ontoggleSort={toggleSort}
ontoggleAdvanced={() => (showAdvanced = !showAdvanced)}
/>
{#if showAdvanced}
<CorrespondenzFilterControls
bind:fromDate={fromDate}
bind:toDate={toDate}
onapplyFilters={applyFilters}
/>
{/if}
{#if isSinglePerson}
<SinglePersonHintBar
senderName={senderName}