Improve the frontend and fix TODOs
This commit is contained in:
@@ -42,13 +42,10 @@ const AIInsightsPage = React.lazy(() => import('../pages/app/analytics/ai-insigh
|
||||
const PerformanceAnalyticsPage = React.lazy(() => import('../pages/app/analytics/performance/PerformanceAnalyticsPage'));
|
||||
|
||||
|
||||
// Settings pages
|
||||
const PersonalInfoPage = React.lazy(() => import('../pages/app/settings/personal-info/PersonalInfoPage'));
|
||||
const CommunicationPreferencesPage = React.lazy(() => import('../pages/app/settings/communication-preferences/CommunicationPreferencesPage'));
|
||||
// Settings pages - Unified
|
||||
const BakerySettingsPage = React.lazy(() => import('../pages/app/settings/bakery/BakerySettingsPage'));
|
||||
const NewProfileSettingsPage = React.lazy(() => import('../pages/app/settings/profile/NewProfileSettingsPage'));
|
||||
const SubscriptionPage = React.lazy(() => import('../pages/app/settings/subscription/SubscriptionPage'));
|
||||
const PrivacySettingsPage = React.lazy(() => import('../pages/app/settings/privacy/PrivacySettingsPage'));
|
||||
const InformationPage = React.lazy(() => import('../pages/app/database/information/InformationPage'));
|
||||
const AjustesPage = React.lazy(() => import('../pages/app/database/ajustes/AjustesPage'));
|
||||
const TeamPage = React.lazy(() => import('../pages/app/settings/team/TeamPage'));
|
||||
const OrganizationsPage = React.lazy(() => import('../pages/app/settings/organizations/OrganizationsPage'));
|
||||
|
||||
@@ -197,26 +194,20 @@ export const AppRouter: React.FC = () => {
|
||||
</ProtectedRoute>
|
||||
}
|
||||
/>
|
||||
{/* NEW: Unified Bakery Settings Route */}
|
||||
<Route
|
||||
path="/app/database/information"
|
||||
path="/app/settings/bakery"
|
||||
element={
|
||||
<ProtectedRoute>
|
||||
<AppShell>
|
||||
<InformationPage />
|
||||
</AppShell>
|
||||
</ProtectedRoute>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="/app/database/ajustes"
|
||||
element={
|
||||
<ProtectedRoute>
|
||||
<AppShell>
|
||||
<AjustesPage />
|
||||
<BakerySettingsPage />
|
||||
</AppShell>
|
||||
</ProtectedRoute>
|
||||
}
|
||||
/>
|
||||
{/* Legacy routes redirect to new unified page */}
|
||||
<Route path="/app/database/information" element={<Navigate to="/app/settings/bakery" replace />} />
|
||||
<Route path="/app/database/ajustes" element={<Navigate to="/app/settings/bakery" replace />} />
|
||||
<Route
|
||||
path="/app/database/team"
|
||||
element={
|
||||
@@ -330,28 +321,23 @@ export const AppRouter: React.FC = () => {
|
||||
}
|
||||
/>
|
||||
|
||||
|
||||
|
||||
{/* Settings Routes */}
|
||||
{/* NEW: Unified Profile Settings Route */}
|
||||
<Route
|
||||
path="/app/settings/personal-info"
|
||||
path="/app/settings/profile"
|
||||
element={
|
||||
<ProtectedRoute>
|
||||
<AppShell>
|
||||
<PersonalInfoPage />
|
||||
</AppShell>
|
||||
</ProtectedRoute>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="/app/settings/communication-preferences"
|
||||
element={
|
||||
<ProtectedRoute>
|
||||
<AppShell>
|
||||
<CommunicationPreferencesPage />
|
||||
<NewProfileSettingsPage />
|
||||
</AppShell>
|
||||
</ProtectedRoute>
|
||||
}
|
||||
/>
|
||||
{/* Legacy routes redirect to new unified profile page */}
|
||||
<Route path="/app/settings/personal-info" element={<Navigate to="/app/settings/profile" replace />} />
|
||||
<Route path="/app/settings/communication-preferences" element={<Navigate to="/app/settings/profile" replace />} />
|
||||
<Route path="/app/settings/privacy" element={<Navigate to="/app/settings/profile" replace />} />
|
||||
<Route
|
||||
path="/app/settings/subscription"
|
||||
element={
|
||||
@@ -372,16 +358,6 @@ export const AppRouter: React.FC = () => {
|
||||
</ProtectedRoute>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="/app/settings/privacy"
|
||||
element={
|
||||
<ProtectedRoute>
|
||||
<AppShell>
|
||||
<PrivacySettingsPage />
|
||||
</AppShell>
|
||||
</ProtectedRoute>
|
||||
}
|
||||
/>
|
||||
|
||||
{/* Data Routes */}
|
||||
<Route
|
||||
|
||||
Reference in New Issue
Block a user