2026-06-29 07:55:47 +02:00
|
|
|
import React from 'react';
|
2026-06-29 11:01:39 +02:00
|
|
|
import { NavLink, Outlet } from 'react-router-dom';
|
2026-06-29 07:55:47 +02:00
|
|
|
import { useTranslation } from 'react-i18next';
|
|
|
|
|
|
|
|
|
|
export function SettingsPage() {
|
2026-06-29 11:01:39 +02:00
|
|
|
const { t } = useTranslation();
|
2026-06-29 07:55:47 +02:00
|
|
|
|
2026-06-29 11:01:39 +02:00
|
|
|
const navItems = [
|
2026-07-03 19:50:18 +00:00
|
|
|
{ to: '/settings/profile', label: t('settings.profile'), icon: '\ud83d\udc64' },
|
2026-07-04 00:27:19 +00:00
|
|
|
{ to: '/settings/system', label: t('systemSettings.title'), icon: '\u2699\ufe0f' },
|
2026-07-03 19:50:18 +00:00
|
|
|
{ to: '/settings/roles', label: t('settings.roles'), icon: '\ud83d\udd11' },
|
|
|
|
|
{ to: '/settings/users', label: t('settings.users'), icon: '\ud83d\udc65' },
|
2026-07-15 23:27:11 +02:00
|
|
|
{ to: '/settings/groups', label: t('settings.groups', 'Gruppen'), icon: '\ud83d\udc65\ud83d\udcac' },
|
2026-07-03 19:50:18 +00:00
|
|
|
{ to: '/settings/plugins', label: t('settings.plugins'), icon: '\ud83e\udde9' },
|
2026-07-04 01:37:03 +00:00
|
|
|
{ to: '/settings/currencies', label: t('currencies.title'), icon: '\ud83d\udcb0' },
|
|
|
|
|
{ to: '/settings/taxes', label: t('taxes.title'), icon: '\ud83d\udccb' },
|
|
|
|
|
{ to: '/settings/sequences', label: t('sequences.title'), icon: '\ud83d\udd22' },
|
2026-07-15 13:37:22 +02:00
|
|
|
{ to: '/settings/mail', label: t('mail.settings'), icon: '\ud83d\udce7' },
|
2026-07-15 21:00:32 +02:00
|
|
|
{ to: '/settings/notifications', label: t('settings.notifications'), icon: '\ud83d\udd14' },
|
2026-06-29 11:01:39 +02:00
|
|
|
];
|
2026-06-29 07:55:47 +02:00
|
|
|
|
|
|
|
|
return (
|
2026-06-29 11:01:39 +02:00
|
|
|
<div className="flex max-w-7xl mx-auto" data-testid="settings-page">
|
|
|
|
|
<aside className="w-64 flex-shrink-0 border-r border-secondary-200 p-4 min-h-[calc(100vh-4rem)]">
|
|
|
|
|
<h1 className="text-xl font-bold text-secondary-900 mb-6">{t('settings.title')}</h1>
|
|
|
|
|
<nav className="space-y-1" role="navigation" aria-label={t('settings.title')}>
|
|
|
|
|
{navItems.map((item) => (
|
|
|
|
|
<NavLink
|
|
|
|
|
key={item.to}
|
|
|
|
|
to={item.to}
|
|
|
|
|
className={({ isActive }) =>
|
|
|
|
|
`flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-colors ${
|
|
|
|
|
isActive
|
|
|
|
|
? 'bg-primary-100 text-primary-700'
|
|
|
|
|
: 'text-secondary-600 hover:bg-secondary-100 hover:text-secondary-900'
|
|
|
|
|
}`
|
|
|
|
|
}
|
|
|
|
|
data-testid={`settings-nav-${item.to.split('/').pop()}`}
|
|
|
|
|
>
|
|
|
|
|
<span aria-hidden="true">{item.icon}</span>
|
|
|
|
|
{item.label}
|
|
|
|
|
</NavLink>
|
|
|
|
|
))}
|
|
|
|
|
</nav>
|
|
|
|
|
</aside>
|
|
|
|
|
<main className="flex-1 p-6" data-testid="settings-content">
|
|
|
|
|
<Outlet />
|
|
|
|
|
</main>
|
2026-06-29 07:55:47 +02:00
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|