Improve the frontend 5

This commit is contained in:
Urtzi Alfaro
2025-11-02 20:24:44 +01:00
parent 0220da1725
commit 5adb0e39c0
90 changed files with 10658 additions and 2548 deletions

View File

@@ -40,6 +40,7 @@ const SalesAnalyticsPage = React.lazy(() => import('../pages/app/analytics/sales
const ScenarioSimulationPage = React.lazy(() => import('../pages/app/analytics/scenario-simulation/ScenarioSimulationPage'));
const AIInsightsPage = React.lazy(() => import('../pages/app/analytics/ai-insights/AIInsightsPage'));
const PerformanceAnalyticsPage = React.lazy(() => import('../pages/app/analytics/performance/PerformanceAnalyticsPage'));
const EventRegistryPage = React.lazy(() => import('../pages/app/analytics/events/EventRegistryPage'));
// Settings pages - Unified
@@ -55,11 +56,6 @@ const ModelsConfigPage = React.lazy(() => import('../pages/app/database/models/M
const QualityTemplatesPage = React.lazy(() => import('../pages/app/database/quality-templates/QualityTemplatesPage'));
const SustainabilityPage = React.lazy(() => import('../pages/app/database/sustainability/SustainabilityPage'));
// Data pages
const WeatherPage = React.lazy(() => import('../pages/app/data/weather/WeatherPage'));
const TrafficPage = React.lazy(() => import('../pages/app/data/traffic/TrafficPage'));
const EventsPage = React.lazy(() => import('../pages/app/data/events/EventsPage'));
// Onboarding pages
const OnboardingPage = React.lazy(() => import('../pages/onboarding/OnboardingPage'));
@@ -331,6 +327,16 @@ export const AppRouter: React.FC = () => {
</ProtectedRoute>
}
/>
<Route
path="/app/analytics/events"
element={
<ProtectedRoute requiredRoles={['admin', 'owner']}>
<AppShell>
<EventRegistryPage />
</AppShell>
</ProtectedRoute>
}
/>
{/* Settings Routes */}
@@ -370,38 +376,6 @@ export const AppRouter: React.FC = () => {
}
/>
{/* Data Routes */}
<Route
path="/app/data/weather"
element={
<ProtectedRoute>
<AppShell>
<WeatherPage />
</AppShell>
</ProtectedRoute>
}
/>
<Route
path="/app/data/traffic"
element={
<ProtectedRoute>
<AppShell>
<TrafficPage />
</AppShell>
</ProtectedRoute>
}
/>
<Route
path="/app/data/events"
element={
<ProtectedRoute>
<AppShell>
<EventsPage />
</AppShell>
</ProtectedRoute>
}
/>
{/* Onboarding Route - Protected but without AppShell */}
<Route
path="/app/onboarding"