박정하 박정하 2023-10-16
231016 박정하 시니어 등록 수정
@4cf3fad94654ce028aaef21f981f7aaadc1f551e
client/views/component/Modal_SeniorInsert.jsx
--- client/views/component/Modal_SeniorInsert.jsx
+++ client/views/component/Modal_SeniorInsert.jsx
@@ -161,43 +161,6 @@
     }
   }
 
-  //아이디 중복 확인
-  const [isIdCheck, setIsIdCheck] = React.useState(false);
-  //로그인 아이디 중복 검사
-  const userIdCheck = () => {
-    if (CommonUtil.isEmpty(senior['user_phonenumber']) == true) {
-      seniorRef.current['user_phonenumber'].focus();
-      alert("연락처를 입력해 주세요.");
-      return false;
-    }
-    if (senior['user_phonenumber'].length < 7) {
-      seniorRef.current['user_phonenumber'].focus();
-      alert("연락처를 7자리 이상 입력해 주세요.");
-      return false;
-    }
-
-    senior['user_id'] = senior['user_phonenumber'];
-    fetch("/user/userSelectOne.json", {
-      method: "POST",
-      headers: {
-        'Content-Type': 'application/json; charset=UTF-8'
-      },
-      body: JSON.stringify(senior),
-    }).then((response) => response.json()).then((data) => {
-      console.log("로그인 아이디 중복 검사(아이디를 통한 사용자 조회) : ", data);
-      if (CommonUtil.isEmpty(data) == true) {
-        setIsIdCheck(true);
-        seniorRef.current['user_address'].focus();
-        alert("사용가능한 연락처 입니다.");
-      } else {
-        setIsIdCheck(false);
-        seniorRef.current['user_phonenumber'].focus();
-        alert("이미 존재하는 연락처 입니다.");
-      }
-    }).catch((error) => {
-      console.log('userIdCheck() /user/userSelectOne.json error : ', error);
-    });
-  }
   //시니어 등록 유효성 검사
   const seniorInsertValidation = () => {
     if (CommonUtil.isEmpty(senior['government_id']) == true) {
@@ -459,6 +422,7 @@
                   <td colSpan={3}>
                     <input type="number" maxLength="11" style={{ width: '100%' }}
                       value={senior['user_phonenumber']}
+                      onChange={(e) => { seniorValueChange('user_phonenumber', e.target.value) }}
                       ref={el => seniorRef.current['user_phonenumber'] = el}
                     />
                   </td>
Add a comment
List