From bf00ba46fc6f31429391ba2af232fdabde247f02 Mon Sep 17 00:00:00 2001 From: basssy Date: Mon, 9 Dec 2024 16:12:45 +0900 Subject: [PATCH 1/4] =?UTF-8?q?=EC=88=AB=EC=9E=90=EC=9E=85=EB=A0=A5?= =?UTF-8?q?=ED=95=84=EB=93=9C=20=ED=95=9C=EA=B8=80=EC=9E=85=EB=A0=A5?= =?UTF-8?q?=ED=95=98=EA=B3=A0=20=ED=8F=AC=EC=BB=A4=EC=8A=A4=20=EC=95=84?= =?UTF-8?q?=EC=9B=83=EC=8B=9C=20=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/management/popup/PlanRequestPop.jsx | 6 ++++++ 1 file changed, 6 insertions(+) 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) }} From c464f1ec3efd9060f14dd15dd0799583c5568d9f Mon Sep 17 00:00:00 2001 From: basssy Date: Mon, 9 Dec 2024 16:25:51 +0900 Subject: [PATCH 2/4] =?UTF-8?q?=EA=B2=AC=EC=A0=81=EC=84=9C=20=EC=A0=80?= =?UTF-8?q?=EC=9E=A5=20=ED=95=84=EC=88=98=EA=B0=92=20=20null=EC=B2=B4?= =?UTF-8?q?=ED=81=AC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/estimate/Estimate.jsx | 2 +- src/hooks/floorPlan/estimate/useEstimateController.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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/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')) } From 7dfab6c896e095ef6e052b884fa52253469aa616 Mon Sep 17 00:00:00 2001 From: basssy Date: Mon, 9 Dec 2024 18:20:48 +0900 Subject: [PATCH 3/4] =?UTF-8?q?=EB=A1=9C=EA=B7=B8=EC=9D=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/main/ChangePasswordPop.jsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/main/ChangePasswordPop.jsx b/src/components/main/ChangePasswordPop.jsx index 188a3fe7..20089921 100644 --- a/src/components/main/ChangePasswordPop.jsx +++ b/src/components/main/ChangePasswordPop.jsx @@ -73,15 +73,15 @@ export default function ChangePasswordPop(props) { } await patch({ url: '/api/login/v1.0/user/change-password', data: param }).then((res) => { - if (res.result.code === 200) { - if (res.result.resultCode === 'S') { + 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('/') + router.push('/login') } else { - alert(res.result.resultMsg) + alert(res?.result?.resultMsg) } } else { console.log('error') From 40d481af601daa5cab506b1f7dce7748e3f4d1db Mon Sep 17 00:00:00 2001 From: basssy Date: Tue, 10 Dec 2024 08:33:17 +0900 Subject: [PATCH 4/4] =?UTF-8?q?=EB=B9=84=EB=B0=80=EB=B2=88=ED=98=B8=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD=20=ED=8C=9D=EC=97=85=20=ED=9B=84=20=EC=B2=98?= =?UTF-8?q?=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/main/ChangePasswordPop.jsx | 30 +++++++++++++---------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/src/components/main/ChangePasswordPop.jsx b/src/components/main/ChangePasswordPop.jsx index 20089921..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('/login') + 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 (