finalizing app adn fixes

This commit is contained in:
IGNY8 VPS (Salman)
2025-12-25 22:58:21 +00:00
parent 4bffede052
commit 91525b8999
19 changed files with 2498 additions and 555 deletions

View File

@@ -4,6 +4,7 @@ import { HelmetProvider } from "react-helmet-async";
import AppLayout from "./layout/AppLayout";
import { ScrollToTop } from "./components/common/ScrollToTop";
import ProtectedRoute from "./components/auth/ProtectedRoute";
import AdminRoute from "./components/auth/AdminRoute";
import GlobalErrorDisplay from "./components/common/GlobalErrorDisplay";
import LoadingStateMonitor from "./components/common/LoadingStateMonitor";
import { useAuthStore } from "./store/authStore";
@@ -64,8 +65,9 @@ const CreditsAndBilling = lazy(() => import("./pages/Settings/CreditsAndBilling"
const PurchaseCreditsPage = lazy(() => import("./pages/account/PurchaseCreditsPage"));
const PlansAndBillingPage = lazy(() => import("./pages/account/PlansAndBillingPage"));
const AccountSettingsPage = lazy(() => import("./pages/account/AccountSettingsPage"));
const TeamManagementPage = lazy(() => import("./pages/account/TeamManagementPage"));
// TeamManagementPage - Now integrated as tab in AccountSettingsPage
const UsageAnalyticsPage = lazy(() => import("./pages/account/UsageAnalyticsPage"));
const ContentSettingsPage = lazy(() => import("./pages/account/ContentSettingsPage"));
// Reference Data - Lazy loaded
const SeedKeywords = lazy(() => import("./pages/Reference/SeedKeywords"));
@@ -76,7 +78,7 @@ const IndustriesSectorsKeywords = lazy(() => import("./pages/Setup/IndustriesSec
// Settings - Lazy loaded
const GeneralSettings = lazy(() => import("./pages/Settings/General"));
const ProfileSettingsPage = lazy(() => import("./pages/settings/ProfileSettingsPage"));
// ProfileSettingsPage - Now integrated as tab in AccountSettingsPage
const Users = lazy(() => import("./pages/Settings/Users"));
const Subscriptions = lazy(() => import("./pages/Settings/Subscriptions"));
const SystemSettings = lazy(() => import("./pages/Settings/System"));
@@ -87,7 +89,7 @@ const Industries = lazy(() => import("./pages/Settings/Industries"));
const Integration = lazy(() => import("./pages/Settings/Integration"));
const Publishing = lazy(() => import("./pages/Settings/Publishing"));
const Sites = lazy(() => import("./pages/Settings/Sites"));
const ImportExport = lazy(() => import("./pages/Settings/ImportExport"));
// ImportExport - Removed from UI, individual pages have their own import/export
// Sites - Lazy loaded
const SiteList = lazy(() => import("./pages/Sites/List"));
@@ -176,13 +178,13 @@ export default function App() {
<Route path="/optimizer/content" element={<OptimizerContentSelector />} />
<Route path="/optimizer/analyze/:id" element={<AnalysisPreview />} />
{/* Thinker Module - Redirect dashboard to prompts */}
<Route path="/thinker" element={<Navigate to="/thinker/prompts" replace />} />
<Route path="/thinker/prompts" element={<Prompts />} />
<Route path="/thinker/author-profiles" element={<AuthorProfiles />} />
<Route path="/thinker/profile" element={<ThinkerProfile />} />
<Route path="/thinker/strategies" element={<Strategies />} />
<Route path="/thinker/image-testing" element={<ImageTesting />} />
{/* Thinker Module - Admin Only (Prompts & AI Configuration) */}
<Route path="/thinker" element={<AdminRoute><Navigate to="/thinker/prompts" replace /></AdminRoute>} />
<Route path="/thinker/prompts" element={<AdminRoute><Prompts /></AdminRoute>} />
<Route path="/thinker/author-profiles" element={<AdminRoute><AuthorProfiles /></AdminRoute>} />
<Route path="/thinker/profile" element={<AdminRoute><ThinkerProfile /></AdminRoute>} />
<Route path="/thinker/strategies" element={<AdminRoute><Strategies /></AdminRoute>} />
<Route path="/thinker/image-testing" element={<AdminRoute><ImageTesting /></AdminRoute>} />
{/* Billing Module */}
<Route path="/billing" element={<Navigate to="/billing/overview" replace />} />
@@ -195,8 +197,10 @@ export default function App() {
<Route path="/account/plans" element={<PlansAndBillingPage />} />
<Route path="/account/purchase-credits" element={<PurchaseCreditsPage />} />
<Route path="/account/settings" element={<AccountSettingsPage />} />
<Route path="/account/team" element={<TeamManagementPage />} />
{/* Legacy redirect - Team is now a tab in Account Settings */}
<Route path="/account/team" element={<Navigate to="/account/settings" replace />} />
<Route path="/account/usage" element={<UsageAnalyticsPage />} />
<Route path="/account/content-settings" element={<ContentSettingsPage />} />
{/* Reference Data */}
<Route path="/reference/seed-keywords" element={<SeedKeywords />} />
@@ -209,7 +213,8 @@ export default function App() {
<Route path="/setup/industries-sectors-keywords" element={<Navigate to="/setup/add-keywords" replace />} />
{/* Settings */}
<Route path="/settings/profile" element={<ProfileSettingsPage />} />
{/* Legacy redirect - Profile is now a tab in Account Settings */}
<Route path="/settings/profile" element={<Navigate to="/account/settings" replace />} />
<Route path="/settings" element={<GeneralSettings />} />
<Route path="/settings/users" element={<Users />} />
<Route path="/settings/subscriptions" element={<Subscriptions />} />
@@ -218,10 +223,12 @@ export default function App() {
<Route path="/settings/ai" element={<AISettings />} />
<Route path="/settings/plans" element={<Plans />} />
<Route path="/settings/industries" element={<Industries />} />
<Route path="/settings/integration" element={<Integration />} />
{/* AI Models Settings - Admin Only */}
<Route path="/settings/integration" element={<AdminRoute><Integration /></AdminRoute>} />
<Route path="/settings/publishing" element={<Publishing />} />
<Route path="/settings/sites" element={<Sites />} />
<Route path="/settings/import-export" element={<ImportExport />} />
{/* Legacy redirect - Import/Export removed, redirect to dashboard */}
<Route path="/settings/import-export" element={<Navigate to="/" replace />} />
{/* Sites Management */}
<Route path="/sites" element={<SiteList />} />