|
|
@ -30,7 +30,6 @@ export default function LaancPlanContainer({ |
|
|
|
|
|
|
|
|
|
|
|
const [step, setStep] = useState(1); |
|
|
|
const [step, setStep] = useState(1); |
|
|
|
const [detailData, setDetailData] = useState(initFlightBas.initDetail); |
|
|
|
const [detailData, setDetailData] = useState(initFlightBas.initDetail); |
|
|
|
const [finalDetailData, setFinalDetailData] = useState({}); |
|
|
|
|
|
|
|
const [centeredModal, setCenteredModal] = useState(false); |
|
|
|
const [centeredModal, setCenteredModal] = useState(false); |
|
|
|
const [isErrorModal, setIsErrorModal] = useState({ |
|
|
|
const [isErrorModal, setIsErrorModal] = useState({ |
|
|
|
isOpen: false, |
|
|
|
isOpen: false, |
|
|
@ -95,13 +94,6 @@ export default function LaancPlanContainer({ |
|
|
|
} |
|
|
|
} |
|
|
|
}, [[laancElev]]); |
|
|
|
}, [[laancElev]]); |
|
|
|
|
|
|
|
|
|
|
|
//비행 방식 직접 입력칸 작성 시 api 호출 부분
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
|
|
|
if (Object.getOwnPropertyNames(finalDetailData).length != 0) { |
|
|
|
|
|
|
|
dispatch(LaancAction.LAANC_FLIGHT_Approval.request(finalDetailData)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, [finalDetailData]); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// laanc 승인 api 200 시 step 이동
|
|
|
|
// laanc 승인 api 200 시 step 이동
|
|
|
|
const handlerLaanc = async () => { |
|
|
|
const handlerLaanc = async () => { |
|
|
|
if (laancArea && laancElev[0]) { |
|
|
|
if (laancArea && laancElev[0]) { |
|
|
@ -222,7 +214,7 @@ export default function LaancPlanContainer({ |
|
|
|
const updateData = { |
|
|
|
const updateData = { |
|
|
|
...prevState[arrName][0], |
|
|
|
...prevState[arrName][0], |
|
|
|
[name]: value, |
|
|
|
[name]: value, |
|
|
|
selffltMethod: '' |
|
|
|
fltMothoeRm: '' |
|
|
|
}; |
|
|
|
}; |
|
|
|
arr[0] = updateData; |
|
|
|
arr[0] = updateData; |
|
|
|
return { |
|
|
|
return { |
|
|
@ -411,6 +403,17 @@ export default function LaancPlanContainer({ |
|
|
|
desc: '비행방식를 입력해 주세요.' |
|
|
|
desc: '비행방식를 입력해 주세요.' |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} else if ( |
|
|
|
|
|
|
|
detailData.areaList[0].fltMethod === '00' && |
|
|
|
|
|
|
|
!detailData.areaList[0].fltMothoeRm |
|
|
|
|
|
|
|
) { |
|
|
|
|
|
|
|
// 비행 방식 직접 입력칸 활성화 후 작성 시 조건문
|
|
|
|
|
|
|
|
setIsErrorModal({ |
|
|
|
|
|
|
|
isOpen: true, |
|
|
|
|
|
|
|
title: '필수값 입력 오류', |
|
|
|
|
|
|
|
desc: '비행방식을 입력해 주세요.' |
|
|
|
|
|
|
|
}); |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} else if (validateAircraftWeightCode) { |
|
|
|
} else if (validateAircraftWeightCode) { |
|
|
|
setIsErrorModal({ |
|
|
|
setIsErrorModal({ |
|
|
@ -427,17 +430,6 @@ export default function LaancPlanContainer({ |
|
|
|
desc: '기체 신고 번호를 입력해 주세요.' |
|
|
|
desc: '기체 신고 번호를 입력해 주세요.' |
|
|
|
}); |
|
|
|
}); |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} else if (detailData.areaList[0].selffltMethod) { |
|
|
|
|
|
|
|
// 비행 방식 직접 입력칸 활성화 후 작성 시 조건문
|
|
|
|
|
|
|
|
setFinalDetailData({ |
|
|
|
|
|
|
|
...detailData, |
|
|
|
|
|
|
|
areaList: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
...detailData.areaList[0], |
|
|
|
|
|
|
|
fltMethod: detailData.areaList[0].selffltMethod |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
handlerLaanc(); |
|
|
|
handlerLaanc(); |
|
|
|
} |
|
|
|
} |
|
|
|