feat: 모달에서 카테고리 조회 시 menuObjid 전달 기능 추가

카테고리 값을 메뉴별로 다르게 설정할 수 있도록 menuObjid를 모달 체인 전체에 전달합니다.

변경 내용:
- InteractiveDataTable: 등록/수정 모달 열 때 menuObjid를 이벤트에 포함
- EditModal: menuObjid를 state에 저장하고 하위 컴포넌트에 전달
- SaveModal: menuObjid props를 받아서 DynamicComponentRenderer에 전달
- SelectBasicComponent: getCategoryValues API 호출 시 menuObjid 파라미터 전달

이를 통해 같은 테이블/컬럼이라도 메뉴에 따라 다른 카테고리 옵션을 표시할 수 있습니다.

카테고리 API를 호출할 때 menuObjid를 전달하여 메뉴별 필터링 적용 가능하게 변경
This commit is contained in:
SeongHyun Kim
2026-01-21 16:42:11 +09:00
parent 430723df59
commit 055094308d
4 changed files with 18 additions and 4 deletions

View File

@@ -299,12 +299,14 @@ const SelectBasicComponent: React.FC<SelectBasicComponentProps> = ({
tableName: component.tableName,
columnName: component.columnName,
webType,
menuObjid, // 🆕 menuObjid 로깅 추가
});
setIsLoadingCategories(true);
import("@/lib/api/tableCategoryValue").then(({ getCategoryValues }) => {
getCategoryValues(component.tableName!, component.columnName!)
// 🆕 menuObjid를 4번째 파라미터로 전달 (카테고리 스코프 적용)
getCategoryValues(component.tableName!, component.columnName!, false, menuObjid)
.then((response) => {
console.log("🔍 [SelectBasic] 카테고리 API 응답:", response);
@@ -324,6 +326,7 @@ const SelectBasicComponent: React.FC<SelectBasicComponentProps> = ({
activeValuesCount: activeValues.length,
options,
sampleOption: options[0],
menuObjid, // 🆕 menuObjid 로깅 추가
});
setCategoryOptions(options);
@@ -339,7 +342,7 @@ const SelectBasicComponent: React.FC<SelectBasicComponentProps> = ({
});
});
}
}, [webType, component.tableName, component.columnName]);
}, [webType, component.tableName, component.columnName, menuObjid]); // 🆕 menuObjid 의존성 추가
// 디버깅: menuObjid가 제대로 전달되는지 확인
useEffect(() => {