feat: Refactor admin settings and user management
- Removed Admin Panel from SettingsPage and adjusted related logic. - Added EmailSettings component for SMTP configuration and testing. - Created admin navigation structure in adminNav.js for better organization. - Implemented AdminShell layout for consistent admin UI. - Added RequireAdmin component to protect admin routes. - Developed AdminHomePage for admin dashboard with navigation links. - Created AdminSystemPage for SMTP settings and placeholder metadata export. - Implemented AdminUsersPage for user management, including profile creation and editing.
This commit is contained in:
1 parent
190c0dd7fa
commit
bbc59457ac
11 files changed
+454
-298
No files matched your search
@@ -0,0 +1,61 @@
|
||||
/**
|
||||
* Gruppierte Admin-Navigation (Shell: Chips mobil, Seitenleiste Desktop).
|
||||
* @typedef {{ to: string, label: string, end?: boolean }} AdminNavItem
|
||||
* @typedef {{ id: string, label: string, items: AdminNavItem[] }} AdminNavGroup
|
||||
*/
|
||||
|
||||
/** @type {AdminNavGroup[]} */
|
||||
export const ADMIN_NAV_GROUPS = [
|
||||
{
|
||||
id: 'overview',
|
||||
label: 'Übersicht',
|
||||
items: [{ to: '/admin', label: 'Start', end: true }],
|
||||
},
|
||||
{
|
||||
id: 'users',
|
||||
label: 'Benutzerverwaltung',
|
||||
items: [{ to: '/admin/users', label: 'Profile & Rollen' }],
|
||||
},
|
||||
{
|
||||
id: 'features',
|
||||
label: 'Features',
|
||||
items: [
|
||||
{ to: '/admin/features', label: 'Feature-Registry' },
|
||||
{ to: '/admin/tier-limits', label: 'Tier-Limits' },
|
||||
{ to: '/admin/user-restrictions', label: 'User-Overrides' },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'subscription',
|
||||
label: 'Subscription',
|
||||
items: [
|
||||
{ to: '/admin/tiers', label: 'Tiers' },
|
||||
{ to: '/admin/coupons', label: 'Coupons' },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'training',
|
||||
label: 'Trainingstypen',
|
||||
items: [
|
||||
{ to: '/admin/training-types', label: 'Trainingstypen' },
|
||||
{ to: '/admin/activity-mappings', label: 'Activity-Mappings' },
|
||||
{ to: '/admin/training-profiles', label: 'Trainings-Profile' },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'goals',
|
||||
label: 'Ziele & Fokus',
|
||||
items: [
|
||||
{ to: '/admin/goal-types', label: 'Ziel-Typen' },
|
||||
{ to: '/admin/focus-areas', label: 'Focus Areas' },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'system',
|
||||
label: 'Basiseinstellungen',
|
||||
items: [
|
||||
{ to: '/admin/prompts', label: 'KI-Prompts' },
|
||||
{ to: '/admin/system', label: 'SMTP & Metadaten-Export' },
|
||||
],
|
||||
},
|
||||
]
|
||||
@@ -37,7 +37,7 @@ export function getMainNavItems(isAdmin) {
|
||||
Icon: icons[i]
|
||||
}))
|
||||
if (isAdmin) {
|
||||
raw.push({ to: '/admin/features', label: 'Admin', Icon: Shield })
|
||||
raw.push({ to: '/admin', label: 'Admin', end: false, Icon: Shield })
|
||||
}
|
||||
return raw
|
||||
}
|
||||
Reference in new issue
Block a user