fix(quick-261002-icv): Freigaben-Matrix zeigt Bereichsnamen statt Kennungen
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -4,6 +4,7 @@ import { Fragment, useCallback, useEffect, useMemo, useState } from 'react';
|
|||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
import { useTranslations } from 'next-intl';
|
import { useTranslations } from 'next-intl';
|
||||||
import { useAuthStore } from '@/lib/stores/auth-store';
|
import { useAuthStore } from '@/lib/stores/auth-store';
|
||||||
|
import { useCategoryLabel } from '@/lib/use-category-label';
|
||||||
|
|
||||||
const API_URL = process.env.NEXT_PUBLIC_API_URL || 'http://localhost:3001';
|
const API_URL = process.env.NEXT_PUBLIC_API_URL || 'http://localhost:3001';
|
||||||
|
|
||||||
@@ -47,6 +48,7 @@ export default function AdminModuleGrantsPage() {
|
|||||||
const t = useTranslations('adminModules.grants');
|
const t = useTranslations('adminModules.grants');
|
||||||
const tGrantLabel = useTranslations('admin.groups.grants');
|
const tGrantLabel = useTranslations('admin.groups.grants');
|
||||||
const tCommon = useTranslations('common');
|
const tCommon = useTranslations('common');
|
||||||
|
const categoryLabel = useCategoryLabel();
|
||||||
const currentUser = useAuthStore((s) => s.user);
|
const currentUser = useAuthStore((s) => s.user);
|
||||||
|
|
||||||
const hasAccess = currentUser?.role === 'ADMIN' || currentUser?.role === 'SUPER_ADMIN';
|
const hasAccess = currentUser?.role === 'ADMIN' || currentUser?.role === 'SUPER_ADMIN';
|
||||||
@@ -291,7 +293,7 @@ export default function AdminModuleGrantsPage() {
|
|||||||
colSpan={filteredGroups.length + 1}
|
colSpan={filteredGroups.length + 1}
|
||||||
className="bg-muted/50 px-4 py-2 text-xs font-medium text-muted-foreground"
|
className="bg-muted/50 px-4 py-2 text-xs font-medium text-muted-foreground"
|
||||||
>
|
>
|
||||||
{category}
|
{categoryLabel(category)}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{mods.map((mod) => (
|
{mods.map((mod) => (
|
||||||
|
|||||||
Reference in New Issue
Block a user