Imporve the routes and the menu

This commit is contained in:
Urtzi Alfaro
2025-09-19 12:06:26 +02:00
parent 105410c9d3
commit caf6d92850
5 changed files with 437 additions and 334 deletions

View File

@@ -33,6 +33,9 @@ const BakeryConfigPage = React.lazy(() => import('../pages/app/settings/bakery-c
const TeamPage = React.lazy(() => import('../pages/app/settings/team/TeamPage'));
const SubscriptionPage = React.lazy(() => import('../pages/app/settings/subscription/SubscriptionPage'));
// Database pages
const DatabasePage = React.lazy(() => import('../pages/app/database/DatabasePage'));
// Data pages
const WeatherPage = React.lazy(() => import('../pages/app/data/weather/WeatherPage'));
const TrafficPage = React.lazy(() => import('../pages/app/data/traffic/TrafficPage'));
@@ -72,76 +75,118 @@ export const AppRouter: React.FC = () => {
}
/>
{/* Operations Routes */}
<Route
path="/app/operations/inventory"
element={
<ProtectedRoute>
<AppShell>
<InventoryPage />
</AppShell>
</ProtectedRoute>
}
/>
<Route
path="/app/operations/production"
element={
<ProtectedRoute>
<AppShell>
<ProductionPage />
</AppShell>
</ProtectedRoute>
}
/>
<Route
path="/app/operations/recipes"
element={
<ProtectedRoute>
<AppShell>
<RecipesPage />
</AppShell>
</ProtectedRoute>
}
/>
<Route
path="/app/operations/procurement"
{/* Operations Routes - Business Operations Only */}
<Route
path="/app/operations/procurement"
element={
<ProtectedRoute>
<AppShell>
<ProcurementPage />
</AppShell>
</ProtectedRoute>
}
}
/>
<Route
path="/app/operations/suppliers"
<Route
path="/app/operations/production"
element={
<ProtectedRoute>
<AppShell>
<SuppliersPage />
<ProductionPage />
</AppShell>
</ProtectedRoute>
}
}
/>
<Route
path="/app/operations/orders"
element={
<ProtectedRoute>
<AppShell>
<OrdersPage />
</AppShell>
</ProtectedRoute>
}
/>
<Route
path="/app/operations/pos"
<Route
path="/app/operations/pos"
element={
<ProtectedRoute>
<AppShell>
<POSPage />
</AppShell>
</ProtectedRoute>
}
}
/>
{/* Database Routes - Current Bakery Status */}
<Route
path="/app/database"
element={
<ProtectedRoute>
<AppShell>
<DatabasePage />
</AppShell>
</ProtectedRoute>
}
/>
<Route
path="/app/database/recipes"
element={
<ProtectedRoute>
<AppShell>
<RecipesPage />
</AppShell>
</ProtectedRoute>
}
/>
<Route
path="/app/database/orders"
element={
<ProtectedRoute>
<AppShell>
<OrdersPage />
</AppShell>
</ProtectedRoute>
}
/>
<Route
path="/app/database/suppliers"
element={
<ProtectedRoute>
<AppShell>
<SuppliersPage />
</AppShell>
</ProtectedRoute>
}
/>
<Route
path="/app/database/inventory"
element={
<ProtectedRoute>
<AppShell>
<InventoryPage />
</AppShell>
</ProtectedRoute>
}
/>
<Route
path="/app/database/bakery-config"
element={
<ProtectedRoute>
<AppShell>
<BakeryConfigPage />
</AppShell>
</ProtectedRoute>
}
/>
<Route
path="/app/database/team"
element={
<ProtectedRoute>
<AppShell>
<TeamPage />
</AppShell>
</ProtectedRoute>
}
/>
<Route
path="/app/database/preferences"
element={
<ProtectedRoute>
<AppShell>
<PreferencesPage />
</AppShell>
</ProtectedRoute>
}
/>
{/* Analytics Routes */}
@@ -187,18 +232,6 @@ export const AppRouter: React.FC = () => {
/>
{/* Settings Routes */}
<Route
path="/app/settings/preferences"
element={
<ProtectedRoute>
<AppShell>
<PreferencesPage />
</AppShell>
</ProtectedRoute>
}
/>
{/* Settings Routes */}
<Route
path="/app/settings/profile"
@@ -210,26 +243,6 @@ export const AppRouter: React.FC = () => {
</ProtectedRoute>
}
/>
<Route
path="/app/settings/bakery-config"
element={
<ProtectedRoute>
<AppShell>
<BakeryConfigPage />
</AppShell>
</ProtectedRoute>
}
/>
<Route
path="/app/settings/team"
element={
<ProtectedRoute>
<AppShell>
<TeamPage />
</AppShell>
</ProtectedRoute>
}
/>
<Route
path="/app/settings/subscription"
element={