feat: 코드 컴포넌트에 메뉴 스코프 적용

- useCodeOptions 훅에 menuObjid 파라미터 추가
- commonCodeApi.codes.getList에 menuObjid 전달
- SelectBasicComponent에서 menuObjid 받아서 useCodeOptions로 전달
- InteractiveScreenViewer에서 DynamicWebTypeRenderer로 menuObjid 전달
- 화면 페이지에서 RealtimePreview로 menuObjid 전달

이제 코드 위젯도 카테고리처럼 형제 메뉴별로 격리됩니다.
This commit is contained in:
kjs
2025-11-11 15:25:07 +09:00
parent 6ebe551caa
commit 32d4575fb5
8 changed files with 84 additions and 24 deletions

View File

@@ -23,6 +23,7 @@ export interface SelectBasicComponentProps {
onDragStart?: () => void;
onDragEnd?: () => void;
value?: any; // 외부에서 전달받는 값
menuObjid?: number; // 🆕 메뉴 OBJID (코드 스코프용)
[key: string]: any;
}
@@ -46,6 +47,7 @@ const SelectBasicComponent: React.FC<SelectBasicComponentProps> = ({
onDragStart,
onDragEnd,
value: externalValue, // 명시적으로 value prop 받기
menuObjid, // 🆕 메뉴 OBJID
...props
}) => {
// 🚨 최우선 디버깅: 컴포넌트가 실행되는지 확인
@@ -132,7 +134,7 @@ const SelectBasicComponent: React.FC<SelectBasicComponentProps> = ({
options: codeOptions,
isLoading: isLoadingCodes,
isFetching,
} = useCodeOptions(codeCategory, isCodeCategoryValid);
} = useCodeOptions(codeCategory, isCodeCategoryValid, menuObjid);
// React Query 상태 디버깅
useEffect(() => {