feat(ui): collapsible date filter with sort + filter toggle on person row
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:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user