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)