Each row in the document search list and the enrichment queue gets a WCAG-compliant (44px touch target) checkbox bound to bulkSelectionStore. Checkbox click does not trigger the row's stretched-link navigation — it sits inside the z-10 content sibling, the link is in the z-0 sibling, so click events do not bubble between them. Refs #225 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
24 lines
579 B
TypeScript
24 lines
579 B
TypeScript
import { redirect } from '@sveltejs/kit';
|
|
import { createApiClient } from '$lib/api.server';
|
|
|
|
export async function load({
|
|
fetch,
|
|
locals
|
|
}: {
|
|
fetch: typeof globalThis.fetch;
|
|
locals: App.Locals;
|
|
}) {
|
|
const canWrite =
|
|
locals.user?.groups?.some((g: { permissions: string[] }) =>
|
|
g.permissions.includes('WRITE_ALL')
|
|
) ?? false;
|
|
if (!canWrite) throw redirect(303, '/');
|
|
|
|
const api = createApiClient(fetch);
|
|
const result = await api.GET('/api/documents/incomplete');
|
|
|
|
const documents = result.response.ok ? (result.data ?? []) : [];
|
|
|
|
return { documents, canWrite };
|
|
}
|