refactor(documents): narrow sort prop type to full SortMode union

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-04-20 11:19:40 +02:00
parent a62ccd428b
commit 4cdec7ec71

View File

@@ -7,6 +7,8 @@ import type { components } from '$lib/generated/api';
type DocumentSearchItem = components['schemas']['DocumentSearchItem']; type DocumentSearchItem = components['schemas']['DocumentSearchItem'];
type SortMode = 'DATE' | 'TITLE' | 'SENDER' | 'RECEIVER' | 'UPLOAD_DATE' | 'RELEVANCE';
let { let {
items, items,
canWrite, canWrite,
@@ -20,7 +22,7 @@ let {
error?: string | null; error?: string | null;
total?: number; total?: number;
q?: string; q?: string;
sort?: string; sort?: SortMode;
} = $props(); } = $props();
const groups = $derived.by(() => { const groups = $derived.by(() => {