From 44353c09a0e2951c52323c48183107c604e9cff1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B6=8C=ED=98=81=EC=84=B1?= Date: Thu, 29 Jan 2026 09:30:32 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EA=B2=AC=EC=A0=81=20=EC=A0=80=EC=9E=A5?= =?UTF-8?q?=20=EC=8B=9C=20status/is=5Ffinal=20=EC=B2=98=EB=A6=AC=20?= =?UTF-8?q?=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - status와 is_final을 API 요청에서 제거 (finalizeQuote가 담당) - 저장 로직 주석 명확화 --- .../(protected)/sales/quote-management/[id]/page.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/app/[locale]/(protected)/sales/quote-management/[id]/page.tsx b/src/app/[locale]/(protected)/sales/quote-management/[id]/page.tsx index 14b1b1af..b7b4db65 100644 --- a/src/app/[locale]/(protected)/sales/quote-management/[id]/page.tsx +++ b/src/app/[locale]/(protected)/sales/quote-management/[id]/page.tsx @@ -128,14 +128,16 @@ export default function QuoteDetailPage() { setIsSaving(true); try { // V2 폼 데이터를 API 형식으로 변환 - const updatedData = { ...data, status: saveType }; - const apiData = transformV2ToApi(updatedData); + const apiData = transformV2ToApi(data); + // status와 is_final은 finalizeQuote API가 담당하므로 제거 + delete (apiData as Record).status; + delete (apiData as Record).is_final; console.log("[QuoteDetailPage] 수정 데이터:", apiData); console.log("[QuoteDetailPage] 저장 타입:", saveType); console.log("[QuoteDetailPage] 현재 모드:", isEditMode ? "edit" : "view"); - // 1. 먼저 데이터 저장 + // 1. 먼저 데이터 저장 (status는 변경하지 않음) const updateResult = await updateQuote(quoteId, apiData); if (!updateResult.success) { @@ -143,7 +145,7 @@ export default function QuoteDetailPage() { return; } - // 2. 견적 확정인 경우 finalize API 호출 + // 2. 견적 확정인 경우 finalize API 호출 (status 변경은 여기서 처리) if (saveType === "final") { const finalizeResult = await finalizeQuote(quoteId);