From a49aa2d31ffe96c894ca714c5e3adeaf4c6c54e0 Mon Sep 17 00:00:00 2001 From: chan Date: Wed, 15 Apr 2026 17:44:54 +0900 Subject: [PATCH] refactor(adminfront): remove internal org-chart and delegate to orgfront - Remove TenantOrgChartPage and related internal routes - Update AppLayout to render external links for org-chart navigation - Add orgfront service configuration to docker-compose.yaml --- adminfront/src/app/routes.tsx | 2 - .../src/components/layout/AppLayout.tsx | 28 +- .../tenants/routes/TenantOrgChartPage.tsx | 436 ------------------ docker-compose.yaml | 20 + 4 files changed, 44 insertions(+), 442 deletions(-) delete mode 100644 adminfront/src/features/tenants/routes/TenantOrgChartPage.tsx 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..7b541c4f 100644 --- a/adminfront/src/components/layout/AppLayout.tsx +++ b/adminfront/src/components/layout/AppLayout.tsx @@ -108,8 +108,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 +131,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 +443,9 @@ function AppLayout() {