[agent-pipeline] rollback to d3acf391
This commit is contained in:
parent
9dc2959601
commit
ad48b22770
|
|
@ -490,12 +490,12 @@ function AppLayoutInner({ children }: AppLayoutProps) {
|
||||||
|
|
||||||
const menuObjid = parseInt((menu.objid || menu.id)?.toString() || "0");
|
const menuObjid = parseInt((menu.objid || menu.id)?.toString() || "0");
|
||||||
|
|
||||||
if (activeTab?.type === "admin" && activeTab?.adminUrl) {
|
if (activeTab.type === "admin" && activeTab.adminUrl) {
|
||||||
return menu.url === activeTab.adminUrl;
|
return menu.url === activeTab.adminUrl;
|
||||||
}
|
}
|
||||||
if (activeTab?.type === "screen") {
|
if (activeTab.type === "screen") {
|
||||||
if (activeTab?.menuObjid != null && menuObjid === activeTab.menuObjid) return true;
|
if (activeTab.menuObjid != null && menuObjid === activeTab.menuObjid) return true;
|
||||||
if (activeTab?.screenId != null && menu.screenId === activeTab.screenId) return true;
|
if (activeTab.screenId != null && menu.screenId === activeTab.screenId) return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
@ -562,34 +562,6 @@ function AppLayoutInner({ children }: AppLayoutProps) {
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const uiMenus = user ? convertMenuToUI(currentMenus, user as ExtendedUserInfo) : [];
|
|
||||||
|
|
||||||
// 활성 탭에 해당하는 메뉴가 속한 부모 메뉴 자동 확장 (기존 확장 상태 유지, 추가만 함)
|
|
||||||
useEffect(() => {
|
|
||||||
if (!activeTab || uiMenus.length === 0) return;
|
|
||||||
|
|
||||||
const toExpand: string[] = [];
|
|
||||||
for (const menu of uiMenus) {
|
|
||||||
if (menu.hasChildren && menu.children) {
|
|
||||||
const hasActiveChild = menu.children.some((child: any) => isMenuActive(child));
|
|
||||||
if (hasActiveChild) toExpand.push(menu.id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (toExpand.length > 0) {
|
|
||||||
setExpandedMenus((prev) => {
|
|
||||||
const next = new Set(prev);
|
|
||||||
let changed = false;
|
|
||||||
toExpand.forEach((id) => {
|
|
||||||
if (!next.has(id)) {
|
|
||||||
next.add(id);
|
|
||||||
changed = true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return changed ? next : prev;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}, [activeTab, uiMenus, isMenuActive]);
|
|
||||||
|
|
||||||
if (isPreviewMode) {
|
if (isPreviewMode) {
|
||||||
return (
|
return (
|
||||||
<div className="bg-background h-screen w-full overflow-auto p-4">{children}</div>
|
<div className="bg-background h-screen w-full overflow-auto p-4">{children}</div>
|
||||||
|
|
@ -607,6 +579,30 @@ function AppLayoutInner({ children }: AppLayoutProps) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const uiMenus = convertMenuToUI(currentMenus, user as ExtendedUserInfo);
|
||||||
|
|
||||||
|
// 활성 탭에 해당하는 메뉴가 속한 부모 메뉴 자동 확장
|
||||||
|
useEffect(() => {
|
||||||
|
if (!activeTab || uiMenus.length === 0) return;
|
||||||
|
|
||||||
|
const toExpand: string[] = [];
|
||||||
|
for (const menu of uiMenus) {
|
||||||
|
if (menu.hasChildren && menu.children) {
|
||||||
|
const hasActiveChild = menu.children.some((child: any) => isMenuActive(child));
|
||||||
|
if (hasActiveChild && !expandedMenus.has(menu.id)) {
|
||||||
|
toExpand.push(menu.id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (toExpand.length > 0) {
|
||||||
|
setExpandedMenus((prev) => {
|
||||||
|
const next = new Set(prev);
|
||||||
|
toExpand.forEach((id) => next.add(id));
|
||||||
|
return next;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}, [activeTab, uiMenus, isMenuActive, expandedMenus]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="bg-background flex h-screen flex-col">
|
<div className="bg-background flex h-screen flex-col">
|
||||||
{/* 모바일 헤더 */}
|
{/* 모바일 헤더 */}
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ import {
|
||||||
Move,
|
Move,
|
||||||
FileSpreadsheet,
|
FileSpreadsheet,
|
||||||
List,
|
List,
|
||||||
PanelRight,
|
LayoutPanelRight,
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
import { dataApi } from "@/lib/api/data";
|
import { dataApi } from "@/lib/api/data";
|
||||||
import { entityJoinApi } from "@/lib/api/entityJoin";
|
import { entityJoinApi } from "@/lib/api/entityJoin";
|
||||||
|
|
@ -3972,7 +3972,7 @@ export const SplitPanelLayoutComponent: React.FC<SplitPanelLayoutComponentProps>
|
||||||
>
|
>
|
||||||
<div className="flex w-full items-center justify-between gap-2">
|
<div className="flex w-full items-center justify-between gap-2">
|
||||||
<div className="flex min-w-0 flex-1 items-center gap-2">
|
<div className="flex min-w-0 flex-1 items-center gap-2">
|
||||||
<PanelRight className="h-4 w-4 shrink-0 text-muted-foreground" />
|
<LayoutPanelRight className="h-4 w-4 shrink-0 text-muted-foreground" />
|
||||||
{/* 탭이 없으면 제목만, 있으면 탭으로 전환 (2px primary 밑줄 인디케이터) */}
|
{/* 탭이 없으면 제목만, 있으면 탭으로 전환 (2px primary 밑줄 인디케이터) */}
|
||||||
{(componentConfig.rightPanel?.additionalTabs?.length || 0) > 0 ? (
|
{(componentConfig.rightPanel?.additionalTabs?.length || 0) > 0 ? (
|
||||||
<div className="flex items-center gap-0">
|
<div className="flex items-center gap-0">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue