diff --git a/src/components/basis/flight/plan/FlightPlanArcrft.js b/src/components/basis/flight/plan/FlightPlanArcrft.js index 36fa21a2..f7e4c511 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 1ef265e3..a2e53d38 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 b1f555fd..57ff3fc8 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 fa8725ab..121d9f23 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)); + } } /* 조종사 선택 */