From 5b6fc55561f0e6378642f42a3b1cdae4d46acaf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?sanguu516=28=EB=B0=95=EC=83=81=ED=98=84=29?= Date: Wed, 18 Oct 2023 15:52:43 +0900 Subject: [PATCH] =?UTF-8?q?Laanc=20=EB=AC=B8=EA=B5=AC=20=EC=88=98=EC=A0=95?= =?UTF-8?q?=20=EB=B0=8F=20=EA=B3=A0=EB=8F=84=EA=B0=92=20focus=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/laanc/LaancStep1.js | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/src/views/laanc/LaancStep1.js b/src/views/laanc/LaancStep1.js index 64cea14a..dd2eeb95 100644 --- a/src/views/laanc/LaancStep1.js +++ b/src/views/laanc/LaancStep1.js @@ -107,12 +107,24 @@ export default function LaancStep1({ const handleInputClick = type => { // Input 요소가 포커스될 때 커서를 맨 뒤로 이동 - if (fltElevRef.current && type === 'fltElev') { + if ( + fltElevRef.current && + type === 'fltElev' && + data.areaList[0].coordList[0].lat != 0 + ) { const input = fltElevRef.current; const inputValue = input.value; input.setSelectionRange(inputValue.length - 1, inputValue.length - 1); input.focus(); + } else if (data.areaList[0].coordList[0].lat === 0) { + fltElevRef.current.blur(); + setIsErrorModal({ + isOpen: true, + title: '비행 구역 설정', + desc: '비행 구역 설정을 먼저 설정 해 주세요' + }); + return false; } if (bufferZoneRef.current && type === 'bufferZone') { const input = bufferZoneRef.current; @@ -156,7 +168,10 @@ export default function LaancStep1({ const handleBlur = (value, type) => { switch (type) { case 'fltElev': - if (parseInt(value.replace('/^0+/', 'm', ''), 10) <= 150) { + if ( + parseInt(value.replace('/^0+/', 'm', ''), 10) <= 150 && + data.areaList[0].coordList[0].lat != 0 + ) { setIsErrorModal({ isOpen: true, title: '고도 알림', @@ -168,24 +183,24 @@ export default function LaancStep1({ ) }); - } else { + } else if (data.areaList[0].coordList[0].lat != 0) { handleChange({ type: 'area', name: 'fltElev', value: 0 }); - setIsErrorModal({ + setIsLaancModal({ isOpen: true, title: '고도 재설정 알림', desc: ( <> 설정하신 고도가 150m를 초과하였습니다.
- 150m를 초과 시 아래로 문의하시기 바랍니다. -
- 항공안전기술원 1234-1234 + 아래 링크를 통해 담당자와 협의 부탁드립니다. - ) + ), + type: '처리부서안내 바로가기', + url: 'https://drone.onestop.go.kr/introduce/systemintro3 ' }); } case 'fltMethod':