Browse Source

feat/검토대기 모달 추가

master
sanguu516 3 weeks ago
parent
commit
97f00b13bb
  1. 27
      src/components/flight/ControlApprovalsTable.js
  2. 1
      src/components/flight/NewFlightApprovalsReport.js

27
src/components/flight/ControlApprovalsTable.js

@ -12,6 +12,7 @@ import {
getLaancAprvList, getLaancAprvList,
updateLaancCAprvReview updateLaancCAprvReview
} from '@src/redux/features/laanc/laancThunk'; } from '@src/redux/features/laanc/laancThunk';
import { ConfirmModal } from '@component/modal/ConfirmModal';
import { ERROR_MESSAGE, ERROR_TITLE } from '@src/configs/msgConst'; import { ERROR_MESSAGE, ERROR_TITLE } from '@src/configs/msgConst';
import ScrollContainer from 'react-indiana-drag-scroll'; import ScrollContainer from 'react-indiana-drag-scroll';
@ -37,7 +38,11 @@ export default function ControlApprovalsTable(props) {
const [editingKey, setEditingKey] = useState(''); const [editingKey, setEditingKey] = useState('');
const [form] = Form.useForm(); const [form] = Form.useForm();
const [modal, setModal] = useState({
isOpen: false,
title: '',
desc: ''
});
// 체크박스 선택 // 체크박스 선택
const [checkList, setCheckList] = useState([]); const [checkList, setCheckList] = useState([]);
@ -70,6 +75,8 @@ export default function ControlApprovalsTable(props) {
} }
}, [laancAprvList]); }, [laancAprvList]);
const [currentPlanAreaSno, setCurrentPlanAreaSno] = useState(null);
// input 수정 컴포넌트 // input 수정 컴포넌트
const EditableCell = ({ const EditableCell = ({
editable, editable,
@ -475,14 +482,20 @@ export default function ControlApprovalsTable(props) {
if (reviewedProcType === 'S') { if (reviewedProcType === 'S') {
reviewedProcType = 'Q'; reviewedProcType = 'Q';
} }
return ( return (
<> <>
{reviewedProcType === 'W' ? ( {reviewedProcType === 'W' ? (
<Button <Button
color='flat-dark' color='flat-dark'
onClick={e => { onClick={e => {
setCurrentPlanAreaSno(record.planAreaSno); // record.planAreaSno 값을 상태에 저장
setModal({
isOpen: true,
title: '관제통신과 검토',
desc: '검토완료 하시겠습니까?'
});
e.stopPropagation(); e.stopPropagation();
updateReviewedType('P', record.planAreaSno);
}} }}
> >
{reviewedProcType === 'W' ? '검토대기' : '검토완료'} {reviewedProcType === 'W' ? '검토대기' : '검토완료'}
@ -970,6 +983,16 @@ export default function ControlApprovalsTable(props) {
</Form> </Form>
</div> </div>
</ScrollContainer> </ScrollContainer>
{modal && (
<ConfirmModal
modal={modal}
setModal={setModal}
handlerConfirm={() =>
updateReviewedType('P', currentPlanAreaSno)
}
color='primary'
/>
)}
</Form> </Form>
) : ( ) : (
<div <div

1
src/components/flight/NewFlightApprovalsReport.js

@ -293,7 +293,6 @@ export default function NewFlightApprovalsReport(props) {
<Button <Button
color='primary' color='primary'
onClick={() => { onClick={() => {
console.log(searchDate);
props.handlerSearch( props.handlerSearch(
props.filterId, props.filterId,
searchDate, searchDate,

Loading…
Cancel
Save