diff --git a/adminfront/src/app/routes.tsx b/adminfront/src/app/routes.tsx index b00da29f..4422e908 100644 --- a/adminfront/src/app/routes.tsx +++ b/adminfront/src/app/routes.tsx @@ -11,7 +11,6 @@ import { TenantAdminsAndOwnersTab } from "../features/tenants/routes/TenantAdmin import TenantCreatePage from "../features/tenants/routes/TenantCreatePage"; import TenantDetailPage from "../features/tenants/routes/TenantDetailPage"; import TenantListPage from "../features/tenants/routes/TenantListPage"; -import { TenantOrgChartPage } from "../features/tenants/routes/TenantOrgChartPage"; import { TenantProfilePage } from "../features/tenants/routes/TenantProfilePage"; import { TenantSchemaPage } from "../features/tenants/routes/TenantSchemaPage"; import TenantUserGroupsTab from "../features/user-groups/routes/TenantUserGroupsTab"; @@ -41,7 +40,6 @@ export const router = createBrowserRouter( { path: "users/new", element: }, { path: "users/:id", element: }, { path: "tenants", element: }, - { path: "tenants/org-chart", element: }, { path: "tenants/new", element: }, { path: "tenants/:tenantId", diff --git a/adminfront/src/components/layout/AppLayout.tsx b/adminfront/src/components/layout/AppLayout.tsx index 2635c05d..9f42e384 100644 --- a/adminfront/src/components/layout/AppLayout.tsx +++ b/adminfront/src/components/layout/AppLayout.tsx @@ -27,7 +27,14 @@ import { import LanguageSelector from "../common/LanguageSelector"; import RoleSwitcher from "./RoleSwitcher"; -const staticNavItems = [ +interface NavItem { + label: string; + to: string; + icon: React.ComponentType<{ size?: number | string }>; + isExternal?: boolean; +} + +const staticNavItems: NavItem[] = [ { label: "ui.admin.nav.overview", to: "/", icon: LayoutDashboard }, { label: "ui.admin.nav.users", to: "/users", icon: Users }, { label: "ui.admin.nav.api_keys", to: "/api-keys", icon: Key }, @@ -108,8 +115,9 @@ function AppLayout() { }); filteredItems.splice(2, 0, { label: "ui.admin.nav.org_chart", - to: "/tenants/org-chart", + to: import.meta.env.VITE_ORGCHART_URL || "http://localhost:5175", icon: Network, + isExternal: true, }); } else if (isTenantAdmin || manageableCount > 0) { if (manageableCount <= 1 && profile?.tenantId) { @@ -130,16 +138,18 @@ function AppLayout() { 0, { label: "ui.admin.nav.org_chart", - to: "/tenants/org-chart", + to: import.meta.env.VITE_ORGCHART_URL || "http://localhost:5175", icon: Network, + isExternal: true, }, ); } else { // 일반 사용자(Tenant Member)도 조직도 메뉴를 볼 수 있도록 추가합니다. filteredItems.splice(1, 0, { label: "ui.admin.nav.org_chart", - to: "/tenants/org-chart", + to: import.meta.env.VITE_ORGCHART_URL || "http://localhost:5175", icon: Network, + isExternal: true, }); } @@ -440,7 +450,8 @@ function AppLayout() {