Files
familienarchiv/frontend/src/lib/user/UserGroupsSection.svelte
Marcel 62c807b7fe
All checks were successful
CI / Unit & Component Tests (push) Successful in 3m11s
CI / OCR Service Tests (push) Successful in 17s
CI / Backend Unit Tests (push) Successful in 4m22s
CI / fail2ban Regex (push) Successful in 39s
CI / Compose Bucket Idempotency (push) Successful in 56s
fix(invites): resolve svelte-check warnings in UserGroupsSection and page.server.test
Use untrack() for intentional one-time prop seed in UserGroupsSection.
Add explicit LoadData type alias in page.server.test to avoid void|Record<string,any> union.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 19:26:53 +02:00

31 lines
764 B
Svelte

<script lang="ts">
import { untrack } from 'svelte';
import { m } from '$lib/paraglide/messages.js';
let {
groups,
selectedGroupIds = []
}: {
groups: { id: string; name: string }[];
selectedGroupIds?: string[];
} = $props();
let selected = $state<string[]>(untrack(() => [...selectedGroupIds]));
</script>
<fieldset class="flex flex-wrap gap-3 border-none p-0">
<legend class="sr-only">{m.admin_new_invite_groups()}</legend>
{#each groups as group (group.id)}
<label class="inline-flex min-h-[44px] items-center gap-2 text-sm text-ink-2">
<input
type="checkbox"
name="groupIds"
value={group.id}
bind:group={selected}
class="rounded border-line text-ink focus:ring-focus-ring"
/>
{group.name}
</label>
{/each}
</fieldset>