출하계획 모달 수정

This commit is contained in:
SeongHyun Kim 2025-12-15 18:09:55 +09:00
parent 2f66fe1913
commit ffb59b4e1b
1 changed files with 11 additions and 14 deletions

View File

@ -1780,16 +1780,15 @@ export class ButtonActionExecutor {
/** /**
* *
* 🔧 modal (INSERT) * ( )
* edit (UPDATE)
*/ */
private static async handleModal(config: ButtonActionConfig, context: ButtonActionContext): Promise<boolean> { private static async handleModal(config: ButtonActionConfig, context: ButtonActionContext): Promise<boolean> {
// 모달 열기 로직 // 모달 열기 로직
console.log("모달 열기 (신규 등록 모드):", { console.log("모달 열기:", {
title: config.modalTitle, title: config.modalTitle,
size: config.modalSize, size: config.modalSize,
targetScreenId: config.targetScreenId, targetScreenId: config.targetScreenId,
// 🔧 selectedRowsData는 modal 액션에서 사용하지 않음 (신규 등록이므로) selectedRowsData: context.selectedRowsData,
}); });
if (config.targetScreenId) { if (config.targetScreenId) {
@ -1806,11 +1805,10 @@ export class ButtonActionExecutor {
} }
} }
// 🔧 modal 액션은 신규 등록이므로 selectedData를 전달하지 않음 // 선택된 행 데이터 수집
// selectedData가 있으면 ScreenModal에서 originalData로 인식하여 UPDATE 모드로 동작하게 됨 const selectedData = context.selectedRowsData || [];
// edit 액션만 selectedData/editData를 사용하여 UPDATE 모드로 동작 console.log("📦 [handleModal] 선택된 데이터:", selectedData);
console.log("📦 [handleModal] 신규 등록 모드 - selectedData 전달하지 않음"); console.log("📦 [handleModal] 분할 패널 부모 데이터:", context.splitPanelParentData);
console.log("📦 [handleModal] 분할 패널 부모 데이터 (초기값으로 사용):", context.splitPanelParentData);
// 전역 모달 상태 업데이트를 위한 이벤트 발생 // 전역 모달 상태 업데이트를 위한 이벤트 발생
const modalEvent = new CustomEvent("openScreenModal", { const modalEvent = new CustomEvent("openScreenModal", {
@ -1819,11 +1817,10 @@ export class ButtonActionExecutor {
title: config.modalTitle || "화면", title: config.modalTitle || "화면",
description: description, description: description,
size: config.modalSize || "md", size: config.modalSize || "md",
// 🔧 신규 등록이므로 selectedData/selectedIds를 전달하지 않음 // 선택된 행 데이터 전달
// edit 액션에서만 이 데이터를 사용 selectedData: selectedData,
selectedData: [], selectedIds: selectedData.map((row: any) => row.id).filter(Boolean),
selectedIds: [], // 분할 패널 부모 데이터 전달 (탭 안 모달에서 사용)
// 🆕 분할 패널 부모 데이터 전달 (탭 안 모달에서 초기값으로 사용)
splitPanelParentData: context.splitPanelParentData || {}, splitPanelParentData: context.splitPanelParentData || {},
}, },
}); });