Browse Source

Merge branch 'master' of http://gitea.palntour.com/pav/pav-home

feature/auth
노승철 2 years ago
parent
commit
bb0c718b81
  1. 20
      src/components/basis/flight/plan/FlightPlanAreaMap.js
  2. 22
      src/components/basis/flight/plan/FlightPlanForm.js
  3. 5
      src/containers/account/mypage/AccountMypageContainer.js
  4. 4
      src/containers/basis/flight/plan/FlightPlanAreaContainer.js
  5. 2
      src/modules/account/login/sagas/authSaga.ts

20
src/components/basis/flight/plan/FlightPlanAreaMap.js

@ -49,6 +49,21 @@ const FlightPlanAreaMap = (props) => {
}, [areaCoordList]);
const search = (latlng) => {
naver.maps.Service.reverseGeocode({
coords: latlng,
orders: [
naver.maps.Service.OrderType.ADDR,
naver.maps.Service.OrderType.ROAD_ADDR
].join(',')
}, )
}
const ModeInit = () => {
setMode(mapControl.drawType)
}
@ -156,6 +171,11 @@ const FlightPlanAreaMap = (props) => {
color='primary'
className='area-button'
onClick={e => handlerDrawType('RESET')}
{...props.test? (
{}
):(
{disabled:true}
)}
>
초기화
</Button.Ripple>

22
src/components/basis/flight/plan/FlightPlanForm.js

@ -19,6 +19,7 @@ import FlightPlanArcrftContainer from '../../../../containers/basis/flight/plan/
import FlightPlanAreaContainer from '../../../../containers/basis/flight/plan/FlightPlanAreaContainer';
import { X } from 'react-feather';
import { useSelector } from 'react-redux';
import { shallowEqual } from 'react-redux';
const FlightPlanForm = ({data, handleModal, handleChange, handleSave, handleDelete, modal, handleDeleteArray }) => {
@ -29,10 +30,24 @@ const FlightPlanForm = ({data, handleModal, handleChange, handleSave, handleDele
const [date ,setDate] = useState();
const [isFlightDone, setIsFlightDone] = useState();
const [test, setTest] = useState();
const { user } = useSelector(state => state.authState, shallowEqual);
useEffect(() => {
if(detail.createDt) {
setDate(detail.schFltStDt);
}
if(detail?.createUserId == user?.cstmrSno) {
// console.log(true)
setTest(true)
} else {
// console.log(false)
setTest(false)
}
console.log(detail.createUserId, '생성')
console.log(user.cstmrSno, '로그인')
}, [detail])
useEffect(() => {
@ -361,7 +376,7 @@ const FlightPlanForm = ({data, handleModal, handleChange, handleSave, handleDele
{areaList
? areaList.map((item, i) =>
<AreaForm key={i} index={i} data={item}
handleChange={handleChange}/>)
handleChange={handleChange} />)
: <AreaForm data={initFlightBas.area}
handleChange={handleChange}/>}
</dt>
@ -444,6 +459,7 @@ const FlightPlanForm = ({data, handleModal, handleChange, handleSave, handleDele
<SelectModal
modal={modal}
handleModal={handleModal}
test={test}
/>
</Row>
)
@ -451,7 +467,7 @@ const FlightPlanForm = ({data, handleModal, handleChange, handleSave, handleDele
export default FlightPlanForm;
const SelectModal = ({handleModal, modal}) => {
const SelectModal = ({handleModal, modal, test}) => {
let title = '';
let description = '';
let type = '';
@ -475,7 +491,7 @@ const SelectModal = ({handleModal, modal}) => {
isOpen = modal.area;
title = '비행 구역 설정';
type = 'area';
description = <FlightPlanAreaContainer handleModal={handleModal} type={type}/>;
description = <FlightPlanAreaContainer handleModal={handleModal} type={type} test={test}/>;
}
return (

5
src/containers/account/mypage/AccountMypageContainer.js

@ -153,15 +153,14 @@ const AccountMypageContainer = () => {
// handlerSmsSend();
};
useEffect(() => {
setIsRunning(true);
// console.log('isRunning>>>', isRunning);
if (isRunning) {
clearInterval(timer);
} else {
// handlerSmsSend();
}
return () => {
clearInterval(timer);
setIsRunning(false);
};
}, []);

4
src/containers/basis/flight/plan/FlightPlanAreaContainer.js

@ -6,7 +6,7 @@ import FlightPlanAreaMap from '../../../../components/basis/flight/plan/FlightPl
import { drawTypeChangeAction } from '../../../../modules/control/map/actions/controlMapActions';
import FlightPlanAreaDetailContainer from './FlightPlanAreaDetailContainer';
const FlightPlanAreaContainer = ({handleModal}) => {
const FlightPlanAreaContainer = ({handleModal, test}) => {
const dispatch = useDispatch();
const { publicAreaList} = useSelector(state => state.flightState);
@ -42,12 +42,14 @@ const FlightPlanAreaContainer = ({handleModal}) => {
<FlightPlanAreaMap
airArea={airArea}
handleConfirm={handleConfirm}
test={test}
/>
) : null}
</Col>
<Col md={6} lg={6}>
<FlightPlanAreaDetailContainer
handleModal={handleModal}
test={test}
/>
</Col>
</Row>

2
src/modules/account/login/sagas/authSaga.ts

@ -122,7 +122,7 @@ function* userLogoutSaga() {
// console.log('dddddddddddddddddddddddddddddddddddd');
const decodedToken = decode<LoginData>(accessToken);
const res = yield call(authAPI.usersLogout, decodedToken.cstmrSno);
console.log('res>>>>>>>>', res);
// console.log('res>>>>>>>>', res);
// if(res.data=="SUCCESS"){
// location.reload();
// }

Loading…
Cancel
Save