diff --git a/src/components/laanc/map/LaancDrawControl.js b/src/components/laanc/map/LaancDrawControl.js index b6e3010..ea6dddc 100644 --- a/src/components/laanc/map/LaancDrawControl.js +++ b/src/components/laanc/map/LaancDrawControl.js @@ -1,5 +1,6 @@ import { useEffect, useState } from 'react'; import { InfoModal } from '../../modal/InfoModal'; +import { ErrorModal } from '../../modal/ErrorModal'; import { useDispatch, useSelector } from 'react-redux'; import { CalculateDistance, @@ -14,7 +15,6 @@ import { drawTypeChangeAction } from '../../../modules/control/map/actions/contr import MapboxDraw from '@mapbox/mapbox-gl-draw'; import { CircleMode } from 'mapbox-gl-draw-circle'; import axios from '../../../modules/utils/customAxiosUtil'; -import * as LaancAction from '../../../modules/laanc/actions/laancActions'; export const LaancDrawControl = props => { const dispatch = useDispatch(); @@ -33,6 +33,11 @@ export const LaancDrawControl = props => { title: '', desc: '' }); + const [isErrorModal, setIsErrorModal] = useState({ + isOpen: false, + title: '', + desc: '' + }); useEffect(() => { const areaType = props.areaCoordList[0].areaType; @@ -77,8 +82,6 @@ export const LaancDrawControl = props => { // 클릭할 때마다 마커 찍어줌 const handlerCustomOnClick = (state, e) => { - console.log('click'); - const mode = handlerReturnMode(drawObj.getMode()); const obj = state[mode?.toLowerCase()]; @@ -115,7 +118,6 @@ export const LaancDrawControl = props => { // 도형 그리기 완료 시 const handlerFinishDraw = state => { - console.log('finish'); const mode = handlerReturnMode(drawObj.getMode()); const pointLength = state.currentVertexPosition; if (pointLength > 0) { @@ -206,7 +208,7 @@ export const LaancDrawControl = props => { let isBreak = false; // 비행금지 구역 체크 - console.log('unableElev'); + try { const elev1 = await axios.post(`api/bas/laanc/valid/elev`, areaList); props.handlerSaveElev(elev1.data); @@ -230,7 +232,13 @@ export const LaancDrawControl = props => { if (elev1.data[0] === 0 || elev2.length > 0) isBreak = true; } catch (error) { - alert('에러 발생'); + { + setIsErrorModal({ + isOpen: true, + title: '오류', + desc: '처리중 오류가 발생하였습니다' + }); + } return; } @@ -253,7 +261,6 @@ export const LaancDrawControl = props => { } // 비가시권 체크 - console.log('specialFlight'); let text = ''; if (mode === 'CIRCLE') { if (data.radius > 1000) { @@ -300,8 +307,6 @@ export const LaancDrawControl = props => { // 도형 수정 시 const handlerUpdateSetting = e => { - console.log('update'); - if (e.features[0]) { const { geometry, properties, id } = e.features[0]; const mode = properties.id; @@ -376,8 +381,6 @@ export const LaancDrawControl = props => { // 정상 좌표 처리 const handlerSaveData = areaInfo => { - console.log('ok!!!'); - props.handlerCoordinates(areaInfo); setIsDrawDone(true); @@ -400,7 +403,6 @@ export const LaancDrawControl = props => { alert('에러 발생. 다시 시도해 주세요.'); return; } - console.log('settingeAreaInfo'); const areaInfo = { coordinates: [], @@ -467,7 +469,6 @@ export const LaancDrawControl = props => { const paths = []; area.coordList.forEach(coord => paths.push([coord.lon, coord.lat])); if (area.areaType) { - console.log('pastDraw', area); if (area.areaType === 'CIRCLE') { } else { let objId = ''; @@ -550,7 +551,6 @@ export const LaancDrawControl = props => { const paths = []; area.coordList.forEach(coord => paths.push([coord.lon, coord.lat])); if (area.areaType) { - console.log('ReDraw', area); if (area.areaType === 'CIRCLE') { const center = paths[0]; const km = area.bufferZone / 1000; @@ -676,7 +676,6 @@ export const LaancDrawControl = props => { }; const handlerStartMode = mode => { - console.log('startMode'); if (mode === 'LINE') { drawObj.changeMode('draw_line_string'); } else if (mode === 'POLYGON') { @@ -686,5 +685,10 @@ export const LaancDrawControl = props => { } }; - return ; + return ( + <> + + + + ); }; diff --git a/src/components/laanc/map/LaancMapSearch.js b/src/components/laanc/map/LaancMapSearch.js index c2fe632..8ec4b9d 100644 --- a/src/components/laanc/map/LaancMapSearch.js +++ b/src/components/laanc/map/LaancMapSearch.js @@ -63,7 +63,7 @@ export default function LaancMapSearch({ mapObject }) { type='text' id='searchInput' name='searchInput' - size='sm' + bsSize='sm' autoComplete='off' placeholder='검색명을 입력하세요.' onChange={handlerSearchChange} diff --git a/src/components/laanc/step/LaacnStep3.js b/src/components/laanc/step/LaacnStep3.js index 8db5170..a08aee6 100644 --- a/src/components/laanc/step/LaacnStep3.js +++ b/src/components/laanc/step/LaacnStep3.js @@ -215,7 +215,10 @@ export default function LaacnStep3({
  • 비행승인 고도체계는 AGL을 기준으로 합니다.
  • 특별비행신청은 운영정책상 받고있지 않습니다.
  • -
  • 확인이 필요할 경우 조종자님의 휴대전화로 연락이 갈 수 있습니다.
  • +
  • + 확인이 필요할 경우 조종자님의 휴대전화로 연락이 갈 수 + 있습니다. +
  • 승인은 한번에 한 대의 기체만 가능합니다.
  • diff --git a/src/components/laanc/step/LaancStep1.js b/src/components/laanc/step/LaancStep1.js index 6d9aa82..200c310 100644 --- a/src/components/laanc/step/LaancStep1.js +++ b/src/components/laanc/step/LaancStep1.js @@ -2,9 +2,10 @@ import React, { useEffect, useState, useRef } from 'react'; import { useLocation } from 'react-router-dom'; import { useDispatch, useSelector } from 'react-redux'; import Flatpickr from 'react-flatpickr'; -import * as LaancAction from '../../../modules/laanc/actions/laancActions'; import '@styles/react/libs/flatpickr/flatpickr.scss'; +import * as LaancAction from '../../../modules/laanc/actions/laancActions'; import { AlertCircle, Info } from 'react-feather'; +import FlightArea from '../map/FlightArea'; import { ErrorModal } from '../../modal/ErrorModal'; import { InfoModal } from '../../modal/InfoModal'; import { LaancModal } from '../LaancModal'; @@ -22,7 +23,6 @@ import { Label, Input } from 'reactstrap'; -import FlightArea from '../map/FlightArea'; export default function LaancStep1({ handleChange, @@ -96,10 +96,11 @@ export default function LaancStep1({ fltElevRef.current && type === 'fltElev' && data.areaList[0].coordList[0].lat != 0; + if (drawFlightZone) { const input = fltElevRef.current; - const inputValue = input.value; + input.setSelectionRange(inputValue.length - 1, inputValue.length - 1); input.focus(); } else if (data.areaList[0].coordList[0].lat === 0) { @@ -116,6 +117,7 @@ export default function LaancStep1({ if (bufferZoneRef.current && type === 'bufferZone') { const input = bufferZoneRef.current; const inputValue = input.value; + input.setSelectionRange(inputValue.length - 1, inputValue.length - 1); input.focus(); } @@ -246,6 +248,12 @@ export default function LaancStep1({ url: 'https://drone.onestop.go.kr/introduce/systemintro3 ' }); } + + // handleChange({ + // type: 'area', + // name: 'bufferZone', + // value: value + // }); } }; @@ -290,7 +298,7 @@ export default function LaancStep1({ type='text' id='memberName' name='memberName' - size='sm' + bsSize='sm' placeholder='' value={user?.memberName} disabled @@ -326,7 +334,7 @@ export default function LaancStep1({ { const { name, value } = e.target; handleChange({ @@ -590,7 +598,17 @@ export default function LaancStep1({
    비행 구역 정보 -
    @@ -606,7 +624,7 @@ export default function LaancStep1({ name='fltElev' // defaultValue={data.email || ''} value={data.areaList[0].fltElev + 'm'} - size='sm' + bsSize='sm' onBlur={e => handleBlur(e.target.value, 'fltElev')} onChange={e => { const { name, value } = e.target; @@ -637,7 +655,7 @@ export default function LaancStep1({ name='bufferZone' // defaultValue={data.email || ''} value={data.areaList[0].bufferZone + 'm'} - size='sm' + bsSize='sm' onChange={e => { const { name, value } = e.target; handleChange({ @@ -648,6 +666,9 @@ export default function LaancStep1({ .replace(/\D/g, '') // 숫자가 아닌 문자 제거 .replace('m') // "m"을 맨 뒤에 붙임 }); + // setConcatBufferzone( + // value.replace(/^0+/, '').replace(/\D/g, '') + // ); }} innerRef={bufferZoneRef} // Input 요소에 ref를 연결 onClick={() => handleInputClick('bufferZone')} @@ -673,7 +694,7 @@ export default function LaancStep1({ name='fltMethod' onBlur={e => handleBlur(e.target.value, 'fltMethod')} value={data.areaList[0].fltMethod} - size='sm' + bsSize='sm' onChange={e => { const { name, value } = e.target; handleChange({ @@ -705,7 +726,7 @@ export default function LaancStep1({ type='text' id='selffltMethod' name='selffltMethod' - size='sm' + bsSize='sm' onChange={e => { const { name, value } = e.target; handleChange({ @@ -736,7 +757,7 @@ export default function LaancStep1({ type='select' id='arcrftWghtCd' name='arcrftWghtCd' - size='sm' + bsSize='sm' placeholder='' value={data.arcrftList[0].arcrftWghtCd} onChange={e => { @@ -772,7 +793,7 @@ export default function LaancStep1({ id='arcrftTypeCd' name='arcrftTypeCd' value={data.arcrftList[0].arcrftTypeCd} - size='sm' + bsSize='sm' onChange={e => { const { name, value } = e.target; handleChange({ @@ -800,7 +821,7 @@ export default function LaancStep1({ id='idntfNum' name='idntfNum' value={data.arcrftList[0].idntfNum} - size='sm' + bsSize='sm' onChange={e => { const { name, value } = e.target; handleChange({ diff --git a/src/components/laanc/step/LaancStep2.js b/src/components/laanc/step/LaancStep2.js index 205deff..c179243 100644 --- a/src/components/laanc/step/LaancStep2.js +++ b/src/components/laanc/step/LaancStep2.js @@ -151,7 +151,7 @@ export default function LaancStep2({ {/*
    - {' '} + {' '} 사전 결과 승인 대상입니다.
    */} @@ -169,7 +169,7 @@ export default function LaancStep2({ type='text' id='memberName' name='memberName' - size='sm' + bsSize='sm' placeholder='' value={user?.memberName} disabled @@ -186,7 +186,7 @@ export default function LaancStep2({ type='text' name='fltType' value={obj.fltType[data.fltType]} - size='sm' + bsSize='sm' id='fltType' disabled /> @@ -242,7 +242,7 @@ export default function LaancStep2({ type='text' id='arcrftWghtCd' name='arcrftWghtCd' - size='sm' + bsSize='sm' value={obj.arcrftWdth[data.arcrftList[0].arcrftWghtCd]} placeholder='' disabled @@ -265,7 +265,7 @@ export default function LaancStep2({ key={index} type='text' id='test' - size='sm' + bsSize='sm' value={`${truncateToSixDecimalPlaces( `${coord.lat}` )} / ${truncateToSixDecimalPlaces(`${coord.lon}`)}`} @@ -286,7 +286,7 @@ export default function LaancStep2({ { + if (detailData.areaList[0].fltElev != 0) { + const maxElev = 150; + const controlledAltitudeExceededWarning = + laancArea?.duplicated && + parseInt( + detailData.areaList[0].fltElev.replace('/^0+/', 'm', ''), + 10 + ) >= laancElev && + parseInt(detailData.areaList[0].fltElev.replace('/^0+/', 'm', ''), 10) < + maxElev; + + if (controlledAltitudeExceededWarning) { + setIsErrorModal({ + isOpen: true, + title: '검토 결과 사전안내', + desc: ( + <> + 유효성 검사에 실패하여 미 승인 대상입니다. +
    + 제출하신 비행계획서의 고도는 {laancElev}m이하에서만 비행이 + 가능합니다. +
    + 고도 설정을 다시 확인해주시기 바랍니다. + + ) + }); + handleChange({ + type: 'area', + name: 'fltElev', + value: 0 + }); + } + } + }, [laancElev]); + //비행 방식 직접 입력칸 작성 시 api 호출 부분 useEffect(() => { if (Object.getOwnPropertyNames(finalDetailData).length != 0) { @@ -65,33 +103,16 @@ export default function LaancPlanContainer({ }, [finalDetailData]); // laanc 승인 api 200 시 step 이동 - const handlerLaanc = () => { - // laanc 필요 없이 날 수 있음 - + const handlerLaanc = async () => { if (laancArea && laancElev) { + // laanc 필요 없이 날 수 있음 const laancNotRequired = !laancArea.duplicated && detailData.fltType != 'COMMERCIAL' && detailData.arcrftList[0].arcrftWghtCd != '11'; - const maxElev = 150; - if (detailData.arcrftList[0].idntfNum === 'PA0002') { - setIsErrorModal({ - isOpen: true, - title: '검토 결과 사전안내', - desc: ( - <> - 유효성 검사에 실패하여 미 승인 대상입니다. -

    - 기체가 보험에 가입되어 있지 않거나 유효기간이 만료되었습니다. -
    - 기체 번호를 다시 확인해주시기 바랍니다. -

    - - ) - }); - return; - } else if (laancNotRequired) { + + if (laancNotRequired) { setIsErrorModal({ isOpen: true, title: '검토 결과 사전안내', @@ -129,7 +150,38 @@ export default function LaancPlanContainer({ parseInt(detailData.areaList[0].fltElev) <= laancElev && parseInt(detailData.areaList[0].fltElev) < maxElev ) { - setStep(2); + try { + // 성공적으로 응답 받았을 때 처리할 내용 추가 + const tsData = await axios.post(`api/bas/laanc/valid/ts/pilot`, [ + detailData.arcrftList[0].idntfNum + ]); + if (!tsData.data.valid) { + setIsErrorModal({ + isOpen: true, + title: '검토 결과 사전안내', + desc: ( + <> + 유효성 검사에 실패하여 미 승인 대상입니다. +

    + 기체가 보험에 가입되어 있지 않거나 유효기간이 + 만료되었습니다. +
    + 기체 번호를 다시 확인해주시기 바랍니다. +

    + + ) + }); + return; + } else { + setStep(2); + } + } catch (error) { + setIsErrorModal({ + isOpen: true, + title: '오류', + desc: <>처리중 오류가 발생하였습니다 + }); + } } } }; @@ -178,12 +230,17 @@ export default function LaancPlanContainer({ [arrName]: arr }; }); - } else { + } else if ( + detailData.areaList[0].areaType === 'LINE' || + name === 'bufferZone' + ) { setDetailData(prevState => { const arr = [...prevState[arrName]]; + const prevBufferZone = prevState[arrName][0].bufferZone; const updateData = { ...prevState[arrName][0], - [name]: value + [name]: value, + concatBufferZone: prevBufferZone }; arr[0] = updateData; return { @@ -191,16 +248,12 @@ export default function LaancPlanContainer({ [arrName]: arr }; }); - } - break; - case 'pilot': - case 'arcrft': - if (name === 'bufferZone') { + } else { setDetailData(prevState => { const arr = [...prevState[arrName]]; const updateData = { ...prevState[arrName][0], - [name]: newValue + [name]: value }; arr[0] = updateData; return { @@ -208,7 +261,11 @@ export default function LaancPlanContainer({ [arrName]: arr }; }); - } else { + } + break; + case 'pilot': + case 'arcrft': + { setDetailData(prevState => { const arr = [...prevState[arrName]]; const updateData = { @@ -332,6 +389,21 @@ export default function LaancPlanContainer({ }); return false; + } else if ( + detailData.areaList[0].concatBufferZone != + detailData.areaList[0].bufferZone && + detailData.areaList[0].areaType === 'LINE' + ) { + setIsErrorModal({ + isOpen: true, + title: '필수값 입력 오류', + desc: <>적용 버튼을 누르지 않고 값을 변경 할 수 없습니다. + }); + // handleChange({ + // type: 'area', + // name: 'bufferZone', + // value: detailData.areaList[0].concatBufferZone + // }); } else if (!detailData.areaList[0].fltMethod) { setIsErrorModal({ isOpen: true, @@ -371,24 +443,53 @@ export default function LaancPlanContainer({ } }; - const handlerBufferApply = () => { + const handlerBufferApply = async () => { if (areaCoordList) { if (areaCoordList[0].coordList.length > 0) { - dispatch(LaancAction.LAANC_ALTITUDE.request(detailData.areaList)); + // dispatch(LaancAction.LAANC_ALTITUDE.request(detailData.areaList)); dispatch(LaancAction.LAANC_VALID_AREA.request(detailData.areaList)); + const array = []; const copy = { ...areaCoordList[0] }; copy.bufferZone = detailData.areaList[0].bufferZone; array.push(copy); dispatch(FLIGHT_PLAN_AREA_BUFFER_LIST.request(array)); + + try { + const elev = await axios.post( + `api/bas/laanc/valid/elev`, + detailData.areaList + ); + + if (elev.data[0] === 0) { + // dispatch(AREA_DETAIL_INIT()); + // dispatch(AreaAction.AREA_DETAIL_INIT()); + // dispatch(drawTypeChangeAction('')); + // dispatch(LaancAction.LAANC_APPROVAL_INIT()); + setIsErrorModal({ + title: '비행 불가 지역', + desc: ( + <> + 설정하신 비행구역 중 허용고도가 0m인 구역이 있습니다. +
    + 버퍼존을 다시 확인해주시기 바랍니다. + + ), + isOpen: true + }); + } + dispatch(LaancAction.LAANC_ALTITUDE.success(elev.data)); + } catch (error) { + { + setIsErrorModal({ + isOpen: true, + title: '오류', + desc: '처리중 오류가 발생하였습니다' + }); + } + } } - } else { - setIsErrorModal({ - isOpen: true, - title: '필수값 입력 오류', - desc: '비행 구역을 설정해 주세요.' - }); } }; diff --git a/src/modules/laanc/actions/laancActions.ts b/src/modules/laanc/actions/laancActions.ts index ff48bb2..055e9e6 100644 --- a/src/modules/laanc/actions/laancActions.ts +++ b/src/modules/laanc/actions/laancActions.ts @@ -13,7 +13,8 @@ import { LaancDetailData, FlightPlanAreaData, VaildElevData, - VaildAreaData + VaildAreaData, + LaancTsData } from '../models/laancModels'; // laanc 비행계획서 승인 @@ -51,6 +52,11 @@ const LAANC_VALID_AREA_REQUEST = 'laanc/valid/area/REQUEST'; const LAANC_VALID_AREA_SUCCESS = 'laanc/valid/area/SUCCESS'; const LAANC_VALID_AREA_FAILURE = 'laanc/valid/area/FAILURE'; +//laanc TS 연동 +const LAANC_VALID_TS_REQUEST = 'laanc/valid/ts/REQUEST'; +const LAANC_VALID_TS_SUCCESS = 'laanc/valid/ts/SUCCESS'; +const LAANC_VALID_TS_FAILURE = 'laanc/valid/ts/FAILURE'; + // laanc 초기화 const INIT_LAANC = 'laanc/init'; @@ -124,6 +130,13 @@ export const LAANC_VALID_AREA = createAsyncAction( LAANC_VALID_AREA_FAILURE )(); +//laanc TS 연동 +export const LAANC_VALID_TS = createAsyncAction( + LAANC_VALID_TS_REQUEST, + LAANC_VALID_TS_SUCCESS, + LAANC_VALID_TS_FAILURE +)(); + const actions = { LAANC_FLIGHT_Approval, LAANC_FLIGHT_CREATE, @@ -132,6 +145,7 @@ const actions = { LAANC_APRV_LIST, LAANC_DETAIL, LAANC_ALTITUDE, - LAANC_VALID_AREA + LAANC_VALID_AREA, + LAANC_VALID_TS }; export type LaancAction = ActionType; diff --git a/src/modules/laanc/apis/laancApi.ts b/src/modules/laanc/apis/laancApi.ts index e3e65a2..0e0e028 100644 --- a/src/modules/laanc/apis/laancApi.ts +++ b/src/modules/laanc/apis/laancApi.ts @@ -49,5 +49,10 @@ export const laancApi = { data ); return res; + }, + // laanc TS 연동 + postValidTs: async (data: string) => { + const res = await axios.post(`api/bas/laanc/valid/ts/pilot/${data}`); + return res; } }; diff --git a/src/modules/laanc/models/laancModels.ts b/src/modules/laanc/models/laancModels.ts index ce954ff..616007d 100644 --- a/src/modules/laanc/models/laancModels.ts +++ b/src/modules/laanc/models/laancModels.ts @@ -9,6 +9,7 @@ export interface laancState { laancDetail: LaancDetailData | undefined; laancElev: VaildElevData | undefined; laancArea: VaildAreaData | undefined; + laancTs: LaancTsData | undefined; } // laanc계획서 초기값 @@ -93,6 +94,7 @@ export const LaancFlightData = { fltMethod: '', selffltMethod: '', bufferZone: 0, + concatBufferZone: 0, fltElev: 0, createUserId: '', createDt: '', @@ -137,6 +139,7 @@ export const LaancFlightData = { fltMethod: '', selffltMethod: '', bufferZone: 0, + concatBufferZone: 0, fltElev: 0, createUserId: '', createDt: '', @@ -285,6 +288,7 @@ export interface FlightPlanAreaData { areaType: string; fltMethod: string; bufferZone: number; + concatBufferZone: number; fltElev: number; selffltMethod: string; createUserId?: string; @@ -372,6 +376,7 @@ export const laancControlData = { laancDetail: undefined, laancElev: undefined, laancArea: undefined, + laancTs: undefined, detail: { planSno: 0, groupId: '', @@ -405,6 +410,7 @@ export const laancControlData = { fltMethod: '', selffltMethod: '', bufferZone: 0, + concatBufferZone: 0, fltElev: 0, createUserId: '', createDt: '', @@ -515,6 +521,7 @@ export const initFlightBas = { fltMethod: '', selffltMethod: '', bufferZone: 0, + concatBufferZone: 0, fltElev: 0, createUserId: '', createDt: '', @@ -559,6 +566,7 @@ export const initFlightBas = { fltMethod: '', selffltMethod: '', bufferZone: 0, + concatBufferZone: 0, fltElev: 0, createUserId: '', createDt: '', @@ -790,3 +798,22 @@ export interface VaildAreaData { }; duplicated: false; } + +// laanc Ts rs +export interface LaancTsData { + pilotValidRsList: [ + { + rspCode: string; + rsMessage: string; + pilotcredentialyn: string; + arcrftinsuranceyn: string; + arcrftdeclaration: string; + corpregyn: string; + rq: { + pilotci: string; + declarationnum: string; + }; + } + ]; + valid: boolean; +} diff --git a/src/modules/laanc/reducers/laancReducers.ts b/src/modules/laanc/reducers/laancReducers.ts index 8faf057..2eda697 100644 --- a/src/modules/laanc/reducers/laancReducers.ts +++ b/src/modules/laanc/reducers/laancReducers.ts @@ -65,6 +65,12 @@ export const laancReducer = createReducer( const data = action.payload; draft.laancArea = data[0]; }) + ) + .handleAction(Actions.LAANC_VALID_TS.success, (state, action) => + produce(state, draft => { + const data = action.payload; + draft.laancTs = data; + }) ); // .handleAction(Actions.LAANC_ALTITUDE_INIT, (state, action) => // produce(state, draft => { diff --git a/src/modules/laanc/sagas/laancSagas.ts b/src/modules/laanc/sagas/laancSagas.ts index a4cf2f2..e9dc4b3 100644 --- a/src/modules/laanc/sagas/laancSagas.ts +++ b/src/modules/laanc/sagas/laancSagas.ts @@ -120,8 +120,8 @@ function* postValidElevSaga( ) { try { const deail = action.payload; - // const res = yield call(Apis.laancApi.postValidElev, deail); - // yield put(Actions.LAANC_ALTITUDE.success(detail)); + const res = yield call(Apis.laancApi.postValidElev, deail); + yield put(Actions.LAANC_ALTITUDE.success(res.data)); } catch (error) { yield put( MessageActions.IS_ERROR({ @@ -152,6 +152,25 @@ function* postValidAreaSaga( ); } } +// laanc Ts 연동 +function* postValidTsSaga( + action: ActionType +) { + try { + const detail = action.payload; + const res = yield call(Apis.laancApi.postValidTs, detail); + yield put(Actions.LAANC_VALID_TS.success(res.data)); + } catch (error) { + yield put( + MessageActions.IS_ERROR({ + errorCode: ERROR_MESSAGE.code, + errorMessage: ERROR_MESSAGE.message, + isHistoryBack: false, + isRefresh: false + }) + ); + } +} export function* laancSaga() { yield takeEvery(Actions.LAANC_FLIGHT_Approval.request, postApprovalSaga); yield debounce(500, Actions.LAANC_FLIGHT_CREATE.request, postCreateSaga); @@ -160,4 +179,5 @@ export function* laancSaga() { yield takeEvery(Actions.LAANC_DETAIL.request, getDetailSaga); yield takeEvery(Actions.LAANC_ALTITUDE.request, postValidElevSaga); yield takeEvery(Actions.LAANC_VALID_AREA.request, postValidAreaSaga); + yield takeEvery(Actions.LAANC_VALID_TS.request, postValidTsSaga); }