diff --git a/src/components/flight/OperationApprovalsTable.js b/src/components/flight/OperationApprovalsTable.js index 2ef7e608..b8ad8678 100644 --- a/src/components/flight/OperationApprovalsTable.js +++ b/src/components/flight/OperationApprovalsTable.js @@ -1,9 +1,8 @@ import React, { useEffect, useState, useRef } from 'react'; import { useDispatch, useSelector } from 'react-redux'; -import { Button, Card } from '@component/ui'; +import { Button, Card, CustomInput } from '@component/ui'; import { openModal } from '@src/redux/features/comn/message/messageSlice'; -import { FaAngleDown, FaAngleUp } from 'react-icons/fa'; -import { Form, Input, Table, Typography } from 'antd'; +import { Form, Input, Select, Table } from 'antd'; import { updateLaancAprv, getLaancAprvList, @@ -13,6 +12,11 @@ import { ERROR_MESSAGE, ERROR_TITLE } from '@src/configs/msgConst'; import OperationModal from './OperationModal'; import ScrollContainer from 'react-indiana-drag-scroll'; import OperationCheckBoxModal from './OperationCheckBoxModal'; +import { + CityCategories, + DistrictCategories, + FlightCategory +} from '@configs/constants'; export default function OperationApprovalsTable(props) { const dispatch = useDispatch(); @@ -54,6 +58,7 @@ export default function OperationApprovalsTable(props) { // 유효성 기체 데이터 const [validData, setValidData] = useState(); + const [reviewedTypeValue, setReviewedTypeValue] = useState(''); useEffect(() => { let approvalCdValue = { S: 0, F: 0, C: 0, U: 0 }; @@ -448,10 +453,46 @@ export default function OperationApprovalsTable(props) { dataIndex: 'reviewedType', align: 'center', width: '130px', - render: reviewedType => { + render: (reviewedType, record) => { + const handleMouseDown = e => { + e.stopPropagation(); // 이벤트 전파 중지 + }; return ( <> - <>{handlerReviewed(reviewedType, 'operation')} + + + {/* <>{handlerReviewed(reviewedType, 'operation')} */} ); } @@ -533,6 +574,29 @@ export default function OperationApprovalsTable(props) { }; }); + const updateReviewedType = async (value, planAreaSno) => { + console.log('>>', planAreaSno); + + try { + await dispatch( + updateLaancAprvReview({ + planAreaSnoList: [planAreaSno], + reviewedType: value + }) + ); + props.handlerSearch( + props.filterId, + { startDate: props.startDate, endDate: props.endDate }, + props.filterArea + ); + } catch (error) { + return handlerErrorModal( + '검토 실패', + '검토를 요청을 실패하였습니다. 다시 시도해주세요.', + false + ); + } + }; const handleSave = async row => { try { const updateRes = await dispatch( diff --git a/src/configs/constants.ts b/src/configs/constants.ts index 55fb2364..631dbe80 100644 --- a/src/configs/constants.ts +++ b/src/configs/constants.ts @@ -237,20 +237,22 @@ export type DistrictCategory = // 비행 확인 상태 export const FlightCategory = { Control: { - 전체: '전체', + 완료: '완료', 검토완료: '검토완료', - 검토요청: '검토요청', - 검토재요청: '검토재요청', - 요청반려: '요청반려' + 검토대기: '검토대기', + 재검토: '재검토', + 검토취소: '검토취소', + 요청처리: '요청처리' }, Operation: { 전체: '전체', - 검토완료: '검토완료', + 완료: '완료', 검토요청: '검토요청', - 검토재요청: '검토재요청', - 검토대기: '검토대기', - 검토불필요: '검토불필요', - 검토요청취소: '검토요청취소' + 재검토요청: '재검토요청', + 대기: '대기', + 불필요: '불필요', + 검토요청취소: '검토요청취소', + 검토요청처리: '검토요청처리' } }; diff --git a/src/containers/flight/OperationApprovalsContainer.js b/src/containers/flight/OperationApprovalsContainer.js index 8b384dc6..0b5e80a3 100644 --- a/src/containers/flight/OperationApprovalsContainer.js +++ b/src/containers/flight/OperationApprovalsContainer.js @@ -275,18 +275,20 @@ export default function OperationApprovalsContainer({ mode }) { const checkSearch = text => { switch (text) { - case '검토완료': + case '완료': return 'R'; - case '검토재요청': + case '재검토요청': return 'A'; - case '검토대기': + case '대기': return 'W'; - case '검토불필요': + case '불필요': return 'U'; case '검토요청': return 'Q'; case '검토요청취소': return 'C'; + case '검토요청처리': + return 'S'; } }; const handlerSearch = (search, searchDate, filterArea) => {