Reorganize teh menus
This commit is contained in:
@@ -29,8 +29,10 @@ const PerformanceAnalyticsPage = React.lazy(() => import('../pages/app/analytics
|
||||
|
||||
|
||||
// Settings pages
|
||||
const ProfilePage = React.lazy(() => import('../pages/app/settings/profile/ProfilePage'));
|
||||
const BakeryConfigPage = React.lazy(() => import('../pages/app/settings/bakery-config/BakeryConfigPage'));
|
||||
const PersonalInfoPage = React.lazy(() => import('../pages/app/settings/personal-info/PersonalInfoPage'));
|
||||
const CommunicationPreferencesPage = React.lazy(() => import('../pages/app/settings/communication-preferences/CommunicationPreferencesPage'));
|
||||
const SubscriptionPage = React.lazy(() => import('../pages/app/settings/subscription/SubscriptionPage'));
|
||||
const InformationPage = React.lazy(() => import('../pages/app/database/information/InformationPage'));
|
||||
const TeamPage = React.lazy(() => import('../pages/app/settings/team/TeamPage'));
|
||||
const OrganizationsPage = React.lazy(() => import('../pages/app/settings/organizations/OrganizationsPage'));
|
||||
|
||||
@@ -162,11 +164,11 @@ export const AppRouter: React.FC = () => {
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="/app/database/bakery-config"
|
||||
path="/app/database/information"
|
||||
element={
|
||||
<ProtectedRoute>
|
||||
<AppShell>
|
||||
<BakeryConfigPage />
|
||||
<InformationPage />
|
||||
</AppShell>
|
||||
</ProtectedRoute>
|
||||
}
|
||||
@@ -267,11 +269,31 @@ export const AppRouter: React.FC = () => {
|
||||
|
||||
{/* Settings Routes */}
|
||||
<Route
|
||||
path="/app/settings/profile"
|
||||
path="/app/settings/personal-info"
|
||||
element={
|
||||
<ProtectedRoute>
|
||||
<AppShell>
|
||||
<ProfilePage />
|
||||
<PersonalInfoPage />
|
||||
</AppShell>
|
||||
</ProtectedRoute>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="/app/settings/communication-preferences"
|
||||
element={
|
||||
<ProtectedRoute>
|
||||
<AppShell>
|
||||
<CommunicationPreferencesPage />
|
||||
</AppShell>
|
||||
</ProtectedRoute>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="/app/settings/subscription"
|
||||
element={
|
||||
<ProtectedRoute>
|
||||
<AppShell>
|
||||
<SubscriptionPage />
|
||||
</AppShell>
|
||||
</ProtectedRoute>
|
||||
}
|
||||
|
||||
@@ -129,13 +129,16 @@ export const ROUTES = {
|
||||
|
||||
// Settings
|
||||
SETTINGS: '/settings',
|
||||
SETTINGS_PROFILE: '/app/settings/profile',
|
||||
SETTINGS_PROFILE: '/app/settings/personal-info',
|
||||
SETTINGS_COMMUNICATION: '/app/settings/communication-preferences',
|
||||
SETTINGS_SUBSCRIPTION: '/app/settings/subscription',
|
||||
SETTINGS_ORGANIZATIONS: '/app/settings/organizations',
|
||||
SETTINGS_TENANT: '/settings/tenant',
|
||||
SETTINGS_USERS: '/settings/users',
|
||||
SETTINGS_PERMISSIONS: '/settings/permissions',
|
||||
SETTINGS_INTEGRATIONS: '/settings/integrations',
|
||||
SETTINGS_BILLING: '/settings/billing',
|
||||
SETTINGS_BAKERY_CONFIG: '/app/database/bakery-config',
|
||||
SETTINGS_BAKERY_CONFIG: '/app/database/information',
|
||||
SETTINGS_TEAM: '/app/database/team',
|
||||
QUALITY_TEMPLATES: '/app/database/quality-templates',
|
||||
|
||||
@@ -262,112 +265,6 @@ export const routesConfig: RouteConfig[] = [
|
||||
],
|
||||
},
|
||||
|
||||
// Catalog Section - Current Bakery Status
|
||||
{
|
||||
path: '/app/database',
|
||||
name: 'Database',
|
||||
component: 'DatabasePage',
|
||||
title: 'Mi Panadería',
|
||||
icon: 'database',
|
||||
requiresAuth: true,
|
||||
showInNavigation: true,
|
||||
children: [
|
||||
{
|
||||
path: '/app/database/recipes',
|
||||
name: 'Recipes',
|
||||
component: 'RecipesPage',
|
||||
title: 'Recetas',
|
||||
icon: 'production',
|
||||
requiresAuth: true,
|
||||
showInNavigation: true,
|
||||
showInBreadcrumbs: true,
|
||||
},
|
||||
{
|
||||
path: '/app/database/orders',
|
||||
name: 'Orders',
|
||||
component: 'OrdersPage',
|
||||
title: 'Pedidos',
|
||||
icon: 'orders',
|
||||
requiresAuth: true,
|
||||
showInNavigation: true,
|
||||
showInBreadcrumbs: true,
|
||||
},
|
||||
{
|
||||
path: '/app/database/suppliers',
|
||||
name: 'Suppliers',
|
||||
component: 'SuppliersPage',
|
||||
title: 'Proveedores',
|
||||
icon: 'procurement',
|
||||
requiresAuth: true,
|
||||
showInNavigation: true,
|
||||
showInBreadcrumbs: true,
|
||||
},
|
||||
{
|
||||
path: '/app/database/inventory',
|
||||
name: 'Inventory',
|
||||
component: 'InventoryPage',
|
||||
title: 'Inventario',
|
||||
icon: 'inventory',
|
||||
requiresAuth: true,
|
||||
showInNavigation: true,
|
||||
showInBreadcrumbs: true,
|
||||
},
|
||||
{
|
||||
path: '/app/database/maquinaria',
|
||||
name: 'Maquinaria',
|
||||
component: 'MaquinariaPage',
|
||||
title: 'Maquinaria',
|
||||
icon: 'production',
|
||||
requiresAuth: true,
|
||||
showInNavigation: true,
|
||||
showInBreadcrumbs: true,
|
||||
},
|
||||
{
|
||||
path: '/app/database/bakery-config',
|
||||
name: 'BakeryConfig',
|
||||
component: 'BakeryConfigPage',
|
||||
title: 'Configuración de Panadería',
|
||||
icon: 'settings',
|
||||
requiresAuth: true,
|
||||
requiredRoles: ROLE_COMBINATIONS.ADMIN_ACCESS,
|
||||
showInNavigation: true,
|
||||
showInBreadcrumbs: true,
|
||||
},
|
||||
{
|
||||
path: '/app/database/team',
|
||||
name: 'Team',
|
||||
component: 'TeamPage',
|
||||
title: 'Gestión de Equipo',
|
||||
icon: 'user',
|
||||
requiresAuth: true,
|
||||
requiredRoles: ROLE_COMBINATIONS.ADMIN_ACCESS,
|
||||
showInNavigation: true,
|
||||
showInBreadcrumbs: true,
|
||||
},
|
||||
{
|
||||
path: '/app/database/models',
|
||||
name: 'ModelsConfig',
|
||||
component: 'ModelsConfigPage',
|
||||
title: 'Modelos IA',
|
||||
icon: 'training',
|
||||
requiresAuth: true,
|
||||
showInNavigation: true,
|
||||
showInBreadcrumbs: true,
|
||||
},
|
||||
{
|
||||
path: '/app/database/quality-templates',
|
||||
name: 'QualityTemplates',
|
||||
component: 'QualityTemplatesPage',
|
||||
title: 'Plantillas de Calidad',
|
||||
icon: 'settings',
|
||||
requiresAuth: true,
|
||||
requiredRoles: ROLE_COMBINATIONS.MANAGEMENT_ACCESS,
|
||||
showInNavigation: true,
|
||||
showInBreadcrumbs: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
// Analytics Section - Subscription protected
|
||||
{
|
||||
path: '/app/analytics',
|
||||
@@ -443,26 +340,152 @@ export const routesConfig: RouteConfig[] = [
|
||||
],
|
||||
},
|
||||
|
||||
// Catalog Section - Current Bakery Status
|
||||
{
|
||||
path: '/app/database',
|
||||
name: 'Database',
|
||||
component: 'DatabasePage',
|
||||
title: 'Mi Panadería',
|
||||
icon: 'database',
|
||||
requiresAuth: true,
|
||||
showInNavigation: true,
|
||||
children: [
|
||||
{
|
||||
path: '/app/database/recipes',
|
||||
name: 'Recipes',
|
||||
component: 'RecipesPage',
|
||||
title: 'Recetas',
|
||||
icon: 'production',
|
||||
requiresAuth: true,
|
||||
showInNavigation: true,
|
||||
showInBreadcrumbs: true,
|
||||
},
|
||||
{
|
||||
path: '/app/database/orders',
|
||||
name: 'Orders',
|
||||
component: 'OrdersPage',
|
||||
title: 'Pedidos',
|
||||
icon: 'orders',
|
||||
requiresAuth: true,
|
||||
showInNavigation: true,
|
||||
showInBreadcrumbs: true,
|
||||
},
|
||||
{
|
||||
path: '/app/database/suppliers',
|
||||
name: 'Suppliers',
|
||||
component: 'SuppliersPage',
|
||||
title: 'Proveedores',
|
||||
icon: 'procurement',
|
||||
requiresAuth: true,
|
||||
showInNavigation: true,
|
||||
showInBreadcrumbs: true,
|
||||
},
|
||||
{
|
||||
path: '/app/database/inventory',
|
||||
name: 'Inventory',
|
||||
component: 'InventoryPage',
|
||||
title: 'Inventario',
|
||||
icon: 'inventory',
|
||||
requiresAuth: true,
|
||||
showInNavigation: true,
|
||||
showInBreadcrumbs: true,
|
||||
},
|
||||
{
|
||||
path: '/app/database/maquinaria',
|
||||
name: 'Maquinaria',
|
||||
component: 'MaquinariaPage',
|
||||
title: 'Maquinaria',
|
||||
icon: 'production',
|
||||
requiresAuth: true,
|
||||
showInNavigation: true,
|
||||
showInBreadcrumbs: true,
|
||||
},
|
||||
{
|
||||
path: '/app/database/information',
|
||||
name: 'Information',
|
||||
component: 'InformationPage',
|
||||
title: 'Información',
|
||||
icon: 'settings',
|
||||
requiresAuth: true,
|
||||
requiredRoles: ROLE_COMBINATIONS.ADMIN_ACCESS,
|
||||
showInNavigation: true,
|
||||
showInBreadcrumbs: true,
|
||||
},
|
||||
{
|
||||
path: '/app/database/team',
|
||||
name: 'Team',
|
||||
component: 'TeamPage',
|
||||
title: 'Gestión de Equipo',
|
||||
icon: 'user',
|
||||
requiresAuth: true,
|
||||
requiredRoles: ROLE_COMBINATIONS.ADMIN_ACCESS,
|
||||
showInNavigation: true,
|
||||
showInBreadcrumbs: true,
|
||||
},
|
||||
{
|
||||
path: '/app/database/models',
|
||||
name: 'ModelsConfig',
|
||||
component: 'ModelsConfigPage',
|
||||
title: 'Modelos IA',
|
||||
icon: 'training',
|
||||
requiresAuth: true,
|
||||
showInNavigation: true,
|
||||
showInBreadcrumbs: true,
|
||||
},
|
||||
{
|
||||
path: '/app/database/quality-templates',
|
||||
name: 'QualityTemplates',
|
||||
component: 'QualityTemplatesPage',
|
||||
title: 'Plantillas de Calidad',
|
||||
icon: 'settings',
|
||||
requiresAuth: true,
|
||||
requiredRoles: ROLE_COMBINATIONS.MANAGEMENT_ACCESS,
|
||||
showInNavigation: true,
|
||||
showInBreadcrumbs: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
// Settings Section
|
||||
{
|
||||
path: '/app/settings',
|
||||
name: 'Settings',
|
||||
component: 'SettingsPage',
|
||||
title: 'Configuración',
|
||||
icon: 'settings',
|
||||
title: 'Mi Perfil',
|
||||
icon: 'user',
|
||||
requiresAuth: true,
|
||||
showInNavigation: true,
|
||||
children: [
|
||||
{
|
||||
path: '/app/settings/profile',
|
||||
name: 'Profile',
|
||||
component: 'ProfilePage',
|
||||
title: 'Mi Perfil',
|
||||
path: '/app/settings/personal-info',
|
||||
name: 'PersonalInfo',
|
||||
component: 'PersonalInfoPage',
|
||||
title: 'Información Personal',
|
||||
icon: 'user',
|
||||
requiresAuth: true,
|
||||
showInNavigation: true,
|
||||
showInBreadcrumbs: true,
|
||||
},
|
||||
{
|
||||
path: '/app/settings/communication-preferences',
|
||||
name: 'CommunicationPreferences',
|
||||
component: 'CommunicationPreferencesPage',
|
||||
title: 'Preferencias de Comunicación',
|
||||
icon: 'bell',
|
||||
requiresAuth: true,
|
||||
showInNavigation: true,
|
||||
showInBreadcrumbs: true,
|
||||
},
|
||||
{
|
||||
path: '/app/settings/subscription',
|
||||
name: 'Subscription',
|
||||
component: 'SubscriptionPage',
|
||||
title: 'Suscripción',
|
||||
icon: 'credit-card',
|
||||
requiresAuth: true,
|
||||
showInNavigation: true,
|
||||
showInBreadcrumbs: true,
|
||||
},
|
||||
{
|
||||
path: '/app/settings/organizations',
|
||||
name: 'Organizations',
|
||||
|
||||
Reference in New Issue
Block a user