diff --git a/src/components/account/find/AccountFindPassword.js b/src/components/account/find/AccountFindPassword.js index 09a73c4..21f481a 100644 --- a/src/components/account/find/AccountFindPassword.js +++ b/src/components/account/find/AccountFindPassword.js @@ -56,11 +56,21 @@ export const AccountFindPassword = props => { }, []); const handlerSend = async() => { - if(!inputId || !inputHpno) { + if(!inputId) { setModal({ isOpen: true, title: '인증번호 발송', - desc: '빈칸을 채워주세요.', + desc: '아이디를 입력해 주세요.', + color: 'modal-danger' + }) + return; + } + + if(!inputHpno) { + setModal({ + isOpen: true, + title: '인증번호 발송', + desc: '휴대폰 번호를 입력해 주세요.', color: 'modal-danger' }) return; @@ -126,6 +136,12 @@ export const AccountFindPassword = props => { setIsRunning(false); // setValue('crtfyNo', ''); // setCrtfyNo(''); + setModal({ + isOpen: true, + title: '인증번호 만료', + desc: '인증번호가 만료되었습니다.', + color: 'modal-danger' + }) } }, 1000); @@ -137,11 +153,21 @@ export const AccountFindPassword = props => { } const handlerConfirm = async() => { - if(!inputId || !inputHpno) { + if(!inputId) { setModal({ isOpen: true, - title: '인증번호 인증', - desc: '빈칸을 채워주세요.', + title: '인증번호 발송', + desc: '아이디를 입력해 주세요.', + color: 'modal-danger' + }) + return; + } + + if(!inputHpno) { + setModal({ + isOpen: true, + title: '인증번호 발송', + desc: '휴대폰 번호를 입력해 주세요.', color: 'modal-danger' }) return; @@ -183,7 +209,7 @@ export const AccountFindPassword = props => { setModal({ isOpen: true, title: '비밀번호 변경', - desc: '빈칸을 채워주세요.', + desc: '비밀번호를 입력해 주세요.', color: 'modal-danger' }) return; @@ -194,7 +220,7 @@ export const AccountFindPassword = props => { setModal({ isOpen: true, title: '비밀번호 변경', - desc: '8자 이상, 20자 미만 영문자/숫자/특수문자(@$!%*#?&) 조합하여 입력해주세요.', + desc: '8자 이상, 20자 미만 영문자/숫자/특수문자(@$!%*#?&) 조합하여 입력해 주세요.', color: 'modal-danger' }) return; @@ -242,12 +268,17 @@ export const AccountFindPassword = props => { setInputCrtfy(crtfyhp) } } else if(name == 'newPw') { + const regex = /^[A-Za-z0-9@$!%*#?&]{0,20}$/; + if(regex.test(value)) { newpw = value; setInputNewPw(newpw); - // } + } } else if(name == 'newPwCk') { + const regex = /^[A-Za-z0-9@$!%*#?&]{0,20}$/; + if(regex.test(value)) { newpwck = value; setInputNewPwCk(newpwck); + } } } diff --git a/src/components/account/find/AccountFindUserId.js b/src/components/account/find/AccountFindUserId.js index 78214e1..4c44475 100644 --- a/src/components/account/find/AccountFindUserId.js +++ b/src/components/account/find/AccountFindUserId.js @@ -52,11 +52,21 @@ export const AccountFindUserId = props => { }, []); const handlerSend = async() => { - if(!inputName || !inputHpno) { + if(!inputName) { setModal({ isOpen: true, title: '인증번호 발송', - desc: '빈칸을 채워주세요.', + desc: '이름을 입력해 주세요.', + color: 'modal-danger' + }) + return; + } + + if(!inputHpno) { + setModal({ + isOpen: true, + title: '인증번호 발송', + desc: '휴대폰 번호를 입력해 주세요.', color: 'modal-danger' }) return; @@ -121,6 +131,12 @@ export const AccountFindUserId = props => { setIsRunning(false); // setValue('crtfyNo', ''); // setCrtfyNo(''); + setModal({ + isOpen: true, + title: '인증번호 만료', + desc: '인증번호가 만료되었습니다.', + color: 'modal-danger' + }) } }, 1000); @@ -132,11 +148,21 @@ export const AccountFindUserId = props => { } const handlerConfirm = async() => { - if(!inputName || !inputHpno) { + if(!inputHpno) { + setModal({ + isOpen: true, + title: '인증번호 인증', + desc: '휴대폰 번호를 입력 해주세요.', + color: 'modal-danger' + }) + return; + } + + if(!inputName) { setModal({ isOpen: true, title: '인증번호 인증', - desc: '빈칸을 채워주세요.', + desc: '이름을 입력 해주세요.', color: 'modal-danger' }) return; diff --git a/src/components/account/register/AccountRegister.js b/src/components/account/register/AccountRegister.js index 202c2fa..f2b6b5b 100644 --- a/src/components/account/register/AccountRegister.js +++ b/src/components/account/register/AccountRegister.js @@ -8,6 +8,7 @@ import { AccountRegisterComplete } from './AccountRegisterComplete'; export const AccountRegister = ({ props }) => { const [stepper, setStepper] = useState(null); + const [memberName, setMemberName] = useState(); const ref = useRef(null); // console.log(props); @@ -36,6 +37,8 @@ export const AccountRegister = ({ props }) => { stepper={stepper} type='wizard-horizontal' movePage={movePage} + memberName={memberName} + setMemberName={setMemberName} /> ) }, @@ -48,6 +51,7 @@ export const AccountRegister = ({ props }) => { stepper={stepper} type='wizard-horizontal' movePage={movePage} + memberName={memberName} /> ) } diff --git a/src/components/account/register/AccountRegisterComplete.js b/src/components/account/register/AccountRegisterComplete.js index 764c46e..244dc9f 100644 --- a/src/components/account/register/AccountRegisterComplete.js +++ b/src/components/account/register/AccountRegisterComplete.js @@ -20,8 +20,9 @@ import { import AppCollapse from '@components/app-collapse'; import Select from 'react-select'; import { selectThemeColors } from '@utils'; +import { useSelector } from 'react-redux'; -export const AccountRegisterComplete = ({ stepper, type, movePage }) => { +export const AccountRegisterComplete = ({ stepper, type, movePage, memberName}) => { const handlerLogin = () => { movePage('/account/login'); }; @@ -30,7 +31,7 @@ export const AccountRegisterComplete = ({ stepper, type, movePage }) => {
- 환영합니다. 홍길동 님 + 환영합니다. {memberName}님 모든 회원가입절차가 완료되었습니다. 로그인 후 사용해주세요. diff --git a/src/components/account/register/AccountRegisterForm.js b/src/components/account/register/AccountRegisterForm.js index 4b3c972..8a9fd43 100644 --- a/src/components/account/register/AccountRegisterForm.js +++ b/src/components/account/register/AccountRegisterForm.js @@ -25,7 +25,7 @@ import { useDispatch, useSelector } from 'react-redux'; import { accountApi } from '../../../modules/account/register/apis/accountApi'; import * as Actions from '../../../modules/account/register/actions/accountAction'; -export const AccountRegisterForm = ({ stepper, type, movePage }) => { +export const AccountRegisterForm = ({ stepper, type, movePage, testName, setMemberName }) => { const { agreeTerms } = useSelector(state => state.accountState); const [minutes_Counter, setMinutes_Counter] = useState('03'); const [seconds_Counter, setSeconds_Counter] = useState('00'); @@ -198,9 +198,9 @@ export const AccountRegisterForm = ({ stepper, type, movePage }) => { }); return false; } - // dispatch( - // Actions.register.request({ data: data, agreeTerms: agreeTerms }) - // ); + dispatch( + Actions.register.request({ data: data, agreeTerms: agreeTerms }) + ); const res = await accountApi.register({ data: data, agreeTerms: agreeTerms @@ -272,6 +272,10 @@ export const AccountRegisterForm = ({ stepper, type, movePage }) => { // console.log(register); const { name, value } = e.target; + if(name == 'memberName') { + setMemberName(value); + } + if (name == 'brthdyDate') { const regex = /^[0-9\b]{0,8}$/; diff --git a/src/components/analysis/simulation/AnalysisSimulationDetail.js b/src/components/analysis/simulation/AnalysisSimulationDetail.js index 43fe2fc..cb32f40 100644 --- a/src/components/analysis/simulation/AnalysisSimulationDetail.js +++ b/src/components/analysis/simulation/AnalysisSimulationDetail.js @@ -210,7 +210,7 @@ export const AnalysisSimulationDetail = props => {
*/} {props.stcsList?.map(item => { return ( -
{ // console.log(props.params); - console.log(11111111111111); return (
diff --git a/src/components/analysis/simulation/AnalysisSimulatorSlider.js b/src/components/analysis/simulation/AnalysisSimulatorSlider.js index c809f4c..2e81af8 100644 --- a/src/components/analysis/simulation/AnalysisSimulatorSlider.js +++ b/src/components/analysis/simulation/AnalysisSimulatorSlider.js @@ -40,7 +40,6 @@ const AnalysisSimulatorSlider = ({ }; useEffect(() => { - console.log(playCount); }, [playCount]); return (
diff --git a/src/components/basis/dron/BasisDronImage.js b/src/components/basis/dron/BasisDronImage.js index 77327f3..28cbc4f 100644 --- a/src/components/basis/dron/BasisDronImage.js +++ b/src/components/basis/dron/BasisDronImage.js @@ -1,6 +1,6 @@ import React from 'react'; import { Edit, Image, Trash2 } from 'react-feather'; -import { Button, Label, Media } from 'reactstrap'; +import { Button, Label, Media, Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap'; export const BasisDronImage = props => { return ( @@ -50,6 +50,29 @@ export const BasisDronImage = props => {
+
+ props.setModal({ ...props.modal, isOpen: !props.modal.isOpen })} + modalClassName={props.modal.color} + className='modal-dialog-centered' + > + props.setModal({ ...props.modal, isOpen: !props.modal.isOpen })} + > + {props.modal.title} + + {props.modal.desc} + + + + +
{/*
이미지 최적 크기 300*300
*/} diff --git a/src/components/basis/group/BasisGroupDetailJoinSearch.js b/src/components/basis/group/BasisGroupDetailJoinSearch.js index eb93bae..2aff40a 100644 --- a/src/components/basis/group/BasisGroupDetailJoinSearch.js +++ b/src/components/basis/group/BasisGroupDetailJoinSearch.js @@ -61,7 +61,7 @@ export const BasisGroupDetailJoinSearch = props => { type='text' id='groupNm' name='groupNm' - value={props.params.groupNm} + value={props.params.groupNm || ''} onChange={props.handlerInput} bsSize='sm' placeholder='그룹명을 입력하세요' @@ -84,7 +84,7 @@ export const BasisGroupDetailJoinSearch = props => { id='groupId' name='groupId' onChange={props.handlerInput} - value={props.params.groupId} + value={props.params.groupId || ''} onKeyPress={props.onKeyPress} bsSize='sm' placeholder='그룹코드를 입력하세요' diff --git a/src/components/basis/group/BasisGroupUsersSearch.js b/src/components/basis/group/BasisGroupUsersSearch.js index 4d8cc1d..81756dc 100644 --- a/src/components/basis/group/BasisGroupUsersSearch.js +++ b/src/components/basis/group/BasisGroupUsersSearch.js @@ -61,7 +61,7 @@ export const BasisGroupUsersSearch = props => { type='text' id='groupNm' name='groupNm' - value={props.params.groupNm} + value={props.params.groupNm || ''} onChange={props.handlerInput} onKeyPress={props.onKeyPress} bsSize='sm' @@ -87,7 +87,7 @@ export const BasisGroupUsersSearch = props => { type='text' id='memberName' name='memberName' - value={props.params.memberName} + value={props.params.memberName || ''} onChange={props.handlerInput} onKeyPress={props.onKeyPress} bsSize='sm' diff --git a/src/containers/account/find/AccounFindTabContainer.js b/src/containers/account/find/AccounFindTabContainer.js index bcdba53..e8d95f5 100644 --- a/src/containers/account/find/AccounFindTabContainer.js +++ b/src/containers/account/find/AccounFindTabContainer.js @@ -1,10 +1,15 @@ import { AccountFindTab } from "../../../components/account/find/AccountFindTab"; - import loginImg from '../../../assets/images/login01.png'; - +import { Button } from 'reactstrap' import '../../../assets/css/custom.css'; +import { useHistory } from 'react-router-dom' export const AccountFindTabContainer = () => { + const history = useHistory(); + + const handlerRegister = () => { + history.push(`/account/register`) + } return ( <> @@ -17,6 +22,14 @@ export const AccountFindTabContainer = () => {
+
+ + 회원가입 바로가기 + +
diff --git a/src/containers/basis/dron/BasisDronDetailContainer.js b/src/containers/basis/dron/BasisDronDetailContainer.js index 1e207d4..0fff353 100644 --- a/src/containers/basis/dron/BasisDronDetailContainer.js +++ b/src/containers/basis/dron/BasisDronDetailContainer.js @@ -54,7 +54,12 @@ export const BasisDronDetailContainer = props => { }, resolver: yupResolver(validationSchema) }); - + const [modal, setModal] = useState({ + isOpen: false, + title: '', + desc: '', + color: '' + }) useEffect(() => { if (props.id) { handlerSearch(); @@ -96,7 +101,21 @@ export const BasisDronDetailContainer = props => { const handlerImageChange = e => { const reader = new FileReader(), files = e.target.files; - saveFileAPI(files[0]); + if(!(files[0] == undefined)){ + if(!(files[0].size == 0)){ + const fileSize = files[0].size/1048576; + if(fileSize > 10) { + setModal({ + isOpen: true, + title: '이미지 용량 초과', + desc: '10MB 이하의 파일만 등록 가능합니다', + color: 'modal-danger' + }) + return; + } + } + } + saveFileAPI(files[0]); }; const handlerImageDelete = () => { @@ -148,6 +167,8 @@ export const BasisDronDetailContainer = props => { handlerImageDelete={handlerImageDelete} data={register} img={img} + modal={modal} + setModal={setModal} /> diff --git a/src/modules/control/gp/sagas/controlGpSaga.ts b/src/modules/control/gp/sagas/controlGpSaga.ts index 14086a6..1ac28e1 100644 --- a/src/modules/control/gp/sagas/controlGpSaga.ts +++ b/src/modules/control/gp/sagas/controlGpSaga.ts @@ -27,6 +27,7 @@ function* getControlGpSaga( if (controlGroupAuthInfo.length > 0) { controlGroupAuthInfo.forEach((auth) => { if (auth.groupAuthCd === 'CREATER' || auth.groupAuthCd === 'ADMIN') { + if (gpsData.length > 0) return false; gpsData = data.filter(gps => auth.idntfNum === gps.objectId); @@ -38,11 +39,10 @@ function* getControlGpSaga( gpsData.filter(gps => auth.createUserId && auth.idntfNum === gps.objectId); } }); - } + } - console.log('gps data >>>> ', data); */ - + console.log('websocket data :: ', data); yield put( Actions.controlGpAction.success({