diff --git a/src/components/flight/ControlApprovalsTable.js b/src/components/flight/ControlApprovalsTable.js
index e20d9ae5..4ff7ccb1 100644
--- a/src/components/flight/ControlApprovalsTable.js
+++ b/src/components/flight/ControlApprovalsTable.js
@@ -41,7 +41,9 @@ export default function ControlApprovalsTable(props) {
const [modal, setModal] = useState({
isOpen: false,
title: '',
- desc: ''
+ desc: '',
+ type: '',
+ row: {}
});
// 체크박스 선택
const [checkList, setCheckList] = useState([]);
@@ -91,7 +93,13 @@ export default function ControlApprovalsTable(props) {
try {
const values = await form.validateFields();
- handleSave({ ...record, ...values });
+ setModal({
+ isOpen: true,
+ title: '수정 확인',
+ desc: '데이터를 수정하시겠습니까?',
+ type: 'edit',
+ row: { ...record, ...values }
+ });
} catch (errInfo) {}
};
@@ -113,58 +121,6 @@ export default function ControlApprovalsTable(props) {
return
-
+
props.setLimitZoneNm(e.target.value)}
onKeyPress={handleKeyDown}
+ value={props.limitZoneNm}
>
- {props.approvalCd.map(item => (
-
- ))}
+
+
+
@@ -296,7 +295,8 @@ export default function NewFlightApprovalsReport(props) {
props.handlerSearch(
props.filterId,
searchDate,
- props.filterArea
+ props.filterArea,
+ props.limitZoneNm
);
}}
size='sm'
diff --git a/src/components/flight/OperationApprovalsTable.js b/src/components/flight/OperationApprovalsTable.js
index 616f0e41..70c42738 100644
--- a/src/components/flight/OperationApprovalsTable.js
+++ b/src/components/flight/OperationApprovalsTable.js
@@ -15,7 +15,8 @@ import OperationCheckBoxModal from './OperationCheckBoxModal';
import {
CityCategories,
DistrictCategories,
- FlightCategory
+ FlightCategory,
+ limitZoneNmCategories
} from '@configs/constants';
export default function OperationApprovalsTable(props) {
diff --git a/src/containers/flight/ControlApprovalsContainer.js b/src/containers/flight/ControlApprovalsContainer.js
index 685d983e..8e61f7e9 100644
--- a/src/containers/flight/ControlApprovalsContainer.js
+++ b/src/containers/flight/ControlApprovalsContainer.js
@@ -64,13 +64,7 @@ export default function ControlApprovalsContainer({ mode }) {
const [reviewedType, setReviewedType] = useState('전체');
const [reviewedProcType, setReviewedProcType] = useState('전체');
- const [approvalCd, setApprovalCd] = useState([
- { name: '전체', value: '', select: false },
- { name: '승인', value: 'S', select: false },
- { name: '미 승인', value: 'F', select: false },
- { name: '비 대상', value: 'U', select: false },
- { name: '조건부 승인', value: 'C', select: false }
- ]);
+ const [limitZoneNm, setLimitZoneNm] = useState('');
// 지역
const [filterArea, setFilterArea] = useState({
@@ -235,7 +229,7 @@ export default function ControlApprovalsContainer({ mode }) {
setPopup(popupRef.current);
};
- const handlerSearch = (search, searchDate, filterArea) => {
+ const handlerSearch = (search, searchDate, filterArea, limitZoneNm) => {
setStartDate(searchDate.startDate);
setEndDate(searchDate.endDate);
@@ -246,13 +240,11 @@ export default function ControlApprovalsContainer({ mode }) {
ctprvn: filterArea.ctprvn === '전체' ? '' : filterArea.ctprvn,
sig: filterArea.sig === '전체' ? '' : filterArea.sig,
address: filterArea.address,
+ limitZoneCd: limitZoneNm === '전체' ? '' : limitZoneNm,
...(search !== '' ? { applyNo: search } : {}),
...(reviewedType !== '전체' ? { reviewedType: reviewedType } : {}),
...(reviewedProcType !== '전체'
? { reviewedProcType: reviewedProcType }
- : {}),
- ...(approvalCd.filter(i => i.select).length > 0
- ? { approvalCd: approvalCd.filter(i => i.select)[0].value }
: {})
})
);
@@ -555,30 +547,6 @@ export default function ControlApprovalsContainer({ mode }) {
}
};
- const handlerApprovalCd = ({ target: { value } }) => {
- setApprovalCd(
- approvalCd.map(i => {
- if (!value) {
- return {
- ...i,
- select: false
- };
- } else {
- if (i.value === value) {
- return {
- ...i,
- select: true
- };
- }
- return {
- ...i,
- select: false
- };
- }
- })
- );
- };
-
const handlerLogout = async () => {
const { payload } = await dispatch(setLogout());
@@ -812,8 +780,8 @@ export default function ControlApprovalsContainer({ mode }) {
reviewedType={reviewedType}
reviewedProcType={reviewedProcType}
setReviewedProcType={setReviewedProcType}
- approvalCd={approvalCd}
- handlerApprovalCd={handlerApprovalCd}
+ limitZoneNm={limitZoneNm}
+ setLimitZoneNm={setLimitZoneNm}
pageName='control'
/>
{
+ const handlerSearch = (search, searchDate, filterArea, limitZoneNm) => {
setStartDate(searchDate.startDate);
setEndDate(searchDate.endDate);
@@ -289,13 +282,11 @@ export default function OperationApprovalsContainer({ mode }) {
ctprvn: filterArea.ctprvn === '전체' ? '' : filterArea.ctprvn,
sig: filterArea.sig === '전체' ? '' : filterArea.sig,
address: filterArea.address,
+ limitZoneCd: limitZoneNm === '전체' ? '' : limitZoneNm,
...(search !== '' ? { applyNo: search } : {}),
...(reviewedType !== '전체' ? { reviewedType: reviewedType } : {}),
...(reviewedProcType !== '전체'
? { reviewedProcType: reviewedProcType }
- : {}),
- ...(approvalCd.filter(i => i.select).length > 0
- ? { approvalCd: approvalCd.filter(i => i.select)[0].value }
: {})
})
);
@@ -672,30 +663,6 @@ export default function OperationApprovalsContainer({ mode }) {
}
};
- const handlerApprovalCd = ({ target: { value } }) => {
- setApprovalCd(
- approvalCd.map(i => {
- if (!value) {
- return {
- ...i,
- select: false
- };
- } else {
- if (i.value === value) {
- return {
- ...i,
- select: true
- };
- }
- return {
- ...i,
- select: false
- };
- }
- })
- );
- };
-
const handlerLogout = async () => {
const { payload } = await dispatch(setLogout());
@@ -944,10 +911,10 @@ export default function OperationApprovalsContainer({ mode }) {
setFilterArea={setFilterArea}
setReviewedType={setReviewedType}
reviewedType={reviewedType}
- approvalCd={approvalCd}
reviewedProcType={reviewedProcType}
setReviewedProcType={setReviewedProcType}
- handlerApprovalCd={handlerApprovalCd}
+ limitZoneNm={limitZoneNm}
+ setLimitZoneNm={setLimitZoneNm}
pageName='operation'
/>