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:
@@ -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(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user