fix: connect all new pages to router + navigation + backend API routes (Workstream, Wiki, Improvement, Onboarding, Dashboard, DSGVO), platform.py with 9 endpoints, tsc clean
This commit is contained in:
@@ -14,6 +14,7 @@ import {
|
||||
Reply, Forward, Paperclip, MoreVertical, RefreshCw, Download,
|
||||
Upload, Eye, EyeOff, Lock, Unlock, Clock, AlertCircle,
|
||||
CheckCircle, XCircle, Info, Loader2, Inbox, Send,
|
||||
BookOpen, Lightbulb,
|
||||
} from 'lucide-react';
|
||||
|
||||
const ICON_MAP: Record<string, React.ComponentType<{ className?: string }>> = {
|
||||
@@ -24,7 +25,7 @@ const ICON_MAP: Record<string, React.ComponentType<{ className?: string }>> = {
|
||||
Plus, Edit, Filter, Star, Archive, Reply, Forward, Paperclip,
|
||||
MoreVertical, RefreshCw, Download, Upload, Eye, EyeOff, Lock,
|
||||
Unlock, Clock, AlertCircle, CheckCircle, XCircle, Info, Loader2,
|
||||
Inbox, Send, ChevronRight,
|
||||
Inbox, Send, ChevronRight, BookOpen, Lightbulb,
|
||||
};
|
||||
import { useMenuOrder } from '@/api/users';
|
||||
import { usePermission } from '@/hooks/usePermission';
|
||||
@@ -53,6 +54,10 @@ function getIcon(name: string): React.ReactNode {
|
||||
const singleItems: NavSingleItem[] = [
|
||||
{ to: '/dashboard', labelKey: 'nav.dashboard', icon: <Home className="w-5 h-5 flex-shrink-0" aria-hidden="true" strokeWidth={2} />, order: 0 },
|
||||
{ to: '/contacts', labelKey: 'nav.contacts', icon: <Users className="w-5 h-5 flex-shrink-0" aria-hidden="true" strokeWidth={2} />, order: 10 },
|
||||
{ to: '/workstream', labelKey: 'nav.workstream', icon: <MessageSquare className="w-5 h-5 flex-shrink-0" aria-hidden="true" strokeWidth={2} />, order: 25 },
|
||||
{ to: '/wiki', labelKey: 'nav.wiki', icon: <BookOpen className="w-5 h-5 flex-shrink-0" aria-hidden="true" strokeWidth={2} />, order: 30 },
|
||||
{ to: '/improvement', labelKey: 'nav.improvement', icon: <Lightbulb className="w-5 h-5 flex-shrink-0" aria-hidden="true" strokeWidth={2} />, order: 90 },
|
||||
{ to: '/onboarding', labelKey: 'nav.onboarding', icon: <Sparkles className="w-5 h-5 flex-shrink-0" aria-hidden="true" strokeWidth={2} />, order: 95 },
|
||||
];
|
||||
|
||||
const bottomItems: NavSingleItem[] = [];
|
||||
|
||||
@@ -19,7 +19,11 @@
|
||||
"aiAssistant": "KI Assistent",
|
||||
"mcpSettings": "MCP Einstellungen",
|
||||
"reports": "Reports",
|
||||
"tasks": "Aufgaben"
|
||||
"tasks": "Aufgaben",
|
||||
"workstream": "Workstream",
|
||||
"wiki": "Wiki",
|
||||
"improvement": "Verbesserungen",
|
||||
"onboarding": "Onboarding"
|
||||
},
|
||||
"auth": {
|
||||
"login": "Anmelden",
|
||||
|
||||
@@ -19,7 +19,11 @@
|
||||
"aiAssistant": "AI Assistant",
|
||||
"mcpSettings": "MCP Settings",
|
||||
"reports": "Reports",
|
||||
"tasks": "Tasks"
|
||||
"tasks": "Tasks",
|
||||
"workstream": "Workstream",
|
||||
"wiki": "Wiki",
|
||||
"improvement": "Improvements",
|
||||
"onboarding": "Onboarding"
|
||||
},
|
||||
"auth": {
|
||||
"login": "Sign In",
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* OnboardingPage — Route wrapper for SetupWizard component.
|
||||
* Renders the SetupWizard as a full-page dialog.
|
||||
*/
|
||||
|
||||
import React, { useCallback } from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { SetupWizard } from '@/components/onboarding/SetupWizard';
|
||||
|
||||
export function OnboardingPage() {
|
||||
const navigate = useNavigate();
|
||||
|
||||
const handleClose = useCallback(() => {
|
||||
navigate('/dashboard');
|
||||
}, [navigate]);
|
||||
|
||||
const handleComplete = useCallback(() => {
|
||||
navigate('/dashboard');
|
||||
}, [navigate]);
|
||||
|
||||
return (
|
||||
<SetupWizard open={true} onClose={handleClose} onComplete={handleComplete} />
|
||||
);
|
||||
}
|
||||
|
||||
export default OnboardingPage;
|
||||
@@ -88,6 +88,10 @@ const LogsOverviewPage = React.lazy(() => import('@/pages/logs/LogsOverview').th
|
||||
const LogsPlaceholderPage = React.lazy(() => import('@/pages/logs/LogsPlaceholder').then(m => ({ default: m.LogsPlaceholderPage })));
|
||||
const HelpApiDocsPage = React.lazy(() => import('@/pages/help/HelpApiDocs').then(m => ({ default: m.HelpApiDocsPage })));
|
||||
const ApiDocsPage = React.lazy(() => import('@/pages/ApiDocs').then(m => ({ default: m.ApiDocsPage })));
|
||||
const WorkstreamPage = React.lazy(() => import('@/pages/Workstream').then(m => ({ default: m.WorkstreamPage })));
|
||||
const WikiPage = React.lazy(() => import('@/pages/Wiki').then(m => ({ default: m.WikiPage })));
|
||||
const ImprovementCenterPage = React.lazy(() => import('@/components/improvement/ImprovementCenter').then(m => ({ default: m.ImprovementCenter })));
|
||||
const OnboardingPage = React.lazy(() => import('@/pages/Onboarding').then(m => ({ default: m.OnboardingPage })));
|
||||
|
||||
/** Centered spinner fallback for lazy-loaded routes */
|
||||
function PageLoader() {
|
||||
@@ -266,6 +270,10 @@ const router = createBrowserRouter([
|
||||
{ path: '/tags', element: <PermissionRoute permission="tags:read">{withSuspense(<TagsPage />)}</PermissionRoute> },
|
||||
{ path: '/api-docs', element: <PermissionRoute permission="settings:read">{withSuspense(<ApiDocsPage />)}</PermissionRoute> },
|
||||
{ path: '/activity', element: <PermissionRoute permission="activity:read">{withSuspense(<ActivityTimelinePage />)}</PermissionRoute> },
|
||||
{ path: '/workstream', element: withSuspense(<WorkstreamPage />) },
|
||||
{ path: '/wiki', element: withSuspense(<WikiPage />) },
|
||||
{ path: '/improvement', element: withSuspense(<ImprovementCenterPage />) },
|
||||
{ path: '/onboarding', element: withSuspense(<OnboardingPage />) },
|
||||
{ path: '/profile', element: withSuspense(<SettingsProfilePage />) },
|
||||
{ path: '*', element: <ErrorBoundary>{<PluginRouteRenderer />}</ErrorBoundary> },
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user