feat: 버튼 컴포넌트 수정 액션에서 모달 제목/설명 전달
변경 사항: 1. InteractiveScreenViewer - handleEditAction 수정 ✅ - config에서 editModalTitle, editModalDescription 읽기 - openEditModal 이벤트로 제목/설명 전달 2. ButtonTypeConfig 타입 추가 ✅ - editModalTitle 필드 추가 - editModalDescription 필드 추가 3. ButtonConfigPanel 수정 ✅ - webTypeConfig에도 제목/설명 저장 - 이중 저장 (action + webTypeConfig) 결과: - ✅ 버튼의 수정 액션 실행 시 설정한 제목이 모달에 표시됨 - ✅ 버튼의 수정 액션 실행 시 설정한 설명이 모달에 표시됨 - ✅ EditModal이 openEditModal 이벤트에서 제목/설명 받음 - ✅ 전체 데이터 흐름 완성
This commit is contained in:
@@ -1382,9 +1382,29 @@ export const InteractiveScreenViewer: React.FC<InteractiveScreenViewerProps> = (
|
||||
|
||||
// 편집 액션
|
||||
const handleEditAction = () => {
|
||||
console.log("✏️ 편집 모드 활성화");
|
||||
// 읽기 전용 모드를 편집 모드로 전환
|
||||
alert("편집 모드로 전환되었습니다.");
|
||||
console.log("✏️ 수정 액션 실행");
|
||||
|
||||
// 버튼 컴포넌트의 수정 모달 설정 가져오기
|
||||
const editModalTitle = config?.editModalTitle || "";
|
||||
const editModalDescription = config?.editModalDescription || "";
|
||||
|
||||
console.log("📝 버튼 수정 모달 설정:", { editModalTitle, editModalDescription });
|
||||
|
||||
// EditModal 열기 이벤트 발생
|
||||
const event = new CustomEvent("openEditModal", {
|
||||
detail: {
|
||||
screenId: screenInfo?.id,
|
||||
modalSize: "lg",
|
||||
editData: formData,
|
||||
modalTitle: editModalTitle,
|
||||
modalDescription: editModalDescription,
|
||||
onSave: () => {
|
||||
console.log("✅ 수정 완료");
|
||||
// 필요시 폼 새로고침 또는 콜백 실행
|
||||
},
|
||||
},
|
||||
});
|
||||
window.dispatchEvent(event);
|
||||
};
|
||||
|
||||
// 추가 액션
|
||||
|
||||
Reference in New Issue
Block a user