diff --git a/src/components/laanc/step/LaancStep1.js b/src/components/laanc/step/LaancStep1.js
index b0b57fe2..f26a4e15 100644
--- a/src/components/laanc/step/LaancStep1.js
+++ b/src/components/laanc/step/LaancStep1.js
@@ -706,14 +706,18 @@ export default function LaancStep1({
placeholder=''
>
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -724,8 +728,8 @@ export default function LaancStep1({
{
const { name, value } = e.target;
@@ -735,10 +739,10 @@ export default function LaancStep1({
value
});
}}
- value={data.areaList[0].selffltMethod}
+ value={data.areaList[0].fltMothoeRm}
placeholder='직접입력 선택 후 활성화'
disabled={
- data.areaList[0].fltMethod === '직접입력' ? false : true
+ data.areaList[0].fltMethod === '00' ? false : true
}
/>
diff --git a/src/containers/laanc/LaancPlanContainer.js b/src/containers/laanc/LaancPlanContainer.js
index 96238ea6..958d2cd7 100644
--- a/src/containers/laanc/LaancPlanContainer.js
+++ b/src/containers/laanc/LaancPlanContainer.js
@@ -30,7 +30,6 @@ export default function LaancPlanContainer({
const [step, setStep] = useState(1);
const [detailData, setDetailData] = useState(initFlightBas.initDetail);
- const [finalDetailData, setFinalDetailData] = useState({});
const [centeredModal, setCenteredModal] = useState(false);
const [isErrorModal, setIsErrorModal] = useState({
isOpen: false,
@@ -95,13 +94,6 @@ export default function LaancPlanContainer({
}
}, [[laancElev]]);
- //비행 방식 직접 입력칸 작성 시 api 호출 부분
- useEffect(() => {
- if (Object.getOwnPropertyNames(finalDetailData).length != 0) {
- dispatch(LaancAction.LAANC_FLIGHT_Approval.request(finalDetailData));
- }
- }, [finalDetailData]);
-
// laanc 승인 api 200 시 step 이동
const handlerLaanc = async () => {
if (laancArea && laancElev[0]) {
@@ -222,7 +214,7 @@ export default function LaancPlanContainer({
const updateData = {
...prevState[arrName][0],
[name]: value,
- selffltMethod: ''
+ fltMothoeRm: ''
};
arr[0] = updateData;
return {
@@ -411,6 +403,17 @@ export default function LaancPlanContainer({
desc: '비행방식를 입력해 주세요.'
});
+ return false;
+ } else if (
+ detailData.areaList[0].fltMethod === '00' &&
+ !detailData.areaList[0].fltMothoeRm
+ ) {
+ // 비행 방식 직접 입력칸 활성화 후 작성 시 조건문
+ setIsErrorModal({
+ isOpen: true,
+ title: '필수값 입력 오류',
+ desc: '비행방식을 입력해 주세요.'
+ });
return false;
} else if (validateAircraftWeightCode) {
setIsErrorModal({
@@ -427,17 +430,6 @@ export default function LaancPlanContainer({
desc: '기체 신고 번호를 입력해 주세요.'
});
return false;
- } else if (detailData.areaList[0].selffltMethod) {
- // 비행 방식 직접 입력칸 활성화 후 작성 시 조건문
- setFinalDetailData({
- ...detailData,
- areaList: [
- {
- ...detailData.areaList[0],
- fltMethod: detailData.areaList[0].selffltMethod
- }
- ]
- });
} else {
handlerLaanc();
}
diff --git a/src/modules/laanc/models/laancModels.ts b/src/modules/laanc/models/laancModels.ts
index 5c0b28b6..856e5cf9 100644
--- a/src/modules/laanc/models/laancModels.ts
+++ b/src/modules/laanc/models/laancModels.ts
@@ -92,7 +92,7 @@ export const LaancFlightData = {
planSno: 0,
areaType: '',
fltMethod: '',
- selffltMethod: '',
+ fltMothoeRm: '',
bufferZone: 0,
concatBufferZone: 0,
fltElev: 0,
@@ -137,7 +137,7 @@ export const LaancFlightData = {
planSno: 0,
areaType: '',
fltMethod: '',
- selffltMethod: '',
+ fltMothoeRm: '',
bufferZone: 0,
concatBufferZone: 0,
fltElev: 0,
@@ -290,7 +290,7 @@ export interface FlightPlanAreaData {
bufferZone: number;
concatBufferZone: number;
fltElev: number;
- selffltMethod: string;
+ fltMothoeRm: string;
createUserId?: string;
createDt?: string;
updateUserId?: string;
@@ -408,7 +408,7 @@ export const laancControlData = {
planSno: 0,
areaType: '',
fltMethod: '',
- selffltMethod: '',
+ fltMothoeRm: '',
bufferZone: 0,
concatBufferZone: 0,
fltElev: 0,
@@ -519,7 +519,7 @@ export const initFlightBas = {
planSno: 0,
areaType: '',
fltMethod: '',
- selffltMethod: '',
+ fltMothoeRm: '',
bufferZone: 0,
concatBufferZone: 0,
fltElev: 0,
@@ -564,7 +564,7 @@ export const initFlightBas = {
planSno: 0,
areaType: '',
fltMethod: '',
- selffltMethod: '',
+ fltMothoeRm: '',
bufferZone: 0,
concatBufferZone: 0,
fltElev: 0,