|
|
|
@ -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')}</> |
|
|
|
|
<Select |
|
|
|
|
type='select' |
|
|
|
|
id='reviewedType' |
|
|
|
|
style={{ |
|
|
|
|
width: 100 |
|
|
|
|
}} |
|
|
|
|
value={reviewedType} |
|
|
|
|
onClick={handleMouseDown} |
|
|
|
|
onChange={e => updateReviewedType(e, record.planAreaSno)} |
|
|
|
|
> |
|
|
|
|
<option key={1} value={'W'}> |
|
|
|
|
대기 |
|
|
|
|
</option> |
|
|
|
|
<option key={2} value={'U'}> |
|
|
|
|
불필요 |
|
|
|
|
</option> |
|
|
|
|
<option key={3} value={'Q'}> |
|
|
|
|
검토 요청 |
|
|
|
|
</option> |
|
|
|
|
<option key={4} value={'C'}> |
|
|
|
|
검토요청취소 |
|
|
|
|
</option> |
|
|
|
|
<option key={5} value={'S'}> |
|
|
|
|
검토요청처리 |
|
|
|
|
</option> |
|
|
|
|
<option key={6} value={'A'}> |
|
|
|
|
재검토요청 |
|
|
|
|
</option> |
|
|
|
|
<option key={7} value={'R'}> |
|
|
|
|
완료 |
|
|
|
|
</option> |
|
|
|
|
</Select> |
|
|
|
|
|
|
|
|
|
{/* <>{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( |
|
|
|
|