remove login page

This commit is contained in:
2025-08-15 18:58:19 +07:00
parent 4091307e74
commit 5fc5b838ea

View File

@@ -4,7 +4,7 @@ import {
Route, Route,
Navigate, Navigate,
} from "react-router-dom"; } from "react-router-dom";
import Login from "./pages/Login"; // import Login from "./pages/Login"; // Commented out - login disabled
import Dashboard from "./pages/Dashboard"; import Dashboard from "./pages/Dashboard";
// Medical Records Components // Medical Records Components
@@ -24,23 +24,19 @@ import { User, Role } from "./pages/system-administration";
import NotFound from "./pages/NotFound"; import NotFound from "./pages/NotFound";
import NotFoundProtected from "./pages/NotFoundProtected"; import NotFoundProtected from "./pages/NotFoundProtected";
import Layout from "./components/Layout"; import Layout from "./components/Layout";
import ProtectedRoute from "./components/ProtectedRoute"; // import ProtectedRoute from "./components/ProtectedRoute"; // Commented out - authentication disabled
function App() { function App() {
return ( return (
<Router> <Router>
<Routes> <Routes>
<Route path="/login" element={<Login />} /> {/* <Route path="/login" element={<Login />} /> */}{" "}
{/* Commented out - login disabled */}
<Route <Route
path="/" path="/"
element={ element={<Layout />} // Removed ProtectedRoute wrapper - direct access to dashboard
<ProtectedRoute>
<Layout />
</ProtectedRoute>
}
> >
<Route path="dashboard" element={<Dashboard />} /> <Route path="dashboard" element={<Dashboard />} />
{/* Medical Records Routes */} {/* Medical Records Routes */}
<Route path="medical-records/clinical" element={<Clinical />} /> <Route path="medical-records/clinical" element={<Clinical />} />
<Route <Route
@@ -55,18 +51,15 @@ function App() {
path="medical-records/bpjs-codification" path="medical-records/bpjs-codification"
element={<BPJSCodeification />} element={<BPJSCodeification />}
/> />
{/* Data Integration Routes */} {/* Data Integration Routes */}
<Route path="integration/bpjs-sync" element={<BPJSSyncLogs />} /> <Route path="integration/bpjs-sync" element={<BPJSSyncLogs />} />
<Route <Route
path="integration/medical-record-sync" path="integration/medical-record-sync"
element={<MedicalRecordSyncLogs />} element={<MedicalRecordSyncLogs />}
/> />
{/* System Administration Routes */} {/* System Administration Routes */}
<Route path="system-administration/user" element={<User />} /> <Route path="system-administration/user" element={<User />} />
<Route path="system-administration/role" element={<Role />} /> <Route path="system-administration/role" element={<Role />} />
{/* Legacy Routes (redirects to new organized routes) */} {/* Legacy Routes (redirects to new organized routes) */}
<Route <Route
path="cost-recommendation" path="cost-recommendation"
@@ -100,8 +93,8 @@ function App() {
path="admin/roles" path="admin/roles"
element={<Navigate to="/system-administration/role" replace />} element={<Navigate to="/system-administration/role" replace />}
/> />
<Route index element={<Dashboard />} />{" "}
<Route index element={<Navigate to="/dashboard" replace />} /> {/* Dashboard is now the default landing page */}
{/* Protected 404 - untuk route di dalam layout sidebar */} {/* Protected 404 - untuk route di dalam layout sidebar */}
<Route path="*" element={<NotFoundProtected />} /> <Route path="*" element={<NotFoundProtected />} />
</Route> </Route>