Merge branch 'dev' into deploy-dev-front
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html layout:decorate="~{layout/layout-subar}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
<html layout:decorate="~{layout/layout-none}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
xmlns:th="http://www.thymeleaf.org">
|
||||
|
||||
<div layout:fragment="content" th:classappend="'mypage-wrap'">
|
||||
|
||||
@@ -204,40 +204,41 @@
|
||||
const clearAllItems = document.getElementById('clearAllItems');
|
||||
|
||||
if (ENV.data.editable) {
|
||||
if(ENV.data.preEditable && ENV.data.pastBankList.length === 0 && ENV.data.currentMonth >= "202508"){
|
||||
if( ENV.data.pastBankList.length === 0) {
|
||||
callPastInfoBtn.disabled = true;
|
||||
|
||||
const handlePageShow = function(event) {
|
||||
if ('sessionStorage' in window && window['sessionStorage'] !== null) {
|
||||
// history.back으로 돌아온 경우 (navigation.type == 2)
|
||||
if (event.persisted || (window.performance && window.performance.navigation.type === 2)) {
|
||||
sessionStorage.removeItem('pastInputAlertShown'); // 플래그 제거
|
||||
return; // 알림창 표시하지 않음
|
||||
}
|
||||
if (ENV.data.preEditable && ENV.data.pastBankList.length === 0 && ENV.data.currentMonth >= "202508") {
|
||||
const handlePageShow = function (event) {
|
||||
if ('sessionStorage' in window && window['sessionStorage'] !== null) {
|
||||
// history.back으로 돌아온 경우 (navigation.type == 2)
|
||||
if (event.persisted || (window.performance && window.performance.navigation.type === 2)) {
|
||||
sessionStorage.removeItem('pastInputAlertShown'); // 플래그 제거
|
||||
return; // 알림창 표시하지 않음
|
||||
}
|
||||
|
||||
// 페이지가 처음 로드되었거나 새로고침된 경우 (navigation.type == 0 또는 1)
|
||||
if (event.persisted || (window.performance && window.performance.navigation.type <= 1)) {
|
||||
kri.isReturn = true;
|
||||
const hasShownAlert = sessionStorage.getItem('pastInputAlertShown');
|
||||
if (!hasShownAlert && ENV.data.pastBankList.length === 0) {
|
||||
callPastInfoBtn.disabled = true;
|
||||
etUI.dialog.alert({
|
||||
title: '지난달 정보 등록하기',
|
||||
message: '지난달 정보를 아직 입력하지 않으셨네요.\n정확한 조사를 위해 지난달 정보를 입력해주세요.\n\n확인 버튼을 누르시면 지난달 은행자동이체 내역등록으로 이동합니다.',
|
||||
type: 'alert',
|
||||
callback: function() {
|
||||
sessionStorage.setItem('pastInputAlertShown', 'true');
|
||||
location.href = ENV.httpUrl.preMonth + "/" + ENV.data.pastBankId;
|
||||
},
|
||||
});
|
||||
// 페이지가 처음 로드되었거나 새로고침된 경우 (navigation.type == 0 또는 1)
|
||||
if (event.persisted || (window.performance && window.performance.navigation.type <= 1)) {
|
||||
kri.isReturn = true;
|
||||
const hasShownAlert = sessionStorage.getItem('pastInputAlertShown');
|
||||
if (!hasShownAlert && ENV.data.pastBankList.length === 0) {
|
||||
etUI.dialog.alert({
|
||||
title: '지난달 정보 등록하기',
|
||||
message: '지난달 정보를 아직 입력하지 않으셨네요.\n정확한 조사를 위해 지난달 정보를 입력해주세요.\n\n확인 버튼을 누르시면 지난달 은행자동이체 내역등록으로 이동합니다.',
|
||||
type: 'alert',
|
||||
callback: function () {
|
||||
sessionStorage.setItem('pastInputAlertShown', 'true');
|
||||
location.href = ENV.httpUrl.preMonth + "/" + ENV.data.pastBankId;
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
// 초기 로드 시 실행
|
||||
handlePageShow({ persisted: false, performance: window.performance });
|
||||
// 초기 로드 시 실행
|
||||
handlePageShow({persisted: false, performance: window.performance});
|
||||
|
||||
}
|
||||
}
|
||||
if (ENV.data.currentStatus == "NONE") {
|
||||
if (ENV.data.pastStatus && ENV.data.pastStatus == "REGISTERED" && ENV.data.pastBankList.length > 0) {
|
||||
@@ -474,15 +475,30 @@
|
||||
const field = form.elements.namedItem(key);
|
||||
if (field) {
|
||||
field.value = val;
|
||||
if(key == 'transferCategoryCode' && val == "code.bank.input.self"){
|
||||
if(key === 'transferCategoryCode' && (val === "code.bank.input.self" || val === "code.bank.input.1" || val === "code.bank.input.4")){
|
||||
document.getElementById(val+"_value").value = product["transferCategory"];
|
||||
}
|
||||
if(key == 'unitCode' && val == "code.count.unit.self"){
|
||||
if(key === 'unitCode' && val === "code.count.unit.self"){
|
||||
document.getElementById("unitDiv").style.display = "";
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (product.transferCategoryCode === "code.bank.input.self") {
|
||||
const transferCategoryInput = document.getElementById(product.transferCategoryCode + "_value");
|
||||
if (transferCategoryInput) {
|
||||
transferCategoryInput.value = product.transferCategory || "";
|
||||
}
|
||||
}
|
||||
|
||||
// 단위 입력 필드 표시 여부 처리
|
||||
if (product.unitCode === "code.count.unit.self") {
|
||||
const unitDiv = document.getElementById("unitDiv");
|
||||
if (unitDiv) {
|
||||
unitDiv.style.display = "";
|
||||
}
|
||||
}
|
||||
|
||||
ENV.elementRefs.select.cropCodeSelect.setValue(product.cropCode);
|
||||
ENV.elementRefs.select.transferCategoryCodeSelect.setValue(product.transferCategoryCode);
|
||||
ENV.elementRefs.select.unitCodeSelect.setValue(product.unitCode);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html layout:decorate="~{layout/layout-subar}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
<html layout:decorate="~{layout/layout}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
xmlns:th="http://www.thymeleaf.org">
|
||||
|
||||
|
||||
@@ -41,20 +41,18 @@
|
||||
최근등록 : <span th:text="${dailyLatest}"></span></dd>
|
||||
<dd class="date" th:if="${#strings.isEmpty(dailyLatest)}">등록된 일계부가 없습니다.</dd>
|
||||
</dl>
|
||||
<!--/* TODO : 2차 오픈 */-->
|
||||
<th:block th:if="${@systemProperties['spring.profiles.active'] eq 'local'}">
|
||||
|
||||
<th:block th:if="${notice != null}">
|
||||
<a th:href="@{'/info/notice/' + ${notice.id}}" class="notice-box">
|
||||
<p class="tit">공지사항</p>
|
||||
<p class="txt" th:text="${notice.title}"></p>
|
||||
</a>
|
||||
<div class="notice-box nodata"
|
||||
th:unless="${notice != null}">
|
||||
<a href="/info/notice" class="tit">공지사항</a>
|
||||
<a href="javascript:void(0)" class="txt">등록된 공지사항이 없습니다</a>
|
||||
</div>
|
||||
</th:block>
|
||||
<div class="notice-box nodata"
|
||||
th:unless="${notice != null}">
|
||||
<a href="/info/notice" class="tit">공지사항</a>
|
||||
<a href="javascript:void(0)" class="txt">등록된 공지사항이 없습니다</a>
|
||||
</div>
|
||||
</th:block>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html layout:decorate="~{layout/layout-subar}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
<html layout:decorate="~{layout/layout-none}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
xmlns:th="http://www.thymeleaf.org">
|
||||
|
||||
<div layout:fragment="content" th:classappend="'mypage-wrap'">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html layout:decorate="~{layout/layout-subar}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
<html layout:decorate="~{layout/layout-none}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
xmlns:th="http://www.thymeleaf.org">
|
||||
|
||||
<div layout:fragment="content" th:classappend="'mypage-wrap'">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html layout:decorate="~{layout/layout-subar}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
<html layout:decorate="~{layout/layout-none}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
xmlns:th="http://www.thymeleaf.org">
|
||||
|
||||
<div layout:fragment="content" th:classappend="'mypage-wrap'">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html layout:decorate="~{layout/layout-subar}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
<html layout:decorate="~{layout/layout-none}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
xmlns:th="http://www.thymeleaf.org">
|
||||
|
||||
|
||||
|
||||
@@ -61,6 +61,7 @@
|
||||
</div>
|
||||
<div class="select-scroll">
|
||||
<ul class="">
|
||||
<li class="option" data-value="" th:classappend="${userInfo.tel1 == ''?' current':'' }">선택</li>
|
||||
<li class="option" data-value="02" th:classappend="${userInfo.tel1 == '02'?' current':'' }">02</li>
|
||||
<li class="option" data-value="031" th:classappend="${userInfo.tel1 == '031'?' current':'' }">31</li>
|
||||
<li class="option" data-value="033" th:classappend="${userInfo.tel1 == '033'?' current':'' }">033</li>
|
||||
@@ -135,7 +136,6 @@
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="regionSubCodeId" class="component-select bottom-sheet" data-props-default="지역 선택"
|
||||
data-props-type="bottomSheet">
|
||||
<input type="hidden" name="regionSubCode" data-type="select" th:value="${userInfo.regionSubCode}">
|
||||
@@ -150,7 +150,6 @@
|
||||
</button>
|
||||
</div>
|
||||
<div class="select-scroll">
|
||||
|
||||
<ul class="">
|
||||
<!-- <th:block th:each="item : ${regionMainList}">-->
|
||||
<!-- <li class="option" th:data-value="${item.id}"-->
|
||||
@@ -197,7 +196,7 @@
|
||||
</div>
|
||||
<div class="component-input">
|
||||
<div class="input-field">
|
||||
<input type="text" id="temp_input_00023" placeholder="세부 주소를 입력해 주세요"
|
||||
<input type="text" id="temp_input_00023" placeholder="전체 주소를 입력해 주세요"
|
||||
th:field="*{address}" maxlength="50"/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -363,66 +362,73 @@
|
||||
// selectboxInstance1.setValue($('input[name=regionMainCode]').val());
|
||||
},
|
||||
confirmPopup() {
|
||||
//유효성 검사
|
||||
const form = document.getElementById('reqForm');
|
||||
kri.form.errorInit(form);
|
||||
const selects = ['tel1', 'phone1', 'regionSubCode', 'regionDetailCode'];
|
||||
selects.forEach(id => {
|
||||
const sel = document.getElementById(id);
|
||||
if (sel && sel.value) form[id].value = sel.value;
|
||||
});
|
||||
|
||||
const errors = [];
|
||||
if (!form.ownerName.value) errors.push({field: 'ownerName', message: '이름을 입력해 주세요.'});
|
||||
if (!form.ownerAge.value) errors.push({field: 'ownerAge', message: '연령을 입력해 주세요.'});
|
||||
if (form.ownerAge.value < 0 || form.ownerAge.value > 120) errors.push({field: 'ownerAge', message: '연령은 0세이상 120세 이하이어야 합니다.'});
|
||||
if (form.tel1.value || form.tel2.value || form.tel3.value) {
|
||||
if (!form.tel1.value || !form.tel2.value || !form.tel3.value) {
|
||||
errors.push({ field: 'tel1', message: '가구 연락처를 모두 입력해 주세요.' });
|
||||
} else {
|
||||
const telRegex = /^(0[2-7][0-9]?)$/; // 지역번호 (예: 02, 031, 032 등)
|
||||
if (!telRegex.test(form.tel1.value)) errors.push({ field: 'tel1', message: '가구 연락처를 입력해주세요' }); // 유효한 지역번호를 선택해 주세요.
|
||||
if (form.tel2.value.length < 3 || form.tel2.value.length > 4) errors.push({ field: 'tel2', message: '가구 연락처를 입력해주세요.' });// 가구 연락처 중간 자리수는 3~4자리여야 합니다.
|
||||
if (form.tel3.value.length !== 4) errors.push({ field: 'tel3', message: '가구 연락처를 입력해주세요.' }); // 가구 연락처 마지막 자리수는 4자리여야 합니다.
|
||||
}
|
||||
}
|
||||
if (form.phone1.value || form.phone2.value || form.phone3.value) {
|
||||
if (form.tel2.value.length === 3) errors.push({ field: 'tel1', message: '핸드폰 번호를 입력해 주세요.' });
|
||||
if (form.tel2.value.length < 3 || form.tel2.value.length > 4) errors.push({ field: 'tel2', message: '핸드폰 번호를 입력해 주세요.' });
|
||||
if (form.tel3.value.length !== 4) errors.push({ field: 'tel3', message: '핸드폰 번호를 입력해 주세요.' });
|
||||
}
|
||||
if (!form.phone1.value ||!form.phone2.value || !form.phone3.value) errors.push({field: 'phone1', message: '휴대폰 번호를 입력해 주세요.'});
|
||||
if (form.phone1.value.length < 2 || form.phone2.value.length < 3 || form.phone2.value.length > 4 || form.phone3.value.length < 3 || form.phone3.value.length > 4) errors.push({field: 'phone1', message: '휴대폰 번호를 입력해 주세요.'});
|
||||
if (!form.regionSubCode.value) errors.push({field: 'regionSubCode', message: '지역을 선택해 주세요.'});
|
||||
if (!form.regionDetailCode.value) errors.push({field: 'regionDetailCode', message: '세부 지역를 선택해 주세요.'});
|
||||
if (!form.address.value) errors.push({field: 'address', message: '전체 주소를 입력해 주세요.'});
|
||||
|
||||
kri.form.error(errors);
|
||||
if (errors.length > 0) return;
|
||||
|
||||
// 이름 변경 여부 처리
|
||||
const currentName = document.querySelector('input[name="ownerName"]').value.trim();
|
||||
const isNameChanged = currentName !== ENV.initialOwnerName;
|
||||
|
||||
formControl.updateUserInfo(isNameChanged);
|
||||
if(isNameChanged){
|
||||
ENV.module.confirmPopup.open();
|
||||
}else {
|
||||
formControl.updateUserInfo();
|
||||
}
|
||||
},
|
||||
confirmPopupOk() {
|
||||
ENV.module.confirmPopup.close();
|
||||
|
||||
setTimeout(() => {
|
||||
ajaxUtil._alert('개인정보 변경이 완료되었습니다.', null, () => {
|
||||
location.href = '/info';
|
||||
});
|
||||
}, 500);
|
||||
formControl.updateUserInfo();
|
||||
},
|
||||
updateUserInfo(showPopupIfValidNameChanged = false) {
|
||||
|
||||
updateUserInfo() {
|
||||
const f = document.reqForm;
|
||||
// // TODO 어쩔수 없이 이렇게 하는데..... 콤포넌트값 핸들링 방법 UX에서 지정하면 수정해야함.
|
||||
// const tel1Element = document.getElementById('tel1Id');
|
||||
// const phone1IdElement = document.getElementById('phone1Id');
|
||||
// const regionMainCodeIdElement = document.getElementById('regionMainCodeId');
|
||||
// const regionSubCodeIdElement = document.getElementById('regionSubCodeId');
|
||||
// if (tel1Element && tel1Element.value) {
|
||||
// f.tel1.value = tel1Element.value;
|
||||
// }
|
||||
// if (phone1IdElement && phone1IdElement.value) {
|
||||
// f.phone1.value = phone1IdElement.value;
|
||||
// }
|
||||
// if (regionMainCodeIdElement && regionMainCodeIdElement.value) {
|
||||
// f.regionMainCode.value = regionMainCodeIdElement.value;
|
||||
// }
|
||||
// if (regionSubCodeIdElement && regionSubCodeIdElement.value) {
|
||||
// f.regionSubCode.value = regionSubCodeIdElement.value;
|
||||
// }
|
||||
|
||||
f.regionSubCode.value = ENV.select.regionSelect.getParentValue();
|
||||
f.regionDetailCode.value = ENV.select.regionSelect.getChildValue();
|
||||
f.tel1.value = ENV.select.selectTel.getValue();
|
||||
f.phone1.value = ENV.select.selectPhone.getValue();
|
||||
|
||||
|
||||
|
||||
|
||||
const obj = $(f).serializeObject();
|
||||
console.log(obj)
|
||||
ajaxUtil._ajaxAsync(
|
||||
ENV.httpUrl.user,
|
||||
obj,
|
||||
$(f).serializeObject(),
|
||||
function (rstData, status) {
|
||||
if (rstData.code === 'SUCCESS') {
|
||||
// 유효성 검사를 모두 통과한 후
|
||||
if (showPopupIfValidNameChanged) {
|
||||
// 이름이 바뀐 경우만 팝업
|
||||
ENV.module.confirmPopup.open();
|
||||
} else {
|
||||
ajaxUtil._alert('개인정보 변경이 완료되었습니다.', null, () => {
|
||||
location.href = '/info';
|
||||
});
|
||||
}
|
||||
ajaxUtil._alert('개인정보 변경이 완료되었습니다.', null, () => {
|
||||
location.href = '/info';
|
||||
});
|
||||
} else if (rstData.code === 'ERROR') {
|
||||
ajaxUtil._alert('잠시 뒤에 다시 시도해 주세요.', null);
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
body, html {height: 100%; font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;}
|
||||
#wrap {height: 100%;}
|
||||
.error-wrap {padding-top: 120px;}
|
||||
.error-wrap main {display: flex; flex-direction: column; width: 310px; margin: 0 auto; padding-top: 88px; background:url('../../assets/images/common/ico_nodata.svg') center top / 64px no-repeat;}
|
||||
.error-wrap main {display: flex; flex-direction: column; width: 310px; margin: 0 auto; padding-top: 88px; background:url('/static/assets/images/common/ico_nodata.svg') center top / 64px no-repeat;}
|
||||
.info-msg {display: flex; flex-direction: column; align-items: center;}
|
||||
.info-msg strong {display: block; font-size: 24px; font-weight: 700; color: #212529; line-height: 140%; text-align: center;}
|
||||
.info-msg span {display: block; margin-top: 8px; font-size: 15px; font-weight: 400; color: #495057; line-height: 140%; text-align: center;}
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" xmlns:th="http://www.thymeleaf.org" lang="ko">
|
||||
|
||||
<head th:replace="~{common/components :: head}"></head>
|
||||
|
||||
<body>
|
||||
<div id="wrap">
|
||||
<div class="loading dimmed" id="loadingBar" style="display: none"><i class="ico-spinner" aria-hidden="true"></i></div>
|
||||
<section th:replace="~{common/components :: header(true)}"></section>
|
||||
|
||||
<div id="container" layout:fragment="content">
|
||||
page content
|
||||
</div>
|
||||
|
||||
<section th:replace="~{common/components :: footer}"></section>
|
||||
<section th:replace="~{common/components :: floating-totop}"></section>
|
||||
|
||||
<div id="bindWrap"><!--/* 공통으로 사용하는 영역 */--></div>
|
||||
<!--/* 공통으로 사용하는 모달 팝업 */-->
|
||||
<div class="layer-wrap">
|
||||
<div class="component-modal commModal" data-props-dimm-click="true">
|
||||
<div class="modal-dimm"></div>
|
||||
<div class="modal-frame">
|
||||
<div class="modal-container">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-tit">
|
||||
<!--/* bind title */-->
|
||||
</h3>
|
||||
</div>
|
||||
<div class="modal-content">
|
||||
<!--/* bind wrap */-->
|
||||
</div>
|
||||
<button type="button" class="modal-close"></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--/* //공통으로 사용하는 모달 팝업 */-->
|
||||
<!--/* 전체 메뉴 모달 팝업 */-->
|
||||
<th:block th:replace="~{common/menu-modal}"></th:block>
|
||||
<!--/* //전체 메뉴 모달 팝업 */-->
|
||||
</div>
|
||||
|
||||
<section layout:fragment="script"></section>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user