1
0
forked from baron/baron-sso

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
This commit is contained in:
2026-04-15 17:44:54 +09:00
parent 726ac71214
commit a49aa2d31f
4 changed files with 44 additions and 442 deletions

View File

@@ -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() {
</div>
<nav className="px-2 pb-4 md:px-3 md:pb-8">
<div className="flex flex-col gap-1">
{navItems.map(({ label, to, icon: Icon }) => {
{navItems.map((item) => {
const { label, to, icon: Icon } = item;
const isExternal = (item as any).isExternal;
const isOrgChart = location.pathname === "/tenants/org-chart";
const isTenantsRoot = to === "/tenants";
const isCustomActive = isTenantsRoot
@@ -449,6 +454,21 @@ function AppLayout() {
? location.pathname === "/"
: location.pathname.startsWith(to);
if (isExternal) {
return (
<a
key={to}
href={to}
target="_blank"
rel="noopener noreferrer"
className="flex items-center gap-3 rounded-xl px-3 py-3 text-sm text-muted-foreground transition hover:bg-muted/10 hover:text-foreground"
>
<Icon size={18} />
<span>{t(label, label)}</span>
</a>
);
}
return (
<NavLink
key={to}