feat: 카테고리 컴포넌트 메뉴 스코프 전환 완료
✅ 구현 내용: 1. 백엔드 API 추가 - GET /api/table-management/menu/:menuObjid/category-columns - 형제 메뉴들의 테이블에서 카테고리 타입 컬럼 조회 - menuService.getSiblingMenuObjids() 재사용 2. 프론트엔드 CategoryWidget 수정 - menuObjid를 props로 받아 CategoryColumnList에 전달 - effectiveMenuObjid로 props.menuObjid도 처리 - 선택된 컬럼에 tableName 포함하여 상태 관리 3. CategoryColumnList 수정 - menuObjid 기반으로 형제 메뉴의 모든 카테고리 컬럼 조회 - 테이블명+컬럼명 함께 표시 - onColumnSelect에 tableName 전달 4. 메뉴 네비게이션 수정 - AppLayout.tsx: 화면 이동 시 menuObjid를 URL 쿼리 파라미터로 전달 - useMenu.ts: 동일하게 menuObjid 전달 - page.tsx: 자식 컴포넌트에도 menuObjid 전달 🎯 효과: - 이제 형제 메뉴들이 서로 다른 테이블을 사용해도 카테고리 공유 가능 - 메뉴 클릭 → 화면 이동 시 자동으로 menuObjid 전달 - 카테고리 위젯이 형제 메뉴의 모든 카테고리 컬럼 표시
This commit is contained in:
@@ -274,10 +274,14 @@ function AppLayoutInner({ children }: AppLayoutProps) {
|
||||
// 할당된 화면이 있으면 첫 번째 화면으로 이동
|
||||
const firstScreen = assignedScreens[0];
|
||||
|
||||
// 관리자 모드 상태를 쿼리 파라미터로 전달
|
||||
const screenPath = isAdminMode
|
||||
? `/screens/${firstScreen.screenId}?mode=admin`
|
||||
: `/screens/${firstScreen.screenId}`;
|
||||
// 관리자 모드 상태와 menuObjid를 쿼리 파라미터로 전달
|
||||
const params = new URLSearchParams();
|
||||
if (isAdminMode) {
|
||||
params.set("mode", "admin");
|
||||
}
|
||||
params.set("menuObjid", menuObjid.toString());
|
||||
|
||||
const screenPath = `/screens/${firstScreen.screenId}?${params.toString()}`;
|
||||
|
||||
router.push(screenPath);
|
||||
if (isMobile) {
|
||||
|
||||
Reference in New Issue
Block a user