Browse Source

그룹 목록 데이터 수정

pull/2/head
hhjk00 10 months ago
parent
commit
2e085f8481
  1. 53
      src/components/statistics/StatisticsSearch.js
  2. 14
      src/containers/statistics/AbnormalSituationContainer.js
  3. 14
      src/containers/statistics/FlightContainer.js
  4. 14
      src/containers/statistics/FlightResultContainer.js

53
src/components/statistics/StatisticsSearch.js

@ -11,6 +11,49 @@ import { Search } from 'react-feather';
import { Bar, Doughnut } from 'react-chartjs-2'; import { Bar, Doughnut } from 'react-chartjs-2';
import { useEffect, useState } from 'react'; import { useEffect, useState } from 'react';
const competentAgency = [
{
text: '서울지방항공청(항공운항과)',
value: 'F0001'
},
{
text: '김포항공관리사무소(안전운항과)',
value: 'F0002'
},
{
text: '양양공항출장소',
value: 'F0003'
},
{
text: '원주공항출장소',
value: 'F0004'
},
{
text: '청주공항출장소',
value: 'F0005'
},
{
text: '군산공항출장소',
value: 'F0006'
},
{
text: '부산지방항공청(항공운항과)',
value: 'F0007'
},
{
text: '제주지방항공청(안전운항과)',
value: 'F0008'
},
{
text: '정석비행장',
value: 'F0009'
},
{
text: '울진공항출장소',
value: 'F0010'
}
];
export default function StatisticsSearch({ export default function StatisticsSearch({
tooltipShadow, tooltipShadow,
gridLineColor, gridLineColor,
@ -23,8 +66,8 @@ export default function StatisticsSearch({
handlerChartTitle, handlerChartTitle,
handleChangeSearchType, handleChangeSearchType,
formatSeconds, formatSeconds,
user, user
entireGroupList // entireGroupList
}) { }) {
const [total, setTotal] = useState([]); const [total, setTotal] = useState([]);
const [top, setTop] = useState([]); const [top, setTop] = useState([]);
@ -294,9 +337,9 @@ export default function StatisticsSearch({
) )
} }
> >
{entireGroupList?.map(i => ( {competentAgency.map(i => (
<option key={i.groupId} value={i.groupNm}> <option key={i.value} value={i.value}>
{i.groupNm} {i.text}
</option> </option>
))} ))}
</CustomInput> </CustomInput>

14
src/containers/statistics/AbnormalSituationContainer.js

@ -13,12 +13,12 @@ export default function AbnormalSituationContainer() {
state => state.statisticsState state => state.statisticsState
); );
const { user } = useSelector(state => state.authState); const { user } = useSelector(state => state.authState);
const { entireGroupList } = useSelector(state => state.groupState); // const { entireGroupList } = useSelector(state => state.groupState);
const [searchType, setSearchType] = useState({ const [searchType, setSearchType] = useState({
category: 'PLAN', category: 'PLAN',
dateType: 'year', dateType: 'year',
serviceType: 'KAC', serviceType: 'F0002',
year: new Date().getFullYear(), year: new Date().getFullYear(),
month: new Date().getMonth() + 1, month: new Date().getMonth() + 1,
day: new Date().getDate() day: new Date().getDate()
@ -37,10 +37,10 @@ export default function AbnormalSituationContainer() {
}; };
// 사용자가 SUPER 권한일 경우 전체 그룹 조회 // 사용자가 SUPER 권한일 경우 전체 그룹 조회
useEffect(() => { // useEffect(() => {
user?.authId === 'SUPER' && // user?.authId === 'SUPER' &&
dispatch(GroupActions.ENTIRE_GROUP_LIST.request()); // dispatch(GroupActions.ENTIRE_GROUP_LIST.request());
}, []); // }, []);
// 사용자가 SUPER 권한일 경우 serviceType 파라미터 추가 - 상단 통계 데이터 // 사용자가 SUPER 권한일 경우 serviceType 파라미터 추가 - 상단 통계 데이터
useEffect(() => { useEffect(() => {
@ -140,7 +140,7 @@ export default function AbnormalSituationContainer() {
searchData={abnormalSearch} searchData={abnormalSearch}
searchType={searchType} searchType={searchType}
user={user} user={user}
entireGroupList={entireGroupList} // entireGroupList={entireGroupList}
categoryTypeOptions={categoryTypeOptions} categoryTypeOptions={categoryTypeOptions}
dateLists={dateLists} dateLists={dateLists}
handlerBarTicks={handlerBarTicks} handlerBarTicks={handlerBarTicks}

14
src/containers/statistics/FlightContainer.js

@ -11,12 +11,12 @@ export default function FlightContainer() {
const { flight, flightSearch } = useSelector(state => state.statisticsState); const { flight, flightSearch } = useSelector(state => state.statisticsState);
const { user } = useSelector(state => state.authState); const { user } = useSelector(state => state.authState);
const { entireGroupList } = useSelector(state => state.groupState); // const { entireGroupList } = useSelector(state => state.groupState);
const [searchType, setSearchType] = useState({ const [searchType, setSearchType] = useState({
category: 'TIME', category: 'TIME',
dateType: 'year', dateType: 'year',
serviceType: 'KAC', serviceType: 'F0002',
year: new Date().getFullYear(), year: new Date().getFullYear(),
month: new Date().getMonth() + 1, month: new Date().getMonth() + 1,
day: new Date().getDate() day: new Date().getDate()
@ -35,10 +35,10 @@ export default function FlightContainer() {
}; };
// 사용자가 SUPER 권한일 경우 전체 그룹 조회 // 사용자가 SUPER 권한일 경우 전체 그룹 조회
useEffect(() => { // useEffect(() => {
user?.authId === 'SUPER' && // user?.authId === 'SUPER' &&
dispatch(GroupActions.ENTIRE_GROUP_LIST.request()); // dispatch(GroupActions.ENTIRE_GROUP_LIST.request());
}, [user]); // }, [user]);
// 사용자가 SUPER 권한일 경우 serviceType 파라미터 추가 - 상단 통계 데이터 // 사용자가 SUPER 권한일 경우 serviceType 파라미터 추가 - 상단 통계 데이터
useEffect(() => { useEffect(() => {
@ -200,7 +200,7 @@ export default function FlightContainer() {
searchData={flightSearch} searchData={flightSearch}
searchType={searchType} searchType={searchType}
user={user} user={user}
entireGroupList={entireGroupList} // entireGroupList={entireGroupList}
categoryTypeOptions={categoryTypeOptions} categoryTypeOptions={categoryTypeOptions}
dateLists={dateLists} dateLists={dateLists}
formatSeconds={formatSeconds} formatSeconds={formatSeconds}

14
src/containers/statistics/FlightResultContainer.js

@ -11,12 +11,12 @@ export default function ResultContainer() {
const { result, resultSearch } = useSelector(state => state.statisticsState); const { result, resultSearch } = useSelector(state => state.statisticsState);
const { user } = useSelector(state => state.authState); const { user } = useSelector(state => state.authState);
const { entireGroupList } = useSelector(state => state.groupState); // const { entireGroupList } = useSelector(state => state.groupState);
const [searchType, setSearchType] = useState({ const [searchType, setSearchType] = useState({
category: 'FLT_RESULT', category: 'FLT_RESULT',
dateType: 'year', dateType: 'year',
serviceType: 'KAC', serviceType: 'F0002',
year: new Date().getFullYear(), year: new Date().getFullYear(),
month: new Date().getMonth() + 1, month: new Date().getMonth() + 1,
day: new Date().getDate() day: new Date().getDate()
@ -35,10 +35,10 @@ export default function ResultContainer() {
}; };
// 사용자가 SUPER 권한일 경우 전체 그룹 조회 // 사용자가 SUPER 권한일 경우 전체 그룹 조회
useEffect(() => { // useEffect(() => {
user?.authId === 'SUPER' && // user?.authId === 'SUPER' &&
dispatch(GroupActions.ENTIRE_GROUP_LIST.request()); // dispatch(GroupActions.ENTIRE_GROUP_LIST.request());
}, [user]); // }, [user]);
// 사용자가 SUPER 권한일 경우 serviceType 파라미터 추가 - 상단 통계 데이터 // 사용자가 SUPER 권한일 경우 serviceType 파라미터 추가 - 상단 통계 데이터
useEffect(() => { useEffect(() => {
@ -138,7 +138,7 @@ export default function ResultContainer() {
searchData={resultSearch} searchData={resultSearch}
searchType={searchType} searchType={searchType}
user={user} user={user}
entireGroupList={entireGroupList} // entireGroupList={entireGroupList}
categoryTypeOptions={categoryTypeOptions} categoryTypeOptions={categoryTypeOptions}
dateLists={dateLists} dateLists={dateLists}
handlerBarTicks={handlerBarTicks} handlerBarTicks={handlerBarTicks}

Loading…
Cancel
Save