From 984adcfa62b5ef20f7bf6630f873688626f7337d Mon Sep 17 00:00:00 2001 From: chan Date: Mon, 13 Apr 2026 10:38:04 +0900 Subject: [PATCH] feat(adminfront): add org chart to sidebar navigation Adds the Organization Chart tab to the main sidebar for all users. Removes the 'View Org Chart' button from the Tenant List page. Enhances active state logic for nested routes. --- .../src/components/layout/AppLayout.tsx | 62 ++++++++++++++----- .../tenants/routes/TenantListPage.tsx | 6 -- .../tenants/routes/TenantOrgChartPage.tsx | 2 +- adminfront/src/locales/en.toml | 1 + adminfront/src/locales/ko.toml | 1 + adminfront/src/locales/template.toml | 1 + locales/en.toml | 1 + locales/ko.toml | 2 + locales/template.toml | 2 + 9 files changed, 54 insertions(+), 24 deletions(-) diff --git a/adminfront/src/components/layout/AppLayout.tsx b/adminfront/src/components/layout/AppLayout.tsx index f82e6ea7..927f75b0 100644 --- a/adminfront/src/components/layout/AppLayout.tsx +++ b/adminfront/src/components/layout/AppLayout.tsx @@ -7,6 +7,7 @@ import { LayoutDashboard, LogOut, Moon, + Network, NotebookTabs, ShieldHalf, Sun, @@ -105,6 +106,11 @@ function AppLayout() { to: "/tenants", icon: Building2, }); + filteredItems.splice(2, 0, { + label: "ui.admin.nav.org_chart", + to: "/tenants/org-chart", + icon: Network, + }); } else if (isTenantAdmin || manageableCount > 0) { if (manageableCount <= 1 && profile?.tenantId) { filteredItems.splice(1, 0, { @@ -119,6 +125,18 @@ function AppLayout() { icon: Building2, }); } + filteredItems.splice(manageableCount <= 1 && profile?.tenantId ? 2 : 2, 0, { + label: "ui.admin.nav.org_chart", + to: "/tenants/org-chart", + icon: Network, + }); + } else { + // 일반 사용자(Tenant Member)도 조직도 메뉴를 볼 수 있도록 추가합니다. + filteredItems.splice(1, 0, { + label: "ui.admin.nav.org_chart", + to: "/tenants/org-chart", + icon: Network, + }); } return filteredItems; @@ -418,23 +436,33 @@ function AppLayout() {