mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-28 13:40:57 +00:00
feat(freight:backoffice): added org structure managemnet
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { Navigate, Outlet, Route, Routes, useLocation, useNavigate } from "react-router-dom";
|
||||
import { DashboardLayout, type SidebarItem } from "@edr/ui-common";
|
||||
import { LayoutDashboard, ShieldCheck, Users, Building2 } from "lucide-react";
|
||||
import { LayoutDashboard, ShieldCheck, Users, Network } from "lucide-react";
|
||||
|
||||
import { useAuth } from "./auth/useAuth";
|
||||
import LoginPage from "./pages/auth/LoginPage";
|
||||
@@ -8,6 +8,7 @@ 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 LoadingScreen from "./components/LoadingScreen";
|
||||
|
||||
const sidebarItems: SidebarItem[] = [
|
||||
@@ -30,13 +31,13 @@ const sidebarItems: SidebarItem[] = [
|
||||
label: "Roles",
|
||||
href: "/dashboard/user-management/roles",
|
||||
},
|
||||
{
|
||||
label: "Departments",
|
||||
href: "/dashboard/user-management/departments",
|
||||
icon: <Building2 />,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "Org structure",
|
||||
href: "/dashboard/org-structure",
|
||||
icon: <Network />,
|
||||
},
|
||||
];
|
||||
|
||||
const DashboardShell = () => {
|
||||
@@ -90,10 +91,10 @@ const App = () => {
|
||||
/>
|
||||
<Route path="user-management/users" element={<UsersPage />} />
|
||||
<Route path="user-management/roles" element={<RolesPage />} />
|
||||
<Route
|
||||
path="user-management/departments"
|
||||
element={<DepartmentsPage />}
|
||||
/>
|
||||
<Route path="user-management/departments" element={<DepartmentsPage />} />
|
||||
<Route path="org-structure" element={<OrgStructurePage />} />
|
||||
<Route path="org-structure/units/:unitId" element={<OrgStructurePage />} />
|
||||
<Route path="org-structure/units/:unitId/:section" element={<OrgStructurePage />} />
|
||||
</Route>
|
||||
<Route path="*" element={<Navigate to="/dashboard/overview" replace />} />
|
||||
</Routes>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user