From 944a4c52e7d864856d6b15444c7e7b6720af8c42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B0=95=EC=83=81=ED=98=84?= Date: Mon, 23 Oct 2023 15:49:02 +0900 Subject: [PATCH] =?UTF-8?q?laanc=20=EC=8A=B9=EC=9D=B8=20=EB=AA=A9=EB=A1=9D?= =?UTF-8?q?=20=EC=83=81=EC=84=B8=EB=B3=B4=EA=B8=B0=20=EC=97=B0=EA=B2=B0(?= =?UTF-8?q?=EC=8A=B9=EC=9D=B8=20=EC=9C=A0=ED=98=95=20=EC=B6=94=EA=B0=80=20?= =?UTF-8?q?=EC=9E=91=EC=97=85=20=ED=95=84=EC=9A=94)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/laanc/LaancGrid.js | 33 +++++++++++++- src/components/laanc/LaancStep2.js | 71 +++++++++++++++++------------- 2 files changed, 72 insertions(+), 32 deletions(-) diff --git a/src/components/laanc/LaancGrid.js b/src/components/laanc/LaancGrid.js index 42420c5..13ec689 100644 --- a/src/components/laanc/LaancGrid.js +++ b/src/components/laanc/LaancGrid.js @@ -1,8 +1,10 @@ +import { useEffect, useState } from 'react'; import { useSelector, useDispatch } from 'react-redux'; import { useHistory } from 'react-router-dom'; import { GridDatabase } from '@src/components/crud/grid/GridDatatable'; -import { Row, Col, Card, Button, Spinner } from 'reactstrap'; +import { Row, Col, Card, Button, Spinner, Modal } from 'reactstrap'; import * as LaancAction from '../../modules/laanc/actions/laancActions'; +import LaancStep2 from './LaancStep2'; import moment from 'moment'; const data = [ @@ -36,23 +38,33 @@ function LaancGrid() { const dispatch = useDispatch(); const history = useHistory(); + const [disabledAnimation, setDisabledAnimation] = useState(false); + const { scheduleList } = useSelector(state => state.flightState); const { laancSearchData } = useSelector(state => state.laancState); const { loading } = useSelector(state => state.loadingReducer); - + const { laancDetail } = useSelector(state => state.laancState); const fillZero = (width, str) => { return str.length >= width ? str : new Array(width - str.length + 1).join('0') + str; //남는 길이만큼 0으로 채움 }; + useEffect(() => { + if (laancDetail) setDisabledAnimation(true); + }, [laancDetail]); + //상세보기 const handleDetail = planSno => { dispatch(LaancAction.LAANC_DETAIL.request(planSno)); + // history.push('/basis/flight/plan/create'); // to={`/basis/flight/plan/detail/${row.planSno}?type=plan`} }; + const handlerLaancClose = () => { + setDisabledAnimation(false); + }; const columns = [ { name: '비행계획서 일련 번호', @@ -213,6 +225,23 @@ function LaancGrid() { +
+ setDisabledAnimation(!disabledAnimation)} + className='modal-dialog-centered laanc-modal' + fade={false} + backdrop={false} + > + + +
); } diff --git a/src/components/laanc/LaancStep2.js b/src/components/laanc/LaancStep2.js index f34dc67..4d87e60 100644 --- a/src/components/laanc/LaancStep2.js +++ b/src/components/laanc/LaancStep2.js @@ -26,7 +26,8 @@ export default function LaancStep2({ setDisabledAnimation, centeredModal, setCenteredModal, - handlerLaancClose + handlerLaancClose, + type }) { const obj = { commercial: { @@ -147,7 +148,7 @@ export default function LaancStep2({ 취소 - +
유효성 검사 정보
@@ -225,7 +226,8 @@ export default function LaancStep2({ 검토 결과 승인 대상입니다. 제출하신 비행계획은 자동승인 대상 입니다. -

+
+
자동승인을 위해 다음 스텝으로 진행하시기 바랍니다.
@@ -240,8 +242,10 @@ export default function LaancStep2({ 유효성 검사에 실패하였습니다. -

- 아래 이전 버튼을 눌러 스텝1에서 기체번호를 확인해주시기 바랍니다. +
+
+ 아래 이전 버튼을 눌러 스텝1에서 기체번호를 + 확인해주시기 바랍니다.
) : ( @@ -351,7 +355,11 @@ export default function LaancStep2({ id='arcrftWghtCd' name='arcrftWghtCd' size='sm' - value={obj.arcrftWdth[data.arcrftList[0].arcrftWghtCd]} + value={ + type === 'detail' + ? data.arcrftWght + : obj.arcrftWdth[data.arcrftList[0].arcrftWghtCd] + } placeholder='' disabled /> @@ -423,7 +431,8 @@ export default function LaancStep2({ className='terms-check' id='exampleCustomCheckbox' label='조종자 준수사항 미 준수 시 처벌에 동의합니다.' - checked={isterms} + checked={type === 'detail' ? true : isterms} + disabled={type === 'detail' ? true : false} onChange={() => setIsterms(!isterms)} /> ) : null} @@ -433,29 +442,31 @@ export default function LaancStep2({
- - -
    -
  • - -
  • -
  • - -
  • -
  • - -
  • -
- -
+ {type === 'detail' ? null : ( + + +
    +
  • + +
  • +
  • + +
  • +
  • + +
  • +
+ +
+ )} ); }