diff --git a/src/components/basis/flight/plan/FlightPlanAreaForm.js b/src/components/basis/flight/plan/FlightPlanAreaForm.js
index 0d9fdc43..50ef0011 100644
--- a/src/components/basis/flight/plan/FlightPlanAreaForm.js
+++ b/src/components/basis/flight/plan/FlightPlanAreaForm.js
@@ -32,63 +32,7 @@ const FlightPlanAreaForm = (props) => {
- -
-
-
-
-
-
-
- {/* {props.errors && props.errors.address && (
-
- {props.errors.address.message}
-
- )} */}
-
-
-
-
-
-
-
-
-
-
- {/* {props.errors && props.errors.coodinates && (
-
- {props.errors.coodinates.message}
-
- )} */}
-
-
-
-
+ -
diff --git a/src/components/basis/flight/plan/FlightPlanForm.js b/src/components/basis/flight/plan/FlightPlanForm.js
index 8a758b86..2df3b01c 100644
--- a/src/components/basis/flight/plan/FlightPlanForm.js
+++ b/src/components/basis/flight/plan/FlightPlanForm.js
@@ -44,7 +44,7 @@ const FlightPlanForm = (props) => {
-
+
{
-
+
{
placeholder=''
/>
-
+
+
+
+
+
-
+
{
/>
-
-
+
{
placeholder=''
/>
-
-
-
+
+
+
+
- */}
-
@@ -273,7 +277,8 @@ const FlightPlanForm = (props) => {
id='ownerNm'
name='ownerNm'
size='sm'
- placeholder=''
+ placeholder=''
+ readOnly
/>
@@ -287,7 +292,8 @@ const FlightPlanForm = (props) => {
id='ownerNm'
name='ownerNm'
size='sm'
- placeholder=''
+ placeholder=''
+ readOnly
/>
@@ -305,7 +311,8 @@ const FlightPlanForm = (props) => {
id='ownerNm'
name='ownerNm'
size='sm'
- placeholder=''
+ placeholder=''
+ readOnly
/>
@@ -320,7 +327,8 @@ const FlightPlanForm = (props) => {
id='ownerNm'
name='ownerNm'
size='sm'
- placeholder='m'
+ placeholder='m'
+ readOnly
/>
@@ -329,7 +337,8 @@ const FlightPlanForm = (props) => {
id='ownerNm'
name='ownerNm'
size='sm'
- placeholder='ft'
+ placeholder='ft'
+ readOnly
/>
diff --git a/src/containers/basis/flight/plan/FlightPlanAreaContainer.js b/src/containers/basis/flight/plan/FlightPlanAreaContainer.js
index b8f822fd..39dc57ec 100644
--- a/src/containers/basis/flight/plan/FlightPlanAreaContainer.js
+++ b/src/containers/basis/flight/plan/FlightPlanAreaContainer.js
@@ -16,18 +16,12 @@ const FlightPlanAreaContainer = (props) => {
const { areaList } = useSelector(state => state.flightState);
const [airArea, setAirArea] = useState(null);
- const validSchema = yup.object().shape({
- // address: yup.string().trim().required('주소가 올바르지 않습니다.'),
- // coodinates: yup.string().trim().required('좌표가 올바르지 않습니다.'),
- // radius: yup.string().trim().required('반경을 입력해 주세요.'),
- // altitude_m: yup.string().trim().required('고도(m)를 입력해 주세요.'),
- // altitude_ft: yup.string().trim().required('고도(ft)를 입력해 주세요.'),
+ const validSchema = yup.object().shape({
});
const { register, getValues, setValue, errors, handleSubmit } = useForm({
- defaultValues: {
- address: '',
- coodinates: '',
+ defaultValues: {
+ coodinates: [],
radius: '',
altitude_m: '',
altitude_ft: '',
diff --git a/src/containers/basis/flight/plan/FlightPlanDetailContainer.js b/src/containers/basis/flight/plan/FlightPlanDetailContainer.js
index 87078e31..3df9a61e 100644
--- a/src/containers/basis/flight/plan/FlightPlanDetailContainer.js
+++ b/src/containers/basis/flight/plan/FlightPlanDetailContainer.js
@@ -5,18 +5,34 @@ import { FlightPlanAreaModal } from '../../../../components/basis/flight/plan/Fl
import FlightPlanAreaContainer from './FlightPlanAreaContainer';
import {useHistory} from 'react-router-dom';
import { useDispatch, useSelector } from 'react-redux';
-
+import * as yup from 'yup';
+import { yupResolver } from '@hookform/resolvers/yup';
+import * as Actions from '../../../../modules/basis/flight/actions/basisFlightAction';
+import { useForm } from 'react-hook-form';
const FlightPlanDetailContainer = () => {
const dispatch = useDispatch();
const history = useHistory();
const { flightPlanArea } = useSelector(state => state.flightState);
-
+ const [areaInfo, setAreaInfo] = useState();
const [modal, setModal] = useState({
isOpen: false,
title: '',
});
+
+ /* Form Validation Checking */
+ const validSchema = yup.object().shape({
+ });
+ const {} = useForm({
+ defaultValues: {
+ coodinates: [],
+ radius: '',
+ altitude_m: '',
+ altitude_ft: '',
+ },
+ resolver: yupResolver(validSchema)
+ })
const saveFlightPlanArea = () => {
console.log('비행 구역 설정 저장');
@@ -30,13 +46,14 @@ const FlightPlanDetailContainer = () => {
}
useEffect(() => {
-
+ setAreaInfo(flightPlanArea);
}, [flightPlanArea]);
return (