feat: Persons section redesign — Concept A (Enriched Directory) #159

Merged
marcel merged 19 commits from feat/persons-redesign-concept-a into main 2026-03-29 21:36:30 +02:00
4 changed files with 14 additions and 4 deletions
Showing only changes of commit 241e4874ad - Show all commits

1
frontend/.gitignore vendored
View File

@@ -6,6 +6,7 @@ node_modules
.netlify
.wrangler
/.svelte-kit
/.svelte-kit-backup
/build
# OS

View File

@@ -8,6 +8,10 @@ bun.lockb
# Miscellaneous
/static/
# Build artifacts
/.svelte-kit/
/.svelte-kit-backup/
# Generated files
/src/lib/generated/
/src/lib/paraglide/

View File

@@ -45,8 +45,11 @@ export async function load({ url, fetch }) {
}
const documents: Document[] = docsResult?.data ?? [];
const allPersons: { id: string; firstName: string; lastName: string }[] =
personsResult.data ?? [];
const allPersons = (personsResult.data ?? []) as {
id: string;
firstName: string;
lastName: string;
}[];
const senderObj = allPersons.find((p) => p.id === senderId);
const receiverObj = allPersons.find((p) => p.id === receiverId);

View File

@@ -6,8 +6,10 @@ vi.mock('$lib/api.server', () => ({ createApiClient: vi.fn() }));
import { createApiClient } from '$lib/api.server';
const mockFetch = vi.fn() as unknown as typeof fetch;
const mockLocals = { user: { groups: [{ permissions: ['READ_ALL'] }] } };
const mockLocalsWriter = { user: { groups: [{ permissions: ['WRITE_ALL'] }] } };
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const mockLocals = { user: { groups: [{ permissions: ['READ_ALL'] }] } } as any;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const mockLocalsWriter = { user: { groups: [{ permissions: ['WRITE_ALL'] }] } } as any;
beforeEach(() => vi.clearAllMocks());