rework issue system
This commit is contained in:
@@ -104,6 +104,11 @@ const PERMISSION_SUB_GROUPS: Record<string, Record<string, string[]>> = {
|
||||
'Anfragen': ['create_request', 'approve', 'link_orders', 'order_for_user', 'edit'],
|
||||
'Widget': ['widget'],
|
||||
},
|
||||
issues: {
|
||||
'Ansehen': ['view_own', 'view_all'],
|
||||
'Bearbeiten': ['create', 'change_status', 'edit', 'delete'],
|
||||
'Admin': ['edit_settings'],
|
||||
},
|
||||
admin: {
|
||||
'Allgemein': ['view', 'write'],
|
||||
'Services': ['view_services', 'edit_services'],
|
||||
|
||||
@@ -193,12 +193,15 @@ function Sidebar({ mobileOpen, onMobileClose }: SidebarProps) {
|
||||
ausruestungSubItems.push({ text: 'Katalog', path: `/ausruestungsanfrage?tab=${ausruestungTabIdx}` });
|
||||
|
||||
// Build Issues sub-items dynamically (tab order must match Issues.tsx)
|
||||
const issuesSubItems: SubItem[] = [{ text: 'Meine Issues', path: '/issues?tab=0' }];
|
||||
const issuesSubItems: SubItem[] = [
|
||||
{ text: 'Meine Issues', path: '/issues?tab=0' },
|
||||
{ text: 'Zugewiesene', path: '/issues?tab=1' },
|
||||
];
|
||||
if (hasPermission('issues:view_all')) {
|
||||
issuesSubItems.push({ text: 'Alle Issues', path: '/issues?tab=1' });
|
||||
issuesSubItems.push({ text: 'Alle Issues', path: '/issues?tab=2' });
|
||||
}
|
||||
if (hasPermission('issues:manage')) {
|
||||
issuesSubItems.push({ text: 'Erledigte Issues', path: `/issues?tab=${issuesSubItems.length}` });
|
||||
if (hasPermission('issues:edit_settings')) {
|
||||
issuesSubItems.push({ text: 'Kategorien', path: `/issues?tab=${issuesSubItems.length}` });
|
||||
}
|
||||
|
||||
const items = baseNavigationItems
|
||||
|
||||
Reference in New Issue
Block a user