|
|
@ -1,4 +1,4 @@ |
|
|
|
import React, { useEffect, useState } from 'react'; |
|
|
|
import React, { useEffect, useState, useRef } from 'react'; |
|
|
|
import { useHistory, useLocation } from 'react-router-dom'; |
|
|
|
import { useHistory, useLocation } from 'react-router-dom'; |
|
|
|
import { Search } from 'react-feather'; |
|
|
|
import { Search } from 'react-feather'; |
|
|
|
import { BiBuildings, BiGridAlt } from 'react-icons/bi'; |
|
|
|
import { BiBuildings, BiGridAlt } from 'react-icons/bi'; |
|
|
@ -47,7 +47,8 @@ export default function LaancStep1({ |
|
|
|
const { user } = useSelector(state => state.authState); |
|
|
|
const { user } = useSelector(state => state.authState); |
|
|
|
|
|
|
|
|
|
|
|
const history = useHistory(); |
|
|
|
const history = useHistory(); |
|
|
|
|
|
|
|
const fltElevRef = useRef(null); |
|
|
|
|
|
|
|
const bufferZoneRef = useRef(null); |
|
|
|
const location = useLocation(); |
|
|
|
const location = useLocation(); |
|
|
|
const queryParams = new URLSearchParams(location.search); |
|
|
|
const queryParams = new URLSearchParams(location.search); |
|
|
|
const mapParam = queryParams.get('map'); |
|
|
|
const mapParam = queryParams.get('map'); |
|
|
@ -57,7 +58,24 @@ export default function LaancStep1({ |
|
|
|
if (!currentParm) setCenteredModal(mapParam); |
|
|
|
if (!currentParm) setCenteredModal(mapParam); |
|
|
|
}, [location]); |
|
|
|
}, [location]); |
|
|
|
|
|
|
|
|
|
|
|
// console.log('>', data);
|
|
|
|
// const handleInputClick = () => {
|
|
|
|
|
|
|
|
// // Input 요소가 포커스될 때 커서를 맨 뒤로 이동
|
|
|
|
|
|
|
|
// if (fltElevRef.current) {
|
|
|
|
|
|
|
|
// const input = fltElevRef.current;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// const inputValue = input.value;
|
|
|
|
|
|
|
|
// input.setSelectionRange(inputValue.length - 1, inputValue.length - 1);
|
|
|
|
|
|
|
|
// input.focus();
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// if (bufferZoneRef.current) {
|
|
|
|
|
|
|
|
// const input = bufferZoneRef.current;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// const inputValue = input.value;
|
|
|
|
|
|
|
|
// input.setSelectionRange(inputValue.length - 1, inputValue.length - 1);
|
|
|
|
|
|
|
|
// input.focus();
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// };
|
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<> |
|
|
|
<> |
|
|
|
<ModalHeader> |
|
|
|
<ModalHeader> |
|
|
@ -234,7 +252,7 @@ export default function LaancStep1({ |
|
|
|
id='fltElev' |
|
|
|
id='fltElev' |
|
|
|
name='fltElev' |
|
|
|
name='fltElev' |
|
|
|
// defaultValue={data.email || ''}
|
|
|
|
// defaultValue={data.email || ''}
|
|
|
|
value={data.areaList[0].fltElev} |
|
|
|
value={data.areaList[0].fltElev + 'm'} |
|
|
|
size='sm' |
|
|
|
size='sm' |
|
|
|
onChange={e => { |
|
|
|
onChange={e => { |
|
|
|
const { name, value } = e.target; |
|
|
|
const { name, value } = e.target; |
|
|
@ -244,6 +262,8 @@ export default function LaancStep1({ |
|
|
|
value |
|
|
|
value |
|
|
|
}); |
|
|
|
}); |
|
|
|
}} |
|
|
|
}} |
|
|
|
|
|
|
|
// innerRef={fltElevRef} // Input 요소에 ref를 연결
|
|
|
|
|
|
|
|
// onClick={handleInputClick}
|
|
|
|
// innerRef={data}
|
|
|
|
// innerRef={data}
|
|
|
|
placeholder='100m' |
|
|
|
placeholder='100m' |
|
|
|
/> |
|
|
|
/> |
|
|
@ -259,7 +279,7 @@ export default function LaancStep1({ |
|
|
|
id='bufferZone' |
|
|
|
id='bufferZone' |
|
|
|
name='bufferZone' |
|
|
|
name='bufferZone' |
|
|
|
// defaultValue={data.email || ''}
|
|
|
|
// defaultValue={data.email || ''}
|
|
|
|
value={data.areaList[0].bufferZone} |
|
|
|
value={data.areaList[0].bufferZone + 'm'} |
|
|
|
size='sm' |
|
|
|
size='sm' |
|
|
|
onChange={e => { |
|
|
|
onChange={e => { |
|
|
|
const { name, value } = e.target; |
|
|
|
const { name, value } = e.target; |
|
|
@ -269,6 +289,8 @@ export default function LaancStep1({ |
|
|
|
value |
|
|
|
value |
|
|
|
}); |
|
|
|
}); |
|
|
|
}} |
|
|
|
}} |
|
|
|
|
|
|
|
// innerRef={bufferZoneRef} // Input 요소에 ref를 연결
|
|
|
|
|
|
|
|
// onClick={handleInputClick}
|
|
|
|
// innerRef={data}
|
|
|
|
// innerRef={data}
|
|
|
|
placeholder='100m' |
|
|
|
placeholder='100m' |
|
|
|
/> |
|
|
|
/> |
|
|
@ -458,7 +480,8 @@ export default function LaancStep1({ |
|
|
|
<ul className='list-txt'> |
|
|
|
<ul className='list-txt'> |
|
|
|
<li>비행승인 신청은 최대 1년전까지 가능합니다.</li> |
|
|
|
<li>비행승인 신청은 최대 1년전까지 가능합니다.</li> |
|
|
|
<li> |
|
|
|
<li> |
|
|
|
상업용 또는 비 상업용이며, 기체최대이륙중량이 2KG 초과 시 기체등록은 필수사항 입니다. |
|
|
|
상업용 또는 비 상업용이며, 기체최대이륙중량이 2KG 초과 시 |
|
|
|
|
|
|
|
기체등록은 필수사항 입니다. |
|
|
|
</li> |
|
|
|
</li> |
|
|
|
<li> |
|
|
|
<li> |
|
|
|
관제권 및 비행금지 공역을 제외한 지역에서는 주간에 150m미만의 |
|
|
|
관제권 및 비행금지 공역을 제외한 지역에서는 주간에 150m미만의 |
|
|
|