diff --git a/src/components/estimate/Estimate.jsx b/src/components/estimate/Estimate.jsx index 1d3b18ae..eb7d89d1 100644 --- a/src/components/estimate/Estimate.jsx +++ b/src/components/estimate/Estimate.jsx @@ -1128,7 +1128,7 @@ export default function Estimate({ params }) { { setEstimateContextState({ fileFlg: e.target.checked ? '1' : '0', diff --git a/src/components/main/ChangePasswordPop.jsx b/src/components/main/ChangePasswordPop.jsx index 188a3fe7..2af060e7 100644 --- a/src/components/main/ChangePasswordPop.jsx +++ b/src/components/main/ChangePasswordPop.jsx @@ -72,21 +72,25 @@ export default function ChangePasswordPop(props) { chgPwd: _password1, } - await patch({ url: '/api/login/v1.0/user/change-password', data: param }).then((res) => { - if (res.result.code === 200) { - if (res.result.resultCode === 'S') { - alert(getMessage('main.popup.login.success')) - setSessionState({ ...sessionState, pwdInitYn: 'Y' }) - //메인으로 이동 - props.setChagePasswordPopOpen(false) - router.push('/') + await patch({ url: '/api/login/v1.0/user/change-password', data: param }) + .then((res) => { + if (res?.result?.code === 200) { + if (res?.result?.resultCode === 'S') { + alert(getMessage('main.popup.login.success')) + //로그인 화면으로 이동해서 다시 로그인해야되서 setSessionState필요없음 + // setSessionState({ ...sessionState, pwdInitYn: 'Y' }) + props.setChagePasswordPopOpen(false) + router.push('/login') + } else { + alert(res?.result?.resultMsg) + } } else { - alert(res.result.resultMsg) + console.log('code not 200 error') } - } else { - console.log('error') - } - }) + }) + .catch((error) => { + console.log('catch::::::::', error) + }) } return ( diff --git a/src/components/management/popup/PlanRequestPop.jsx b/src/components/management/popup/PlanRequestPop.jsx index 291549c6..c7a3f7cd 100644 --- a/src/components/management/popup/PlanRequestPop.jsx +++ b/src/components/management/popup/PlanRequestPop.jsx @@ -262,6 +262,11 @@ export default function PlanRequestPop(props) { } } + const handleBlur = (e) => { + let input = e.target + input.value = input.value.replace(/[^0-9]/g, '') + } + // 엔터 이벤트 const handleByOnKeyUp = (e) => { if (e.key === 'Enter') { @@ -318,6 +323,7 @@ export default function PlanRequestPop(props) { className="input-light" value={schPlanReqNo} onKeyUp={handleKeyUp} + onBlur={handleBlur} onChange={(e) => { setSchPlanReqNo(e.target.value) }} diff --git a/src/hooks/floorPlan/estimate/useEstimateController.js b/src/hooks/floorPlan/estimate/useEstimateController.js index 6c9f221b..762cf421 100644 --- a/src/hooks/floorPlan/estimate/useEstimateController.js +++ b/src/hooks/floorPlan/estimate/useEstimateController.js @@ -148,12 +148,12 @@ export const useEstimateController = (planNo) => { let originFileFlg = false let fileFlg = true let itemFlg = true - if (estimateData.charger.trim().length === 0) { + if (estimateData?.charger === null || estimateData?.charger?.trim().length === 0) { flag = false return alert(getMessage('estimate.detail.save.requiredCharger')) } - if (estimateData.objectName.trim().length === 0) { + if (estimateData?.objectName === null || estimateData?.objectName?.trim().length === 0) { flag = false return alert(getMessage('estimate.detail.save.requiredObjectName')) }