+
{/*
{
*/}
{/* */}
-
{user ? (
<>
{
const { list, count, detail, searchParams, log, stcsList, stcsCount } =
useSelector(state => state.analysisSimulatorState);
@@ -34,8 +37,6 @@ export const AnalysisSimulationContainer = props => {
const [searchText, setSearchText] = useState('');
- let playCount = 0;
-
const [sliderVal, setSliderVal] = useState({
maxVal: 0,
minVal: 0
@@ -59,7 +60,6 @@ export const AnalysisSimulationContainer = props => {
}
playCount++;
-
if (playCount == log.length) {
playCount = 0;
clearInterval(timer);
@@ -76,7 +76,7 @@ export const AnalysisSimulationContainer = props => {
setInfo({ ...log[playCount], playCount: playCount });
setIsPlay(false);
}
- }, [stcsList])
+ }, [stcsList]);
useEffect(() => {
if (oepnReportList) {
@@ -100,6 +100,11 @@ export const AnalysisSimulationContainer = props => {
}, [sliderCount]);
useEffect(() => {
+ playCount = 0;
+ if (log) {
+ setInfo({ ...log[playCount], playCount: 0 });
+ }
+
// let arrDate = log?.map(date => {
// const dateval = date.srvrRcvDt;
// if (dateval) {
diff --git a/src/containers/basis/dron/BasisDronContainer.js b/src/containers/basis/dron/BasisDronContainer.js
index 3344bf9..707105b 100644
--- a/src/containers/basis/dron/BasisDronContainer.js
+++ b/src/containers/basis/dron/BasisDronContainer.js
@@ -2,11 +2,18 @@ import moment from 'moment';
import { useEffect, useState } from 'react';
import { shallowEqual, useDispatch, useSelector } from 'react-redux';
import { useHistory, Link } from 'react-router-dom';
-import { Button, Col, Row } from 'reactstrap';
+import {
+ Button,
+ Col,
+ Row,
+ Modal,
+ ModalHeader,
+ ModalBody,
+ ModalFooter
+} from 'reactstrap';
import { BasisDronGrid } from '../../../components/basis/dron/BasisDronGrid';
import { BasisGroupDronGrid } from '../../../components/basis/dron/BasisGroupDronGrid';
import { CustomMainLayout } from '../../../components/layout/CustomMainLayout';
-// import { InfoModal } from '../../../components/modal/InfoModal';
import * as Actions from '../../../modules/basis/dron/actions/basisDronAction';
import * as GroupActions from '../../../modules/basis/group/actions/basisGroupAction';
import { GET_ARCTFT_TYPE_CD } from '../../../utility/CondeUtil';
@@ -30,43 +37,44 @@ export const BasisDronContainer = props => {
desc: ''
});
+ const [isMyGroup, setIsMyGroup] = useState();
+
const columns = [
{
- name: '생성일시',
- selector: row => row?.createDt,
+ name: '그룹명',
+ selector: row => row.groupNm,
+ minWidth: '102px',
sortable: true,
cell: row => {
- return row?.createDt ? row.createDt : '-';
+ return row?.groupNm;
+ // return selectData;
}
},
{
- name: '가입일시',
- selector: row => row?.joinDt,
+ name: '그룹 코드',
+ selector: row => row.groupId,
+ minWidth: '102px',
sortable: true,
cell: row => {
- return row?.joinDt ? row.joinDt : '-';
+ return row?.groupId;
}
},
{
- name: '그룹명',
- selector: row => row.groupNm,
- minWidth: '102px',
+ name: '생성일시',
+ selector: row => row?.createDt,
sortable: true,
cell: row => {
- return row?.groupNm;
- // return selectData;
+ return row?.createDt ? row.createDt : '-';
}
},
{
- name: '그룹 코드',
- selector: row => row.groupId,
- minWidth: '102px',
+ name: '가입일시',
+ selector: row => row?.joinDt,
sortable: true,
cell: row => {
- return row?.groupId;
+ return row?.joinDt ? row.joinDt : '-';
}
},
-
{
name: '',
// selector: 'cntrlStDate',
@@ -144,11 +152,63 @@ export const BasisDronContainer = props => {
// minWidth: '102px',
sortable: true,
cell: row => {
- return 상세보기;
+ const [isHover, setIsHover] = useState(false);
+ const enter = () => {
+ setIsHover(true);
+ };
+ const leave = () => {
+ setIsHover(false);
+ };
+
+ 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 ? (
+ <>
+ 상세보기
+ >
+ ) : (
+ <>
+ {/*
+ 상세보기
+ */}
+ -
+ >
+ )}
+ >
+ );
}
}
];
+ const handlerNotMine = () => {
+ setModal({
+ isOpen: true,
+ title: '조회 불가',
+ desc: '사용자가 등록한 기체가 아닙니다.',
+ color: 'danger'
+ });
+ return;
+ };
+
useEffect(() => {
handlerCancel();
// if (selectData) {
@@ -193,26 +253,15 @@ export const BasisDronContainer = props => {
});
dispatch(Actions.LIST.request({ groupId: groupId }));
- // if (
- // // groupAuthCd === 'CREATER' ||
- // groupAuthCd === 'MASTER' || user.authId ==='SUPER' ||
- // // (aprvlYn === 'Y' && groupAuthCd === 'ADMIN')
- // (aprvlYn === 'Y' && groupAuthCd === 'LEADER')
- // ) {
- // dispatch(Actions.SELECT({ groupId: groupId, groupNm: groupNm }));
- // setParams({
- // ...params,
- // groupId: groupId,
- // groupNm: groupNm
- // });
- // dispatch(Actions.LIST.request({ groupId: groupId }));
- // } else {
- // setModal({
- // isOpen: true,
- // title: '권한 확인',
- // desc: '기체정보 확인을 위해서는 운영자 권한이 필요합니다. 운영자에게 권한을 부여받고 다시 시도해 주세요.'
- // });
- // }
+ let my = false;
+ if (user.authId === 'SUPER') {
+ my = true;
+ } else if (user.authId === 'ADMIN' || user.authId === 'USER') {
+ if (groupAuthCd) {
+ my = true;
+ }
+ }
+ setIsMyGroup(my);
};
const handlerGroupCreate = () => {
@@ -279,12 +328,35 @@ export const BasisDronContainer = props => {
pagination={true}
paginationPerPage={10}
paginationRowsPerPageOptions={[10, 20, 30, 40]}
+ isMyGroup={isMyGroup}
/>
)}
- {/*
*/}
+
+ setModal({ ...modal, isOpen: !modal.isOpen })}
+ modalClassName={'modal-' + `${modal.color}`}
+ className='modal-dialog-centered'
+ >
+ setModal({ ...modal, isOpen: !modal.isOpen })}
+ >
+ {modal.title}
+
+ {modal.desc}
+
+ {' '}
+
+
+
);
};
diff --git a/src/containers/basis/flight/plan/FlightPlanContainer.js b/src/containers/basis/flight/plan/FlightPlanContainer.js
index 96e150d..5d0b399 100644
--- a/src/containers/basis/flight/plan/FlightPlanContainer.js
+++ b/src/containers/basis/flight/plan/FlightPlanContainer.js
@@ -39,9 +39,10 @@ const FlightPlanContainer = () => {
state => state.groupState
);
const { user } = useSelector(state => state.authState, shallowEqual);
-
const [params, setParams] = useState({});
+ const [isMyGroup, setIsMyGroup] = useState();
+
const moveFlightPlanDetailPage = () => {
if (planDetailData) {
dispatch(FlightAction.FLIGHT_PLAN_DETAIL_INIT());
@@ -91,6 +92,16 @@ const FlightPlanContainer = () => {
});
dispatch(FlightAction.FLIGHT_PLAN_LIST.request(param));
+
+ let my = false;
+ if (user.authId === 'SUPER') {
+ my = true;
+ } else if (user.authId === 'ADMIN' || user.authId === 'USER') {
+ if (groupAuthCd) {
+ my = true;
+ }
+ }
+ setIsMyGroup(my);
};
const handlerGroupCancel = () => {
@@ -123,19 +134,8 @@ const FlightPlanContainer = () => {
return (
- {/* */}
-
+
- {/*
-
- */}
- {/* */}
{user ? (
<>
@@ -156,9 +156,7 @@ const FlightPlanContainer = () => {
) : (
<>>
)}
-
- {/* */}
{selectGroup.cstmrSno !== 0 ? (
<>
@@ -173,12 +171,11 @@ const FlightPlanContainer = () => {
pagination={true}
paginationPerPage={10}
paginationRowsPerPageOptions={[10, 20, 30, 40]}
- // handlerPageChange={handlerPageChange}
- // columns={columns}
+ isMyGroup={isMyGroup}
+ user={user}
/>
>
) : (
- //
그룹 목록에서 상세보기를 클릭하세요.
diff --git a/src/containers/basis/group/BasisGroupUsersContainer.js b/src/containers/basis/group/BasisGroupUsersContainer.js
index af6f2db..c82925a 100644
--- a/src/containers/basis/group/BasisGroupUsersContainer.js
+++ b/src/containers/basis/group/BasisGroupUsersContainer.js
@@ -313,30 +313,17 @@ export const BasisGroupUsersContainer = props => {
}, [user]);
const handlerDetail = (groupId, groupNm, groupAuthCd, aprvlYn) => {
- if (
- user.authId === 'SUPER' ||
- user.authId === 'ADMIN' ||
- groupAuthCd === 'MASTER' ||
- (aprvlYn === 'Y' && groupAuthCd === 'LEADER')
- ) {
- dispatch(Actions.SELECT({ groupId: groupId, groupNm, groupNm }));
- const param = params;
- param.groupId = groupId;
- param.memberNm = '';
+ //권한 상관없이 조회 가능
+ dispatch(Actions.SELECT({ groupId: groupId, groupNm, groupNm }));
+ const param = params;
+ param.groupId = groupId;
+ param.memberNm = '';
- dispatch(
- Actions.USER_LIST.request({
- searchParams: param
- })
- );
- } else {
- setInfoModal({
- isOpen: true,
- title: '권한 확인',
- desc: '사용자관리 확인을 위해서는 운영자 권한이 필요합니다. 운영자에게 권한을 부여받고 다시 시도해 주세요.'
- });
- return;
- }
+ dispatch(
+ Actions.USER_LIST.request({
+ searchParams: param
+ })
+ );
};
const handlerCancel = () => {