From dea899820aa2351d8847b582bae2c1facf0fa670 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: Thu, 22 Sep 2022 14:53:36 +0900 Subject: [PATCH] =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=20=EC=9D=B4?= =?UTF-8?q?=EB=8F=99=20=EC=8B=9C=20=EB=82=98=EC=9D=98=EA=B7=B8=EB=A3=B9=20?= =?UTF-8?q?=EB=AA=A9=EB=A1=9D=20=EC=B4=88=EA=B8=B0=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../flight/aprv/FlightPlanAprvGroupGrid.js | 142 ++++++++++-------- .../basis/dron/BasisDronContainer.js | 1 + .../flight/aprv/FlightPlanAprvContainer.js | 5 +- .../basis/flight/plan/FlightPlanContainer.js | 4 + 4 files changed, 88 insertions(+), 64 deletions(-) diff --git a/src/components/basis/flight/aprv/FlightPlanAprvGroupGrid.js b/src/components/basis/flight/aprv/FlightPlanAprvGroupGrid.js index fa69122c..3a811c96 100644 --- a/src/components/basis/flight/aprv/FlightPlanAprvGroupGrid.js +++ b/src/components/basis/flight/aprv/FlightPlanAprvGroupGrid.js @@ -1,67 +1,83 @@ -import React, {} from 'react'; -import { GridDatabase } from "../../../crud/grid/GridDatatable"; -import { - Card, - Button -} from 'reactstrap'; +import React from 'react'; +import { GridDatabase } from '../../../crud/grid/GridDatatable'; +import { Card, Button } from 'reactstrap'; +const FlightPlanAprvGroupGrid = ({ + data, + count, + selectGroup, + handlerGroupCancel, + handleGroupSelect +}) => { + const columns = [ + { + // id: 'groupNm', + name: '그룹 명', + selector: 'groupNm', + minWidth: '102px', + sortable: true, + cell: row =>
{row.groupNm}
+ // cell: row => { + // return row?.groupNm; + // } + }, + { + // id: 'groupId', + name: '그룹 코드', + selector: 'groupId', + minWidth: '102px', + sortable: true, + cell: row =>
{row.groupId}
+ }, + { + name: '', + sortable: true, + cell: row => { + return selectGroup?.groupId === row?.groupId ? ( + handlerGroupCancel()} + > + 선택취소 + + ) : ( + { + handleGroupSelect({ + groupId: row?.groupId, + groupNm: row?.groupNm, + groupAuthCd: row?.groupAuthCd + }); + }} + > + 상세보기 + + ); + } + } + ]; -const FlightPlanAprvGroupGrid = ({ data, count, selectGroup, handlerGroupCancel, handleGroupSelect }) => { - - const columns = [ - {id: 'groupNm', name: '그룹 명', minWidth: '102px', cell: row => (
{row.groupNm}
)}, - {id: 'groupId', name: '그룹 코드', minWidth: '102px', sortable: true, cell: row => (
{row.groupId}
)}, - {sortable: true, cell: row => { - return selectGroup?.groupId === row?.groupId ? ( - handlerGroupCancel()} - > - 선택취소 - - ) : ( - { - handleGroupSelect({ - groupId: row?.groupId, - groupNm: row?.groupNm, - groupAuthCd: row?.groupAuthCd - }) - } - } - > - 상세보기 - - ) - }} - ]; - - return ( - <> -
-
-

나의 그룹 목록

- 검색결과 총 {count}건 -
-
-
-
- -
- -
-
-
- - ) - -} + return ( + <> +
+
+

나의 그룹 목록

+ 검색결과 총 {count}건 +
+
+
+
+ +
+ +
+
+
+ + ); +}; export default FlightPlanAprvGroupGrid; diff --git a/src/containers/basis/dron/BasisDronContainer.js b/src/containers/basis/dron/BasisDronContainer.js index b8c1c449..d28123f5 100644 --- a/src/containers/basis/dron/BasisDronContainer.js +++ b/src/containers/basis/dron/BasisDronContainer.js @@ -141,6 +141,7 @@ export const BasisDronContainer = props => { ]; useEffect(() => { + handlerCancel(); if (selectData) { handlerDronSearch(); } diff --git a/src/containers/basis/flight/aprv/FlightPlanAprvContainer.js b/src/containers/basis/flight/aprv/FlightPlanAprvContainer.js index 40bd257c..1c90ffca 100644 --- a/src/containers/basis/flight/aprv/FlightPlanAprvContainer.js +++ b/src/containers/basis/flight/aprv/FlightPlanAprvContainer.js @@ -11,6 +11,7 @@ import { useHistory } from 'react-router-dom'; import FlightPlanGroupGrid from '../../../../components/basis/flight/plan/FlightPlanGroupGrid'; import { JOIN_LIST } from '../../../../modules/basis/group/actions/basisGroupAction'; import { Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap'; +import FlightPlanAprvGroupGrid from '../../../../components/basis/flight/aprv/FlightPlanAprvGroupGrid'; const initSearchData = { schFltStDt: moment() @@ -133,6 +134,7 @@ const FlightPlanAprvContainer = () => { // 최초 비행계획서 목록 조회 useEffect(() => { + handlerGroupCancel(); // handleSearch(searchData); }, []); useEffect(() => { @@ -208,7 +210,7 @@ const FlightPlanAprvContainer = () => { /> */} - { joinList={joinList} selectGroup={selectGroup} handleChangeSelected={handleChangeSelected} + handleMoveDetail={handleMoveDetail} /> ) : ( diff --git a/src/containers/basis/flight/plan/FlightPlanContainer.js b/src/containers/basis/flight/plan/FlightPlanContainer.js index b7d7bfa0..7041578f 100644 --- a/src/containers/basis/flight/plan/FlightPlanContainer.js +++ b/src/containers/basis/flight/plan/FlightPlanContainer.js @@ -114,6 +114,10 @@ const FlightPlanContainer = () => { } }, [user]); + useEffect(() => { + handlerGroupCancel(); + }, []); + return (