feat(invites): show empty state when no groups exist in invite form
When groups load successfully but the list is empty, render a quiet "Keine Gruppen vorhanden." message rather than a blank section that leaves users uncertain whether groups failed to load. Adds admin_new_invite_no_groups i18n key to de/en/es. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -267,6 +267,8 @@ function statusIcon(status: string) {
|
||||
>
|
||||
{m.admin_invite_groups_load_error()}
|
||||
</div>
|
||||
{:else if data.groups.length === 0}
|
||||
<p class="font-sans text-xs text-ink-3 italic">{m.admin_new_invite_no_groups()}</p>
|
||||
{:else}
|
||||
<UserGroupsSection groups={data.groups} />
|
||||
{/if}
|
||||
|
||||
@@ -368,5 +368,7 @@ describe('admin/invites page', () => {
|
||||
|
||||
expect(document.querySelectorAll('input[name="groupIds"]')).toHaveLength(0);
|
||||
expect(document.querySelector('.bg-amber-50')).toBeNull();
|
||||
// empty-state message visible — "Keine Gruppen vorhanden." in de locale
|
||||
await expect.element(page.getByText(/keine gruppen/i)).toBeVisible();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user