diff --git a/src/components/process-management/ProcessDetail.tsx b/src/components/process-management/ProcessDetail.tsx index 3b91dfeb..0c4196e6 100644 --- a/src/components/process-management/ProcessDetail.tsx +++ b/src/components/process-management/ProcessDetail.tsx @@ -87,8 +87,8 @@ export function ProcessDetail({ process, onProcessUpdate }: ProcessDetailProps) }; // 품목 전체 삭제 + const [showRemoveAllDialog, setShowRemoveAllDialog] = useState(false); const handleRemoveAllItems = async () => { - if (!confirm(`등록된 품목 ${itemCount}개를 모두 삭제하시겠습니까?`)) return; const result = await removeProcessItem(process.id, []); if (result.success && result.data) { toast.success('품목이 모두 제거되었습니다.'); @@ -96,6 +96,7 @@ export function ProcessDetail({ process, onProcessUpdate }: ProcessDetailProps) } else { toast.error(result.error || '품목 전체 제거에 실패했습니다.'); } + setShowRemoveAllDialog(false); }; const [isDuplicating, setIsDuplicating] = useState(false); @@ -294,7 +295,7 @@ export function ProcessDetail({ process, onProcessUpdate }: ProcessDetailProps)