fix: 조건부 컨테이너 API 임포트 경로 수정

- screenManagementApi → screenApi로 변경
- @/lib/api/screenManagement → @/lib/api/screen
- screenApi.getScreens() 사용하여 화면 목록 조회
- ScreenDefinition 타입에 맞게 필드명 수정 (id → screenId)
This commit is contained in:
kjs 2025-11-14 18:00:56 +09:00
parent f5756e184f
commit 7d1ecf718b
1 changed files with 6 additions and 6 deletions

View File

@ -14,7 +14,7 @@ import {
} from "@/components/ui/select";
import { Plus, Trash2, GripVertical, Loader2 } from "lucide-react";
import { ConditionalContainerConfig, ConditionalSection } from "./types";
import { screenManagementApi } from "@/lib/api/screenManagement";
import { screenApi } from "@/lib/api/screen";
interface ConditionalContainerConfigPanelProps {
config: ConditionalContainerConfig;
@ -43,8 +43,8 @@ export function ConditionalContainerConfigPanel({
const loadScreens = async () => {
setScreensLoading(true);
try {
const response = await screenManagementApi.getScreenList();
if (response.success && response.data) {
const response = await screenApi.getScreens({ page: 1, size: 1000 });
if (response.data) {
setScreens(response.data);
}
} catch (error) {
@ -226,7 +226,7 @@ export function ConditionalContainerConfigPanel({
onValueChange={(value) => {
const screenId = value ? parseInt(value) : null;
const selectedScreen = screens.find(
(s) => s.id === screenId
(s) => s.screenId === screenId
);
updateSection(section.id, {
screenId,
@ -241,8 +241,8 @@ export function ConditionalContainerConfigPanel({
<SelectItem value=""> </SelectItem>
{screens.map((screen) => (
<SelectItem
key={screen.id}
value={screen.id.toString()}
key={screen.screenId}
value={screen.screenId.toString()}
>
{screen.screenName}
{screen.description && (