From 5131b0d049ad7fd73a56bcbfd04a91356930cce4 Mon Sep 17 00:00:00 2001 From: basssy Date: Mon, 18 Nov 2024 18:33:38 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B2=AC=EC=A0=81=EC=84=9C=20=EC=A0=80?= =?UTF-8?q?=EC=9E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/floorPlan/estimate/useEstimateController.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/hooks/floorPlan/estimate/useEstimateController.js b/src/hooks/floorPlan/estimate/useEstimateController.js index 07f50ec8..0dd30512 100644 --- a/src/hooks/floorPlan/estimate/useEstimateController.js +++ b/src/hooks/floorPlan/estimate/useEstimateController.js @@ -12,7 +12,7 @@ const reducer = (prevState, nextState) => { } // Constants -const ESTIMATE_API_ENDPOINT = '/api/estimates' // API 엔드포인트 정의 +const ESTIMATE_API_ENDPOINT = '/api/estimate' // API 엔드포인트 정의 const defaultEstimateData = { estimateDate: new Date(), //견적일 @@ -183,13 +183,17 @@ export const useEstimateController = (planNo) => { return alert(getMessage('estimate.detail.save.requiredItem')) } + // console.log('최종 남은 아이템정보:::', estimateData.itemList) console.log('최종 정보::;', estimateData) - console.log('최종 남은 아이템정보:::', estimateData.itemList) + //drawingFlg null ???? //2. 상세데이터 저장 // return await promisePost({ url: `${ESTIMATE_API_ENDPOINT}/save-estimate`, data: estimateData }).then((res) => { - if (res) { + console.log('res::::::::::::', res) + if (res.status === 201) { + console.log('201:::::::::') alert(getMessage('estimate.detail.save.alertMsg')) + //어디로 보낼지 } }) }