Browse Source

권한정리 - 기체관리 수정

ctrlDraw
junh_eee(이준희) 2 years ago
parent
commit
3107fc2a9d
  1. 28
      src/containers/basis/dron/BasisDronContainer.js
  2. 6
      src/containers/basis/group/BasisGroupUsersContainer.js

28
src/containers/basis/dron/BasisDronContainer.js

@ -81,6 +81,7 @@ export const BasisDronContainer = props => {
// width: '100px', // width: '100px',
sortable: true, sortable: true,
cell: row => { cell: row => {
// console.log(row);
return selectData?.groupId === row?.groupId ? ( return selectData?.groupId === row?.groupId ? (
<Button.Ripple <Button.Ripple
color='danger' color='danger'
@ -98,6 +99,7 @@ export const BasisDronContainer = props => {
row?.groupId, row?.groupId,
row?.groupNm, row?.groupNm,
row?.groupAuthCd, row?.groupAuthCd,
row?.myGroupAuthCd,
row?.aprvlYn row?.aprvlYn
) )
} }
@ -152,13 +154,13 @@ export const BasisDronContainer = props => {
// minWidth: '102px', // minWidth: '102px',
sortable: true, sortable: true,
cell: row => { cell: row => {
const [isHover, setIsHover] = useState(false); // const [isHover, setIsHover] = useState(false);
const enter = () => { // const enter = () => {
setIsHover(true); // setIsHover(true);
}; // };
const leave = () => { // const leave = () => {
setIsHover(false); // setIsHover(false);
}; // };
let mine = false; let mine = false;
if (user.authId === 'SUPER') { if (user.authId === 'SUPER') {
@ -246,19 +248,25 @@ export const BasisDronContainer = props => {
const handlerPageChange = page => { const handlerPageChange = page => {
dispatch(Actions.LIST.request({ groupId: groupId, page })); dispatch(Actions.LIST.request({ groupId: groupId, page }));
}; };
const handlerDetail = (groupId, groupNm, groupAuthCd, aprvlYn) => { const handlerDetail = (groupId, groupNm, groupAuthCd, myGroupAuthCd) => {
dispatch(Actions.SELECT({ groupId: groupId, groupNm: groupNm })); dispatch(Actions.SELECT({ groupId: groupId, groupNm: groupNm }));
setParams({ setParams({
...params, ...params,
groupId: groupId, groupId: groupId,
groupNm: groupNm groupNm: groupNm
}); });
dispatch(Actions.LIST.request({ searchParams: { groupId: groupId, page: 1 } })); dispatch(
Actions.LIST.request({ searchParams: { groupId: groupId, page: 1 } })
);
let my = false; let my = false;
if (user.authId === 'SUPER') { if (user.authId === 'SUPER') {
my = true; 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) { if (groupAuthCd) {
my = true; my = true;
} }

6
src/containers/basis/group/BasisGroupUsersContainer.js

@ -213,7 +213,7 @@ export const BasisGroupUsersContainer = props => {
normal = true; normal = true;
} }
} else if (user.authId === 'ADMIN' || user.authId === 'USER') { } else if (user.authId === 'ADMIN' || user.authId === 'USER') {
if (my?.myGrouopAuthCd === 'MASTER') { if (my?.myGroupAuthCd === 'MASTER') {
if (row?.groupAuthCd === 'MASTER') { if (row?.groupAuthCd === 'MASTER') {
master = true; master = true;
leader = true; leader = true;
@ -225,7 +225,7 @@ export const BasisGroupUsersContainer = props => {
master = true; master = true;
normal = true; normal = true;
} }
} else if (my?.myGrouopAuthCd === 'LEADER') { } else if (my?.myGroupAuthCd === 'LEADER') {
if (row?.groupAuthCd === 'MASTER') { if (row?.groupAuthCd === 'MASTER') {
master = true; master = true;
leader = true; leader = true;
@ -238,7 +238,7 @@ export const BasisGroupUsersContainer = props => {
master = true; master = true;
normal = true; normal = true;
} }
} else if (my?.myGrouopAuthCd === 'NORMAL' || !my.myGrouopAuthCd) { } else if (my?.myGroupAuthCd === 'NORMAL' || !my.myGroupAuthCd) {
//가입그룹에서 NORMAL / 미가입 그룹 //가입그룹에서 NORMAL / 미가입 그룹
master = true; master = true;
leader = true; leader = true;

Loading…
Cancel
Save