From d704986d0881b50f73e4db604950cae11c37b797 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?junh=5Feee=28=EC=9D=B4=EC=A4=80=ED=9D=AC=29?= Date: Wed, 24 Aug 2022 16:38:26 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B9=84=ED=96=89=EA=B3=84=ED=9A=8D=EC=84=9C?= =?UTF-8?q?=20-=20readOnly=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../basis/flight/plan/FlightPlanForm.js | 46 ++++++------------- .../flight/plan/FlightPlanDetailContainer.js | 4 +- 2 files changed, 15 insertions(+), 35 deletions(-) diff --git a/src/components/basis/flight/plan/FlightPlanForm.js b/src/components/basis/flight/plan/FlightPlanForm.js index 96b8e2a..cb3f644 100644 --- a/src/components/basis/flight/plan/FlightPlanForm.js +++ b/src/components/basis/flight/plan/FlightPlanForm.js @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { useEffect } from 'react'; import { Card, CardBody, @@ -18,12 +18,12 @@ import { FlightPlanModal } from './FlightPlanModal'; import FlightPlanArcrftContainer from '../../../../containers/basis/flight/plan/FlightPlanArcrftContainer'; import FlightPlanAreaContainer from '../../../../containers/basis/flight/plan/FlightPlanAreaContainer'; import { X } from 'react-feather'; -import { useDispatch } from 'react-redux'; +import { useDispatch, useSelector } from 'react-redux'; const FlightPlanForm = ({data, handleModal, handleChange, handleSave, handleDelete, modal, handleDeleteArray }) => { - const {areaList, pilotList, arcrftList} = data; - + const {areaList, pilotList, arcrftList} = data; + return ( @@ -520,31 +520,6 @@ const AreaForm = ({data, handleChange, index}) => { const PilotForm = ({data, handleChange, index, handleDeleteArray}) => { return (
- - - - { - const {name, value} = e.target; - handleChange({ - type: 'pilot', - name, - value, - index - }) - }} - /> - - @@ -615,6 +591,7 @@ const PilotForm = ({data, handleChange, index, handleDeleteArray}) => { index }) }} + readOnly />
@@ -642,6 +619,7 @@ const PilotForm = ({data, handleChange, index, handleDeleteArray}) => { index }) }} + readOnly /> @@ -678,14 +656,14 @@ const ArcrftForm = ({data, handleChange, index, handleDeleteArray}) => { { @@ -697,6 +675,7 @@ const ArcrftForm = ({data, handleChange, index, handleDeleteArray}) => { index }) }} + readOnly /> @@ -723,6 +702,7 @@ const ArcrftForm = ({data, handleChange, index, handleDeleteArray}) => { index }) }} + readOnly /> @@ -749,6 +729,7 @@ const ArcrftForm = ({data, handleChange, index, handleDeleteArray}) => { index }) }} + readOnly /> @@ -775,6 +756,7 @@ const ArcrftForm = ({data, handleChange, index, handleDeleteArray}) => { index }) }} + readOnly /> diff --git a/src/containers/basis/flight/plan/FlightPlanDetailContainer.js b/src/containers/basis/flight/plan/FlightPlanDetailContainer.js index 5bb4102..9b0baa9 100644 --- a/src/containers/basis/flight/plan/FlightPlanDetailContainer.js +++ b/src/containers/basis/flight/plan/FlightPlanDetailContainer.js @@ -378,11 +378,9 @@ const FlightPlanDetailContainer = () => { break; } } - useEffect(()=>{ - console.log(detailData); - },[detailData]) // 저장 const handleSave = () => { + console.log('detail>>>', detailData) if (!detailData.memberName) { setModal2({