diff --git a/src/views/control/report/ControlReportList.js b/src/views/control/report/ControlReportList.js index d485126a..ffbe173c 100644 --- a/src/views/control/report/ControlReportList.js +++ b/src/views/control/report/ControlReportList.js @@ -1,11 +1,11 @@ import moment from 'moment'; -import React, { useEffect, useState } from 'react'; +import { useState } from 'react'; import { Search, X } from 'react-feather'; import { useDispatch, useSelector } from 'react-redux'; import { Badge, Button, Input, InputGroup } from 'reactstrap'; import { controlGpDtlAction, - controlGpLogAction + controlGpFlightPlanAction } from '../../../modules/control/gp'; import { objectClickAction } from '../../../modules/control/map/actions/controlMapActions'; @@ -15,9 +15,10 @@ const ControlReportList = props => { const dispatch = useDispatch(); - const handlerDetail = (objectId, cntrlId) => { - dispatch(objectClickAction(cntrlId)); - dispatch(controlGpDtlAction.request(cntrlId)); + const handlerDetail = item => { + dispatch(objectClickAction(item.controlId)); + dispatch(controlGpDtlAction.request(item.controlId)); + dispatch(controlGpFlightPlanAction.request(item.objectId)); }; // useEffect(() => {}, [filterId]); @@ -62,7 +63,7 @@ const ControlReportList = props => { return (
handlerDetail(item.objectId, item.controlId)} + onClick={() => handlerDetail(item)} key={item.objectId} >