From 70127d96a3c49ac0b65306fde668365339449971 Mon Sep 17 00:00:00 2001 From: basssy Date: Wed, 20 Nov 2024 15:04:45 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B2=AC=EC=A0=81=EC=84=9C=20=EC=83=81?= =?UTF-8?q?=EC=84=B8=20=EC=A0=80=EC=9E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/auth/Login.jsx | 8 +++---- src/components/estimate/Estimate.jsx | 4 ++-- .../estimate/useEstimateController.js | 22 ++++++++++--------- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/src/components/auth/Login.jsx b/src/components/auth/Login.jsx index 5418dec7..6060b308 100644 --- a/src/components/auth/Login.jsx +++ b/src/components/auth/Login.jsx @@ -83,12 +83,12 @@ export default function Login() { /////////////////////////////////////////////////////////// // 임시 로그인 처리 setSession({ - userId: 'NEW0166102', + userId: 'an1', saleStoreId: null, name: null, mail: null, tel: null, - storeId: 'TEMP02', + storeId: 'X42', userNm: 'ㅇㅇ6610', userNmKana: '신규사용자 16610', category: '인상6610', @@ -101,12 +101,12 @@ export default function Login() { custCd: '100000', }) setSessionState({ - userId: 'NEW0166102', + userId: 'an1', saleStoreId: null, name: null, mail: null, tel: null, - storeId: 'TEMP02', + storeId: 'X42', userNm: 'ㅇㅇ6610', userNmKana: '신규사용자 16610', category: '인상6610', diff --git a/src/components/estimate/Estimate.jsx b/src/components/estimate/Estimate.jsx index 14285f61..7eb23fa5 100644 --- a/src/components/estimate/Estimate.jsx +++ b/src/components/estimate/Estimate.jsx @@ -580,9 +580,9 @@ export default function Estimate({ params }) { } useEffect(() => { - console.log('상세정보???????????', state) - console.log('업뎃날짜시간???????????', state.lastEditDatetime) + console.log('수정날짜시간???????????', state.lastEditDatetime) }, [state]) + return (
diff --git a/src/hooks/floorPlan/estimate/useEstimateController.js b/src/hooks/floorPlan/estimate/useEstimateController.js index 7def3c44..19dbac5e 100644 --- a/src/hooks/floorPlan/estimate/useEstimateController.js +++ b/src/hooks/floorPlan/estimate/useEstimateController.js @@ -43,7 +43,7 @@ export const useEstimateController = (planNo) => { const { getMessage } = useMessage() - const { get, post, promisePost } = useAxios(globalLocaleState) + const { promiseGet, get, post, promisePost } = useAxios(globalLocaleState) const [isLoading, setIsLoading] = useState(false) const [state, setState] = useReducer(reducer, defaultEstimateData) @@ -60,16 +60,18 @@ export const useEstimateController = (planNo) => { // 상세 조회 const fetchSetting = async (objectNo, planNo) => { try { - await get({ url: `/api/estimate/${objectNo}/${planNo}/detail` }).then((res) => { - if (isObjectNotEmpty(res)) { - if (res.itemList.length > 0) { - res.itemList.map((item) => { - item.delFlg = '0' - }) + await promiseGet({ url: `/api/estimate/${objectNo}/${planNo}/detail` }).then((res) => { + if (res.status === 200) { + if (isObjectNotEmpty(res.data)) { + if (res.data.itemList.length > 0) { + res.data.itemList.map((item) => { + item.delFlg = '0' + }) + } + console.log('조회결과;', res.data) + console.log('수정시간;', res.data.lastEditDatetime) + setState(res.data) } - console.log('조회 결과::::', res) - console.log('수정일::::', res.lastEditDatetime) - setState(res) } }) setIsLoading(true)