mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 08:48:11 +00:00
feat(freight:backoffice): migrated smart-office user-management
This commit is contained in:
@@ -1,14 +1,11 @@
|
||||
import { Navigate, Outlet, Route, Routes, useLocation, useNavigate } from "react-router-dom";
|
||||
import { DashboardLayout, type SidebarItem } from "@edr/ui-common";
|
||||
import { LayoutDashboard, ShieldCheck, Users, Network } from "lucide-react";
|
||||
import { LayoutDashboard, Network } from "lucide-react";
|
||||
|
||||
import { useAuth } from "./auth/useAuth";
|
||||
import LoginPage from "./pages/auth/LoginPage";
|
||||
import OverviewPage from "./pages/dashboard/OverviewPage";
|
||||
import UsersPage from "./pages/dashboard/user-management/UsersPage";
|
||||
import RolesPage from "./pages/dashboard/user-management/RolesPage";
|
||||
import DepartmentsPage from "./pages/dashboard/user-management/DepartmentsPage";
|
||||
import OrgStructurePage from "./pages/dashboard/org-structure/OrgStructurePage";
|
||||
import UserManagementPage from "./pages/dashboard/user-management/UserManagementPage";
|
||||
import LoadingScreen from "./components/LoadingScreen";
|
||||
|
||||
const sidebarItems: SidebarItem[] = [
|
||||
@@ -18,8 +15,8 @@ const sidebarItems: SidebarItem[] = [
|
||||
icon: <LayoutDashboard />,
|
||||
},
|
||||
{
|
||||
label: "Org structure",
|
||||
href: "/dashboard/org-structure",
|
||||
label: "User management",
|
||||
href: "/dashboard/user-management",
|
||||
icon: <Network />,
|
||||
},
|
||||
];
|
||||
@@ -69,9 +66,9 @@ const App = () => {
|
||||
<Route path="/dashboard" element={<Navigate to="/dashboard/overview" replace />} />
|
||||
<Route path="/dashboard" element={<DashboardShell />}>
|
||||
<Route path="overview" element={<OverviewPage />} />
|
||||
<Route path="org-structure" element={<OrgStructurePage />} />
|
||||
<Route path="org-structure/units/:unitId" element={<OrgStructurePage />} />
|
||||
<Route path="org-structure/units/:unitId/:section" element={<OrgStructurePage />} />
|
||||
<Route path="user-management" element={<UserManagementPage />} />
|
||||
<Route path="org-structure" element={<Navigate to="/dashboard/user-management" replace />} />
|
||||
<Route path="org-structure/*" element={<Navigate to="/dashboard/user-management" replace />} />
|
||||
</Route>
|
||||
<Route path="*" element={<Navigate to="/dashboard/overview" replace />} />
|
||||
</Routes>
|
||||
|
||||
Reference in New Issue
Block a user