Renames the sidebar entry to "AI Copy/Type Agent" with Copy Agent, Type Agent, and Settings sub-pages. Settings shows the server's LAN IP address (via a new /api/ai/network-info endpoint) since it changes depending on which office the app is running in. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
108 lines
5.0 KiB
TypeScript
Executable File
108 lines
5.0 KiB
TypeScript
Executable File
import { Switch, Route, Redirect } from "wouter";
|
|
import React, { lazy, Suspense } from "react";
|
|
import { Provider } from "react-redux";
|
|
import { store } from "./redux/store";
|
|
import { queryClient } from "./lib/queryClient";
|
|
import { QueryClientProvider } from "@tanstack/react-query";
|
|
import { Toaster } from "./components/ui/toaster";
|
|
import { TooltipProvider } from "./components/ui/tooltip";
|
|
import { ProtectedRoute } from "./lib/protected-route";
|
|
import { AuthProvider } from "./hooks/use-auth";
|
|
import Dashboard from "./pages/dashboard";
|
|
import LoadingScreen from "./components/ui/LoadingScreen";
|
|
|
|
const AuthPage = lazy(() => import("./pages/auth-page"));
|
|
const PatientConnectionPage = lazy(() => import("./pages/patient-connection-page"));
|
|
const AppointmentsPage = lazy(() => import("./pages/appointments-page"));
|
|
const PatientsPage = lazy(() => import("./pages/patients-page"));
|
|
const SettingsPage = lazy(() => import("./pages/settings-page"));
|
|
const ClaimsPage = lazy(() => import("./pages/claims-page"));
|
|
const PaymentsPage = lazy(() => import("./pages/payments-page"));
|
|
const InsuranceStatusPage = lazy(
|
|
() => import("./pages/insurance-status-page")
|
|
);
|
|
const DocumentPage = lazy(() => import("./pages/documents-page"));
|
|
const DatabaseManagementPage = lazy(
|
|
() => import("./pages/database-management-page")
|
|
);
|
|
const ReportsPage = lazy(() => import("./pages/reports-page"));
|
|
const CloudStoragePage = lazy(() => import("./pages/cloud-storage-page"));
|
|
const JobMonitorPage = lazy(() => import("./pages/job-monitor-page"));
|
|
const ChartPage = lazy(() => import("./pages/chart-page"));
|
|
const DentalEducationPage = lazy(() => import("./pages/dental-education-page"));
|
|
const AiCopyAgentPage = lazy(() => import("./pages/ai-copy-agent-page"));
|
|
const AiTypeAgentPage = lazy(() => import("./pages/ai-type-agent-page"));
|
|
const AiAgentSettingsPage = lazy(() => import("./pages/ai-agent-settings-page"));
|
|
const DentalShoppingSearchTagPage = lazy(() => import("./pages/dental-shopping-search-tag-page"));
|
|
const DentalShoppingLoginInfoPage = lazy(() => import("./pages/dental-shopping-login-info-page"));
|
|
const ActivationPage = lazy(() => import("./pages/activation-page"));
|
|
const NotFound = lazy(() => import("./pages/not-found"));
|
|
|
|
function Router() {
|
|
return (
|
|
<Switch>
|
|
<ProtectedRoute path="/" component={() => <Redirect to="/insurance-status" />} />
|
|
|
|
<ProtectedRoute path="/dashboard" component={() => <Dashboard />} />
|
|
<ProtectedRoute path="/patient-connection" component={() => <PatientConnectionPage />} />
|
|
<ProtectedRoute
|
|
path="/appointments"
|
|
component={() => <AppointmentsPage />}
|
|
/>
|
|
<ProtectedRoute path="/patients" component={() => <PatientsPage />} />
|
|
<ProtectedRoute path="/chart/:section" component={() => <ChartPage />} />
|
|
<ProtectedRoute path="/chart" component={() => <ChartPage />} />
|
|
<ProtectedRoute path="/settings/:section" component={() => <SettingsPage />} adminOnly />
|
|
<ProtectedRoute path="/settings" component={() => <SettingsPage />} adminOnly />
|
|
<ProtectedRoute path="/claims" component={() => <ClaimsPage />} />
|
|
<ProtectedRoute
|
|
path="/insurance-status"
|
|
component={() => <InsuranceStatusPage />}
|
|
/>
|
|
<ProtectedRoute path="/payments" component={() => <PaymentsPage />} />
|
|
<ProtectedRoute path="/documents" component={() => <DocumentPage />} />
|
|
<ProtectedRoute
|
|
path="/database-management"
|
|
component={() => <DatabaseManagementPage />}
|
|
adminOnly
|
|
/>
|
|
<ProtectedRoute path="/reports" component={() => <ReportsPage />} />
|
|
<ProtectedRoute path="/cloud-storage" component={() => <CloudStoragePage />} />
|
|
<ProtectedRoute path="/dental-education" component={() => <DentalEducationPage />} />
|
|
<ProtectedRoute path="/ai-input-agent/copy-agent" component={() => <AiCopyAgentPage />} />
|
|
<ProtectedRoute path="/ai-input-agent/type-agent" component={() => <AiTypeAgentPage />} />
|
|
<ProtectedRoute path="/ai-input-agent/settings" component={() => <AiAgentSettingsPage />} />
|
|
<ProtectedRoute path="/ai-input-agent" component={() => <Redirect to="/ai-input-agent/copy-agent" />} />
|
|
<ProtectedRoute path="/dental-shopping/search-tag" component={() => <DentalShoppingSearchTagPage />} />
|
|
<ProtectedRoute path="/dental-shopping/login-info" component={() => <DentalShoppingLoginInfoPage />} />
|
|
<ProtectedRoute path="/activation" component={() => <ActivationPage />} adminOnly />
|
|
<ProtectedRoute
|
|
path="/job-monitor"
|
|
component={() => <JobMonitorPage />}
|
|
adminOnly
|
|
/>
|
|
<Route path="/auth" component={() => <AuthPage />} />
|
|
<Route component={() => <NotFound />} />
|
|
</Switch>
|
|
);
|
|
}
|
|
|
|
function App() {
|
|
return (
|
|
<Provider store={store}>
|
|
<QueryClientProvider client={queryClient}>
|
|
<AuthProvider>
|
|
<TooltipProvider>
|
|
<Toaster />
|
|
<Suspense fallback={<LoadingScreen />}>
|
|
<Router />
|
|
</Suspense>
|
|
</TooltipProvider>
|
|
</AuthProvider>
|
|
</QueryClientProvider>
|
|
</Provider>
|
|
);
|
|
}
|
|
|
|
export default App;
|