From aaca772b46e272a39ead38372357c426ef494ca2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?scnoh=28=EB=85=B8=EC=8A=B9=EC=B2=A0=29?= Date: Mon, 1 Aug 2022 17:13:18 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B9=84=ED=96=89=EA=B3=84=ED=9A=8D=EC=84=9C?= =?UTF-8?q?=20groupId=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/basis/flight/plan/FlightPlanArcrft.js | 2 +- src/components/basis/flight/plan/FlightPlanForm.js | 9 +++++---- .../basis/flight/plan/FlightPlanArcrftContainer.js | 8 +++++--- .../basis/flight/plan/FlightPlanPilotContainer.js | 11 ++++++----- 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/src/components/basis/flight/plan/FlightPlanArcrft.js b/src/components/basis/flight/plan/FlightPlanArcrft.js index 36fa21a..f7e4c51 100644 --- a/src/components/basis/flight/plan/FlightPlanArcrft.js +++ b/src/components/basis/flight/plan/FlightPlanArcrft.js @@ -94,7 +94,7 @@ const FlightPlanArcrft = ({ arcrftList, handleSelectArcrft }) => { diff --git a/src/components/basis/flight/plan/FlightPlanForm.js b/src/components/basis/flight/plan/FlightPlanForm.js index 1ef265e..a2e53d3 100644 --- a/src/components/basis/flight/plan/FlightPlanForm.js +++ b/src/components/basis/flight/plan/FlightPlanForm.js @@ -21,7 +21,7 @@ import { X } from 'react-feather'; const FlightPlanForm = ({data, handleModal, handleChange, handleSave, handleDelete, modal, handleDeleteArray }) => { - const {areaList, pilotList, arcrftList} = data; + const {groupId ,areaList, pilotList, arcrftList} = data; return ( @@ -336,6 +336,7 @@ const FlightPlanForm = ({data, handleModal, handleChange, handleSave, handleDele ) @@ -343,7 +344,7 @@ const FlightPlanForm = ({data, handleModal, handleChange, handleSave, handleDele export default FlightPlanForm; -const SelectModal = ({handleModal, modal}) => { +const SelectModal = ({handleModal, modal, groupId}) => { let title = ''; let description = ''; let type = ''; @@ -353,14 +354,14 @@ const SelectModal = ({handleModal, modal}) => { isOpen = modal.pilot; title = '조종사 조회'; type = 'pilot'; - description = + description = } if(modal.arcrft) { isOpen = modal.arcrft; title = '기체 조회'; type = 'arcrft'; - description = ; + description = ; } if(modal.area) { diff --git a/src/containers/basis/flight/plan/FlightPlanArcrftContainer.js b/src/containers/basis/flight/plan/FlightPlanArcrftContainer.js index b1f555f..57ff3fc 100644 --- a/src/containers/basis/flight/plan/FlightPlanArcrftContainer.js +++ b/src/containers/basis/flight/plan/FlightPlanArcrftContainer.js @@ -4,15 +4,17 @@ import FlightPlanArcrft from '../../../../components/basis/flight/plan/FlightPla import * as Actions from '../../../../modules/basis/flight/actions/basisFlightAction'; // import FlightPlanPilot from '../../../../components/basis/flight/plan/FlightPlanPilot'; -const FlightPlanArcrftContainer = ({handleModal, type}) => { +const FlightPlanArcrftContainer = ({handleModal, type, groupId}) => { const dispatch = useDispatch(); const { arcrftList } = useSelector(state => state.flightState); /* 기체 조회 */ const handleSearch = () => { - // group id 하드코딩 - dispatch(Actions.FLIGHT_PLAN_ARCRFT_LIST.request("D1682A")); + + if(groupId) { + dispatch(Actions.FLIGHT_PLAN_ARCRFT_LIST.request(groupId)); + } } /* 기체 선택 */ diff --git a/src/containers/basis/flight/plan/FlightPlanPilotContainer.js b/src/containers/basis/flight/plan/FlightPlanPilotContainer.js index fa8725a..121d9f2 100644 --- a/src/containers/basis/flight/plan/FlightPlanPilotContainer.js +++ b/src/containers/basis/flight/plan/FlightPlanPilotContainer.js @@ -3,15 +3,16 @@ import {useDispatch, useSelector} from 'react-redux'; import * as Actions from '../../../../modules/basis/flight/actions/basisFlightAction'; import FlightPlanPilot from '../../../../components/basis/flight/plan/FlightPlanPilot'; -const FlightPlanPilotContainer = ({handleModal, type}) => { +const FlightPlanPilotContainer = ({handleModal, type, groupId}) => { const dispatch = useDispatch(); - const { pilotList } = useSelector(state => state.flightState); + const { pilotList, selectGroup } = useSelector(state => state.flightState); /* 조종사 조회 */ - const handleSearch = () => { - // group id 하드코딩 - dispatch(Actions.FLIGHT_PLAN_PILOT_LIST.request("D1682A")); + const handleSearch = () => { + if(groupId) { + dispatch(Actions.FLIGHT_PLAN_PILOT_LIST.request(groupId)); + } } /* 조종사 선택 */