Browse Source

대시보드 super 관리자 권한 분기 처리

pull/2/head
김장현 10 months ago
parent
commit
d84b9a1ba5
  1. 1
      src/components/crud/grid/GridDatatable.js
  2. 7
      src/components/dashboard/DroneFlightSchedule.js
  3. 4
      src/containers/main/dash/MainDashContainer.js

1
src/components/crud/grid/GridDatatable.js

@ -10,7 +10,6 @@ import {
import { selectableRowsComponent } from './selectableRowsComponent';
export const GridDatabase = props => {
console.log(props.rowsPerPageText);
return props[`${props.handlerPageChange ? 'total' : 'count'}`] <= 0 ? (
<div className='d-flex justify-content-center align-items-center h-100'>
<p>표시할 데이터가 없습니다.</p>

7
src/components/dashboard/DroneFlightSchedule.js

@ -127,8 +127,7 @@ export default function DroneFlightSchedule({
<div className='w-100 d-flex justify-content-between'>
<CardTitle tag='h4'>드론 비행운항 목록</CardTitle>
<div className='d-flex align-items-center'>
{user?.cptAuthCode === 'KAC' ||
(user?.authId === 'SUPER' && (
{(user?.cptAuthCode === 'KAC' || user?.authId === 'SUPER') && (
<Input
id='groupSelect'
type='select'
@ -145,7 +144,7 @@ export default function DroneFlightSchedule({
<option value={i.value}>{i.text}</option>
))}
</Input>
))}
)}
<button
onClick={() =>
@ -164,7 +163,7 @@ export default function DroneFlightSchedule({
paginationPerPage={8}
paginationRowsPerPageOptions={[]}
rowsPerPageText={'noText'}
total={dronOperationList?.length || 0}
count={dronOperationList?.length || 0}
columns={columns}
pagination
/>

4
src/containers/main/dash/MainDashContainer.js

@ -42,7 +42,9 @@ export const MainDashContainer = () => {
}, []);
useEffect(() => {
handlerDronOperationList(user.cptAuthCode);
handlerDronOperationList(
user?.authId === 'SUPER' ? 'all' : user.cptAuthCode
);
}, [user]);
// 일 별 비행횟수 통계 날짜 리스트 dispatch

Loading…
Cancel
Save