From b269e54add3ff1ed7c4bde21b0255d8cd181065e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?sanguu516=28=EB=B0=95=EC=83=81=ED=98=84=29?= Date: Mon, 25 Sep 2023 15:08:58 +0900 Subject: [PATCH] =?UTF-8?q?laanc=20=EC=8B=A0=EC=B2=AD=EC=84=9C=20=EC=9E=91?= =?UTF-8?q?=EC=97=85=EC=A4=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../basis/flight/laanc/LaancPlanContainer.js | 55 +- src/navigation/flightPlan/index.js | 2 +- src/views/laanc/Apply.js | 476 +++++++----------- src/views/laanc/FlightPlan.js | 46 +- 4 files changed, 225 insertions(+), 354 deletions(-) diff --git a/src/containers/basis/flight/laanc/LaancPlanContainer.js b/src/containers/basis/flight/laanc/LaancPlanContainer.js index e542306..ad7a914 100644 --- a/src/containers/basis/flight/laanc/LaancPlanContainer.js +++ b/src/containers/basis/flight/laanc/LaancPlanContainer.js @@ -25,6 +25,8 @@ import { const LaancPlanContainer = () => { const [step, setStep] = useState(1); const [detailData, setDetailData] = useState(initFlightBas.initDetail); + const [centeredModal, setCenteredModal] = useState(false); + const [formModal, setFormModal] = useState(false); const [disabledAnimation, setDisabledAnimation] = useState(true); const [modal2, setModal2] = useState({ @@ -32,7 +34,6 @@ const LaancPlanContainer = () => { title: '', desc: '' }); - const [centeredModal, setCenteredModal] = useState(false); //날씨 임시 데이터 const [wheather, setWheather] = useState([ { @@ -123,32 +124,7 @@ const LaancPlanContainer = () => { const currentDate = moment(); // 현재 날짜와 시간을 가져옵니다. - if (!detailData.pilotList[0].memberName) { - setModal2({ - isOpen: true, - title: '필수값 입력 오류', - desc: '이름을 입력해 주세요.' - }); - return false; - } else if (!check_num.test(detailData.pilotList[0].hpno)) { - setModal2({ - isOpen: true, - title: '필수값 입력 오류', - desc: '연락처를 확인해 주세요.' - }); - return false; - } else if (!reg_email.test(detailData.pilotList[0].email)) { - setModal2({ - isOpen: true, - title: '필수값 입력 오류', - desc: '이메일을 확인해 주세요.' - }); - - return false; - } else if ( - !schFltStDt.isAfter(currentDate) || - !schFltEndDt.isAfter(currentDate) - ) { + if (!schFltStDt.isAfter(currentDate) || !schFltEndDt.isAfter(currentDate)) { setModal2({ isOpen: true, title: '필수값 입력 오류', @@ -193,14 +169,6 @@ const LaancPlanContainer = () => { desc: '비행방식를 입력해 주세요.' }); - return false; - } else if (!detailData.arcrftList[0].groupNm) { - setModal2({ - isOpen: true, - title: '필수값 입력 오류', - desc: '기체 신고 번호를 입력해 주세요.' - }); - return false; } else if (!detailData.arcrftList[0].arcrftTypeCd) { setModal2({ @@ -210,11 +178,11 @@ const LaancPlanContainer = () => { }); return false; - } else if (!detailData.arcrftList[0].ownerNm) { + } else if (!detailData.arcrftList[0].groupNm) { setModal2({ isOpen: true, title: '필수값 입력 오류', - desc: '소유자명(법인명)를 입력해 주세요.' + desc: '기체 신고 번호를 입력해 주세요.' }); return false; @@ -245,11 +213,22 @@ const LaancPlanContainer = () => { handlerWeather={handlerWeather} setDisabledAnimation={setDisabledAnimation} disabledAnimation={disabledAnimation} + centeredModal={centeredModal} + setCenteredModal={setCenteredModal} /> )} - {step === 2 && } + {step === 2 && ( + + )} diff --git a/src/navigation/flightPlan/index.js b/src/navigation/flightPlan/index.js index 8519409..f27bbc7 100644 --- a/src/navigation/flightPlan/index.js +++ b/src/navigation/flightPlan/index.js @@ -16,7 +16,7 @@ export default [ navLink: '/basis/flight/plan/index' }, { - id: 'flight_plan_001_01_01', + id: 'laanc_001_01_01', type: 'item', title: 'LAANC 신청 목록', navLink: '/basis/laanc/index' diff --git a/src/views/laanc/Apply.js b/src/views/laanc/Apply.js index 43fc05d..671791e 100644 --- a/src/views/laanc/Apply.js +++ b/src/views/laanc/Apply.js @@ -7,19 +7,20 @@ import { useDispatch, useSelector } from 'react-redux'; import Flatpickr from 'react-flatpickr'; import '@styles/react/libs/flatpickr/flatpickr.scss'; import moment from 'moment'; +import { AlertCircle } from 'react-feather'; +import FlightArea from './FlightArea'; import { - Button, - InputGroup, - ButtonGroup, - InputGroupAddon, - Input, Row, Col, + Button, + Modal, + ModalHeader, + ModalBody, + ModalFooter, + Alert, FormGroup, Label, - Card, - CardBody, - CustomInput + Input } from 'reactstrap'; import { initFlight, @@ -33,8 +34,16 @@ import { sensorClickAction } from '../../modules/control/map/actions/controlMapActions'; -const Apply = ({ data, handlerStep }) => { +const Apply = ({ + data, + handlerStep, + disabledAnimation, + setDisabledAnimation, + centeredModal, + setCenteredModal +}) => { const [detailData, setDetailData] = useState(initFlightBas.initDetail); + const { user } = useSelector(state => state.authState); const history = useHistory(); // 변경감지 @@ -52,294 +61,181 @@ const Apply = ({ data, handlerStep }) => { }; return ( -
-
-
-

LAANC 승인 요청

- {/* */} - handlerLaanc()} - > - 취소 - + <> + + LAANC 승인 요청 + + + +
+
비행승인 사전결과 확인
+
지도영역
+
+ +
+ {' '} + 사전 결과 미 승인 대상입니다. +
+
+
+
+ +
-
- - +
- -
-
-
-
-
-
-
-

유효성 검사 정보

-
- + +
조종사 정보
+ + +
+ + + +
승인 유형
+ + + + + +
+ + +
비행 계획 정보
+ + + + + { + const value = + moment(date[0]).format('YYYY-MM-DD HH:mm:ss') || ''; + handleChange({ + name: 'schFltStDt', + value + }); + }} + placeholder='비행 시작일자 선택(클릭)' + disabled /> - + + + + + { + const value = + moment(date[0]).format('YYYY-MM-DD HH:mm:ss') || ''; + handleChange({ + name: 'schFltEndDt', + value + }); + }} + placeholder='비행 종료일자 선택(클릭)' + disabled + // {...{options:{minDate: "today"}}} /> -
+ + + + -
-

LAANC 승인 사전 결과 확인

-
- -
- - - - - { - const value = - moment(date[0]).format('YYYY-MM-DD HH:mm:ss') || - ''; - handleChange({ - name: 'schFltStDt', - value - }); - }} - placeholder='비행 시작일자 선택(클릭)' - disabled - /> - - - - - - { - const value = - moment(date[0]).format('YYYY-MM-DD HH:mm:ss') || - ''; - handleChange({ - name: 'schFltEndDt', - value - }); - }} - disabled - placeholder='비행 종료일자 선택(클릭)' - // {...{options:{minDate: "today"}}} - /> - - - - - - { - const { name, value } = e.target; - handleChange({ - type: 'plan', - name, - value - }); - }} - disabled - // innerRef={props.data} - // className={classnames({ - // 'is-invalid': props.errors.arcrftTypeCd - // })} - > - {/* TODO CDNOT 코드연동 필요 */} - - - - - - - - - - - -
-
- - - - - { - const { name, value } = e.target; - handleChange({ - type: 'area', - name, - value - }); - }} - // innerRef={data} - placeholder='100m' - disabled - /> - - - - - - { - const { name, value } = e.target; - handleChange({ - type: 'area', - name, - value - }); - }} - // innerRef={data} - placeholder='100m' - disabled - /> - - - - - - { - const { name, value } = e.target; - handleChange({ - type: 'area', - name, - value - }); - }} - // innerRef={data} - placeholder='' - disabled - /> - - - -
-
-

조종사 준수사항 처벌 동의 약관

-
- -
- handleClick(1)} - > - 이전 - - handleClick(3)} - > - 다음 - -
-
-
+ +
기체 정보
+ + + + + + + + + + + +
미 승인 사유
+
내용
- - -
+
+ + + +
    +
  • + +
  • +
  • + +
  • +
  • + +
  • +
+ +
+ ); }; export default Apply; diff --git a/src/views/laanc/FlightPlan.js b/src/views/laanc/FlightPlan.js index a1aa6cc..3aa379e 100644 --- a/src/views/laanc/FlightPlan.js +++ b/src/views/laanc/FlightPlan.js @@ -40,16 +40,18 @@ const FlightPlan = ({ data, handlerWeather, disabledAnimation, - setDisabledAnimation + setDisabledAnimation, + centeredModal, + setCenteredModal }) => { - const user = useSelector(state => state.authState); - const [centeredModal, setCenteredModal] = useState(false); + const { user } = useSelector(state => state.authState); const history = useHistory(); const handlerLaanc = () => { history.replace('/control'); }; + console.log('>>', user); return ( <> @@ -77,15 +79,7 @@ const FlightPlan = ({ name='memberName' size='sm' placeholder='' - value={data.pilotList[0].memberName || ''} - onChange={e => { - const { name, value } = e.target; - handleChange({ - type: 'pilot', - name, - value - }); - }} + value={user.memberName} disabled /> @@ -97,17 +91,16 @@ const FlightPlan = ({ *종류 - - - - + + +
비행 계획 정보
- + - + - + { const { name, value } = e.target; handleChange({ @@ -338,9 +330,13 @@ const FlightPlan = ({ value }); }} - // innerRef={data} - placeholder='100m' - /> + > + + + + + +