From 576cc97878bd362276b3fa1f41d0b6d3d7250ac8 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, 12 Oct 2022 15:47:25 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B6=8C=ED=95=9C=EC=A0=95=EB=A6=AC=20-=20?= =?UTF-8?q?=EB=B9=84=ED=96=89=EA=B3=84=ED=9A=8D=EB=AA=A9=EB=A1=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../basis/flight/plan/FlightPlanGrid.js | 29 +++++++------------ .../basis/flight/plan/FlightPlanGroupGrid.js | 4 ++- .../basis/flight/plan/FlightPlanContainer.js | 15 ++++++++-- 3 files changed, 27 insertions(+), 21 deletions(-) diff --git a/src/components/basis/flight/plan/FlightPlanGrid.js b/src/components/basis/flight/plan/FlightPlanGrid.js index 9dc8d87..5f3f0f2 100644 --- a/src/components/basis/flight/plan/FlightPlanGrid.js +++ b/src/components/basis/flight/plan/FlightPlanGrid.js @@ -46,26 +46,20 @@ const FlightPlanGrid = ({ id: 'moveDetail', name: '상세보기', cell: row => { - let mine = false; - if (user.authId === 'SUPER') { - mine = true; - } else if (user.authId === 'ADMIN' || user.authId === 'USER') { - if (row.createUserId === user.userId) { - mine = true; - } - } + // let mine = false; + // if (user.authId === 'SUPER') { + // mine = true; + // } else if (user.authId === 'ADMIN' || user.authId === 'USER') { + // if (row.createUserId === user.userId) { + // mine = true; + // } + // } return ( <> - {mine ? ( - <> - - 상세보기 - - - ) : ( - <>- - )} + + 상세보기 + ); } @@ -116,7 +110,6 @@ const FlightPlanGrid = ({ paginationRowsPerPageOptions={paginationRowsPerPageOptions} handlerPageChange={handlerPageChange} total={total} - // pagination={props.pagination} /> {/* 검색된 데이터가 없습니다. */} diff --git a/src/components/basis/flight/plan/FlightPlanGroupGrid.js b/src/components/basis/flight/plan/FlightPlanGroupGrid.js index 466e8e2..7057e38 100644 --- a/src/components/basis/flight/plan/FlightPlanGroupGrid.js +++ b/src/components/basis/flight/plan/FlightPlanGroupGrid.js @@ -47,6 +47,7 @@ const FlightPlanGroupGrid = ({ { sortable: true, cell: row => { + // console.log(row); return selectGroup?.groupId === row?.groupId ? ( diff --git a/src/containers/basis/flight/plan/FlightPlanContainer.js b/src/containers/basis/flight/plan/FlightPlanContainer.js index f7d162b..266b473 100644 --- a/src/containers/basis/flight/plan/FlightPlanContainer.js +++ b/src/containers/basis/flight/plan/FlightPlanContainer.js @@ -42,6 +42,7 @@ const FlightPlanContainer = () => { const { user } = useSelector(state => state.authState, shallowEqual); const [params, setParams] = useState({}); + //비행계획서 신청 버튼 활성/비활성 제어 const [isMyGroup, setIsMyGroup] = useState(); const moveFlightPlanDetailPage = () => { @@ -65,7 +66,12 @@ const FlightPlanContainer = () => { })); }; - const handleGroupSelect = ({ groupId, groupNm, groupAuthCd }) => { + const handleGroupSelect = ({ + groupId, + groupNm, + groupAuthCd, + myGroupAuthCd + }) => { // 권한 상관 없이 모두 조회 가능 const param = searchData; @@ -94,10 +100,15 @@ const FlightPlanContainer = () => { dispatch(FlightAction.FLIGHT_PLAN_LIST.request({ ...param, page: 1 })); + //비행계획서 신청 버튼 활성/비활성 제어 let my = false; if (user.authId === 'SUPER') { my = true; - } else if (user.authId === 'ADMIN' || user.authId === 'USER') { + } else if (user.authId === 'ADMIN') { + if (myGroupAuthCd) { + my = true; + } + } else if (user.authId === 'USER') { if (groupAuthCd) { my = true; }