[FO] 마이페이지 수정 + [BO] 임가현황 작업 중 ..

This commit is contained in:
kangsunlee
2025-06-23 20:45:53 +09:00
parent 8d604014db
commit e8b2ee1bf1
6 changed files with 195 additions and 67 deletions

View File

@@ -20,7 +20,7 @@
</label>
</div>
<div class="input-field">
<input type="text" id="temp_input_0001" placeholder="이름을 입력해 주세요" th:field="*{ownerName}"
<input type="text" id="temp_input_0001" placeholder="이름을 입력해 주세요" name="ownerName" th:field="*{ownerName}"
maxlength="10">
</div>
</div>
@@ -281,10 +281,6 @@
<section layout:fragment="script">
<script th:inline="javascript">
$(function() {
//formControl.init();
});
let ENV = {
httpUrl: {
root: /*[[#{uri.front.info.user.path}]]*/'rootUrl',
@@ -311,7 +307,7 @@
},300);
//ajaxUtil._alert('select 010->10으로 노출\n 최초값 지정 및 값 취득 함수 필요\n 개인정보 작성 필요\n 모달 내부 스크롤 기능 추가 필요', null);
ENV.initialOwnerName = document.querySelector('input[name="ownerName"]').value;
},
_bindUI() {
@@ -356,7 +352,15 @@
// selectboxInstance1.setValue($('input[name=regionMainCode]').val());
},
confirmPopup() {
ENV.module.confirmPopup.open();
const currentName = document.querySelector('input[name="ownerName"]').value;
// 사용자가 이름을 변경했을 경우에만 개인정보 변경 동의서 모달 띄우기
if (currentName !== ENV.initialOwnerName) {
ENV.module.confirmPopup.open();
} else {
// 이름 그대로면 바로 저장
formControl.updateUserInfo();
}
},
confirmPopupOk() {
ENV.module.confirmPopup.close();
@@ -406,7 +410,8 @@
* TODO
* 내정보에서만 들어온다는 가정하에서 back을 하게함 SB에는 내정보로 이동하게 되어 있음.
*/
history.back()
// history.back();
location.href = '/info';
});
} else if (rstData.code === 'ERROR') {
ajaxUtil._alert('잠시 뒤에 다시 시도해 주세요.', null);