|
|
@ -379,7 +379,9 @@ const FlightPlanDetailContainer = () => { |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
useEffect(()=>{ |
|
|
|
|
|
|
|
console.log(detailData); |
|
|
|
|
|
|
|
},[detailData]) |
|
|
|
// 저장
|
|
|
|
// 저장
|
|
|
|
const handleSave = () => { |
|
|
|
const handleSave = () => { |
|
|
|
|
|
|
|
|
|
|
@ -389,6 +391,8 @@ const FlightPlanDetailContainer = () => { |
|
|
|
title: '필수값 입력 오류', |
|
|
|
title: '필수값 입력 오류', |
|
|
|
desc: '이름을 입력해주세요.' |
|
|
|
desc: '이름을 입력해주세요.' |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
else if (!detailData.hpno) { |
|
|
|
else if (!detailData.hpno) { |
|
|
|
setModal2({ |
|
|
|
setModal2({ |
|
|
@ -396,6 +400,8 @@ const FlightPlanDetailContainer = () => { |
|
|
|
title: '필수값 입력 오류', |
|
|
|
title: '필수값 입력 오류', |
|
|
|
desc: '전화번호를 입력해주세요.' |
|
|
|
desc: '전화번호를 입력해주세요.' |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
else if(!detailData.email){ |
|
|
|
else if(!detailData.email){ |
|
|
|
setModal2({ |
|
|
|
setModal2({ |
|
|
@ -403,6 +409,8 @@ const FlightPlanDetailContainer = () => { |
|
|
|
title: '필수값 입력 오류', |
|
|
|
title: '필수값 입력 오류', |
|
|
|
desc: '이메일을 입력해주세요.' |
|
|
|
desc: '이메일을 입력해주세요.' |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
else if (!detailData.areaList[0].coordList[0].lat) { |
|
|
|
else if (!detailData.areaList[0].coordList[0].lat) { |
|
|
|
setModal2({ |
|
|
|
setModal2({ |
|
|
@ -410,6 +418,8 @@ const FlightPlanDetailContainer = () => { |
|
|
|
title: '필수값 입력 오류', |
|
|
|
title: '필수값 입력 오류', |
|
|
|
desc: '좌표를 선택해주세요.' |
|
|
|
desc: '좌표를 선택해주세요.' |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
else if (!detailData.areaList[0].fltElev) { |
|
|
|
else if (!detailData.areaList[0].fltElev) { |
|
|
|
setModal2({ |
|
|
|
setModal2({ |
|
|
@ -417,6 +427,8 @@ const FlightPlanDetailContainer = () => { |
|
|
|
title: '필수값 입력 오류', |
|
|
|
title: '필수값 입력 오류', |
|
|
|
desc: '반경/고도를 입력해주세요.' |
|
|
|
desc: '반경/고도를 입력해주세요.' |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
else if (!detailData.areaList[0].fltMethod) { |
|
|
|
else if (!detailData.areaList[0].fltMethod) { |
|
|
|
setModal2({ |
|
|
|
setModal2({ |
|
|
@ -424,6 +436,8 @@ const FlightPlanDetailContainer = () => { |
|
|
|
title: '필수값 입력 오류', |
|
|
|
title: '필수값 입력 오류', |
|
|
|
desc: '비행방식를 입력해주세요.' |
|
|
|
desc: '비행방식를 입력해주세요.' |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
else if (!detailData.pilotList[0].groupNm) { |
|
|
|
else if (!detailData.pilotList[0].groupNm) { |
|
|
|
setModal2({ |
|
|
|
setModal2({ |
|
|
@ -431,6 +445,8 @@ const FlightPlanDetailContainer = () => { |
|
|
|
title: '필수값 입력 오류', |
|
|
|
title: '필수값 입력 오류', |
|
|
|
desc: '조종사를 선택해주세요.' |
|
|
|
desc: '조종사를 선택해주세요.' |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
else if (!detailData.arcrftList[0].groupNm) { |
|
|
|
else if (!detailData.arcrftList[0].groupNm) { |
|
|
|
setModal2({ |
|
|
|
setModal2({ |
|
|
@ -438,8 +454,11 @@ const FlightPlanDetailContainer = () => { |
|
|
|
title: '필수값 입력 오류', |
|
|
|
title: '필수값 입력 오류', |
|
|
|
desc: '기체를 선택해주세요.' |
|
|
|
desc: '기체를 선택해주세요.' |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
else if (!detailData.planSno[0]) { |
|
|
|
|
|
|
|
|
|
|
|
if (!detailData.planSno) { |
|
|
|
dispatch(Actions.FLIGHT_PLAN_CREATE.request(detailData)); |
|
|
|
dispatch(Actions.FLIGHT_PLAN_CREATE.request(detailData)); |
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
dispatch(Actions.FLIGHT_PLAN_UPDATE.request(detailData)); |
|
|
|
dispatch(Actions.FLIGHT_PLAN_UPDATE.request(detailData)); |
|
|
|