|
|
@ -46,6 +46,52 @@ const FlightPlanContainer = () => { |
|
|
|
//비행계획서 신청 버튼 활성/비활성 제어
|
|
|
|
//비행계획서 신청 버튼 활성/비활성 제어
|
|
|
|
const [isMyGroup, setIsMyGroup] = useState(); |
|
|
|
const [isMyGroup, setIsMyGroup] = useState(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// useEffect(() => {
|
|
|
|
|
|
|
|
// handlerGroupCancel();
|
|
|
|
|
|
|
|
// }, []);
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
|
|
|
if (user?.cstmrSno) { |
|
|
|
|
|
|
|
if (user.authId === 'SUPER' || user.authId === 'ADMIN') { |
|
|
|
|
|
|
|
dispatch(GROUP_LIST.request({ cstmrSno: user?.cstmrSno })); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
dispatch( |
|
|
|
|
|
|
|
JOIN_LIST.request({ |
|
|
|
|
|
|
|
cstmrSno: user?.cstmrSno |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, [user]); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
|
|
|
if (searchData?.groupId) { |
|
|
|
|
|
|
|
handleSearch(searchData); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//admin -> myGroupAuthCd
|
|
|
|
|
|
|
|
const group = groupList?.find( |
|
|
|
|
|
|
|
prev => prev.groupId === listSelect.groupId |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const join = joinList?.find(prev => prev.groupId === listSelect.groupId); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const obj = { |
|
|
|
|
|
|
|
groupAuthCd: join?.groupAuthCd, |
|
|
|
|
|
|
|
myGroupAuthCd: group?.myGroupAuthCd |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//비행계획서 신청 버튼 활성/비활성 제어
|
|
|
|
|
|
|
|
let my = false; |
|
|
|
|
|
|
|
if (user.authId === 'SUPER') { |
|
|
|
|
|
|
|
my = true; |
|
|
|
|
|
|
|
} else if (user.authId === 'ADMIN') { |
|
|
|
|
|
|
|
my = obj?.myGroupAuthCd && true; |
|
|
|
|
|
|
|
} else if (user.authId === 'USER') { |
|
|
|
|
|
|
|
my = obj?.groupAuthCd && true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
setIsMyGroup(my); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, [searchData]); |
|
|
|
|
|
|
|
|
|
|
|
const moveFlightPlanDetailPage = () => { |
|
|
|
const moveFlightPlanDetailPage = () => { |
|
|
|
if (planDetailData) { |
|
|
|
if (planDetailData) { |
|
|
|
dispatch(FlightAction.FLIGHT_PLAN_DETAIL_INIT()); |
|
|
|
dispatch(FlightAction.FLIGHT_PLAN_DETAIL_INIT()); |
|
|
@ -129,45 +175,6 @@ const FlightPlanContainer = () => { |
|
|
|
); |
|
|
|
); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
// useEffect(() => {
|
|
|
|
|
|
|
|
// handlerGroupCancel();
|
|
|
|
|
|
|
|
// }, []);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
|
|
|
if (searchData?.groupId) { |
|
|
|
|
|
|
|
handleSearch(searchData); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//비행계획서 신청 버튼 활성/비활성 제어
|
|
|
|
|
|
|
|
let my = false; |
|
|
|
|
|
|
|
if (user.authId === 'SUPER') { |
|
|
|
|
|
|
|
my = true; |
|
|
|
|
|
|
|
} else if (user.authId === 'ADMIN') { |
|
|
|
|
|
|
|
if (myGroupAuthCd) { |
|
|
|
|
|
|
|
my = true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else if (user.authId === 'USER') { |
|
|
|
|
|
|
|
if (groupAuthCd) { |
|
|
|
|
|
|
|
my = true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
setIsMyGroup(my); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, [searchData]); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
|
|
|
if (user?.cstmrSno) { |
|
|
|
|
|
|
|
if (user.authId === 'SUPER' || user.authId === 'ADMIN') { |
|
|
|
|
|
|
|
dispatch(GROUP_LIST.request({ cstmrSno: user?.cstmrSno })); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
dispatch( |
|
|
|
|
|
|
|
JOIN_LIST.request({ |
|
|
|
|
|
|
|
cstmrSno: user?.cstmrSno |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, [user]); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const onChangePage = page => { |
|
|
|
const onChangePage = page => { |
|
|
|
dispatch(FlightAction.FLIGHT_PLAN_LIST.request({ ...searchData, page })); |
|
|
|
dispatch(FlightAction.FLIGHT_PLAN_LIST.request({ ...searchData, page })); |
|
|
|
}; |
|
|
|
}; |
|
|
|