들여쓰기 변경

This commit is contained in:
주우성
2025-06-16 15:10:06 +09:00
parent 809f4d9f82
commit f31de2ba00
13 changed files with 2204 additions and 2203 deletions

View File

@@ -1,129 +1,52 @@
<!DOCTYPE html>
<html layout:decorate="~{layout/layout}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
xmlns:th="http://www.thymeleaf.org">
xmlns:th="http://www.thymeleaf.org">
<div layout:fragment="content">
<main id="content" role="main">
<style>
label {
display: inline-block;
width: 150px;
}
div {
margin-bottom: 15px;
}
.invalid-feedback {
display: none;
font-size: 12px;
font-weight: bold;
}
.is-invalid + .invalid-feedback {
display: block;
}
input[readonly] {
background-color: #e9ecef;
color: #6c757d;
cursor: not-allowed;
}
</style>
<div>
<form
method="get"
name="reqForm"
th:action="@{/user/info}" th:object="${userInfo}">
<input type="hidden" name="id" th:value="*{seq}">
<div>
<label for="householdNum">임가번호</label>
<input id="householdNum" name="householdNum" placeholder="아이디" readonly="readonly" th:field="*{householdNum}"
type="text">
<div class="invalid-feedback field-id"></div>
</div>
<div>
<label for="ownerName">경영주</label>
<input id="ownerName" name="ownerName" placeholder="경영주 이름" th:field="*{ownerName}" type="text">
<div class="invalid-feedback field-id"></div>
</div>
<div>
<label for="ownerAge">만나이</label>
<input id="ownerAge" name="ownerAge" placeholder="나이" th:field="*{ownerAge}" type="text">
<div class="invalid-feedback field-id"></div>
</div>
<div>
<label for="tel">가구연락처</label>
<input id="tel" name="tel" placeholder="가구연락처" th:field="*{tel}" type="text">
<div class="invalid-feedback field-id"></div>
</div>
<div>
<label for="phone">핸드폰번호</label>
<input id="phone" name="phone" placeholder="핸드폰번호" th:field="*{phone}" type="text">
<div class="invalid-feedback field-id"></div>
</div>
<!-- <div>-->
<!-- <label for="region">시.도</label>-->
<!-- <input id="region" name="region" placeholder="시.도" th:field="*{region}" type="text">-->
<!-- <div class="invalid-feedback field-id"></div>-->
<!-- </div>-->
<!-- <div>-->
<!-- <label for="city">시.군.도</label>-->
<!-- <input id="city" name="city" placeholder="시.군.도" th:field="*{city}" type="text">-->
<!-- <div class="invalid-feedback field-id"></div>-->
<!-- </div>-->
<div>
<label for="addressDetail">전체 주소</label>
<input id="addressDetail" name="addressDetail" placeholder="세부 주소" th:field="*{address}" type="text">
<div class="invalid-feedback field-id"></div>
</div>
</form>
<button onclick="updateUser();">수정하기</button>
</div>
</main>
<div layout:fragment="content" th:classappend="'mypage-wrap'">
<main id="content" role="main">
<div class="inner">
<hgroup class="tit-group">
<h3>
이번달의 <br>
<strong>은행 자동이체 내역 입력 현황</strong>을
확인하세요.
</h3>
</hgroup>
<ul class="product-col-list">
<li>
<a href="">
<p class="list-tit">수입</p>
<span class="tag">미등록</span>
</a>
</li>
<li class="complete">
<a href="">
<p class="list-tit">지출</p>
<span class="tag">등록완료</span>
</a>
</li>
</ul>
</div>
</main>
</div>
<section layout:fragment="script">
<script>
const updateUser = () => {
const f = document.reqForm;
const obj = $(f).serializeObject();
<script th:inline="javascript">
let ENV = {
httpUrl: {
root: /*[[#{uri.front.info.monthly.path}]]*/'rootUrl'
},
module: {
confirmPopup: null
},
submitted: false,
};
let formControl = {
init() {
// 기존 에러 메세지 초기화
$('.is-invalid').removeClass('is-invalid');
$.ajax({
method: 'PATCH',
url: '/api/front/household/update',
data: obj,
beforeSend: function (xhr) {
xhr.setRequestHeader(
$("meta[name='_csrf_header']").attr("content"),
$("meta[name='_csrf']").attr("content"));
},
success(res) {
if (confirm(`'${res.ownerName} 님의' 정보가 수정되었습니다.`)) {
location.reload();
}
},
statusCode: {
'422': (res) => {
const fieldErrors = res.responseJSON.fieldErrors;
$(fieldErrors).each(function (idx, error) {
let target = $(f).find('[name=' + error.field + ']');
target.addClass('is-invalid');
target.parent().find('.invalid-feedback').text(error.message);
});
}
}
})
}
</script>
}
}
</script>
</section>

View File

@@ -1,52 +1,52 @@
<!DOCTYPE html>
<html layout:decorate="~{layout/layout}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
xmlns:th="http://www.thymeleaf.org">
xmlns:th="http://www.thymeleaf.org">
<div layout:fragment="content" th:classappend="'mypage-wrap'">
<main id="content" role="main">
<div class="inner">
<hgroup class="tit-group">
<h3>
이번달의 <br>
<strong>은행 자동이체 내역 입력 현황</strong>을
확인하세요.
</h3>
</hgroup>
<ul class="product-col-list">
<li>
<a href="">
<p class="list-tit">수입</p>
<span class="tag">미등록</span>
</a>
</li>
<li class="complete">
<a href="">
<p class="list-tit">지출</p>
<span class="tag">등록완료</span>
</a>
</li>
</ul>
</div>
</main>
<main id="content" role="main">
<div class="inner">
<hgroup class="tit-group">
<h3>
이번달의 <br>
<strong>은행 자동이체 내역 입력 현황</strong>을
확인하세요.
</h3>
</hgroup>
<ul class="product-col-list">
<li>
<a href="">
<p class="list-tit">수입</p>
<span class="tag">미등록</span>
</a>
</li>
<li class="complete">
<a href="">
<p class="list-tit">지출</p>
<span class="tag">등록완료</span>
</a>
</li>
</ul>
</div>
</main>
</div>
<section layout:fragment="script">
<script th:inline="javascript">
let ENV = {
httpUrl: {
root: /*[[#{uri.front.info.monthly.path}]]*/'rootUrl'
},
module:{
confirmPopup : null
},
submitted: false,
};
let formControl = {
init(){
<script th:inline="javascript">
let ENV = {
httpUrl: {
root: /*[[#{uri.front.info.monthly.path}]]*/'rootUrl'
},
module: {
confirmPopup: null
},
submitted: false,
};
let formControl = {
init() {
}
}
</script>
}
}
</script>
</section>

View File

@@ -1,52 +1,52 @@
<!DOCTYPE html>
<html layout:decorate="~{layout/layout}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
xmlns:th="http://www.thymeleaf.org">
xmlns:th="http://www.thymeleaf.org">
<div layout:fragment="content" th:classappend="'mypage-wrap'">
<main id="content" role="main">
<div class="inner">
<hgroup class="tit-group">
<h3>
이번달의 <br>
<strong>은행 자동이체 내역 입력 현황</strong>을
확인하세요.
</h3>
</hgroup>
<ul class="product-col-list">
<li>
<a href="">
<p class="list-tit">수입</p>
<span class="tag">미등록</span>
</a>
</li>
<li class="complete">
<a href="">
<p class="list-tit">지출</p>
<span class="tag">등록완료</span>
</a>
</li>
</ul>
</div>
</main>
<main id="content" role="main">
<div class="inner">
<hgroup class="tit-group">
<h3>
이번달의 <br>
<strong>은행 자동이체 내역 입력 현황</strong>을
확인하세요.
</h3>
</hgroup>
<ul class="product-col-list">
<li>
<a href="">
<p class="list-tit">수입</p>
<span class="tag">미등록</span>
</a>
</li>
<li class="complete">
<a href="">
<p class="list-tit">지출</p>
<span class="tag">등록완료</span>
</a>
</li>
</ul>
</div>
</main>
</div>
<section layout:fragment="script">
<script th:inline="javascript">
let ENV = {
httpUrl: {
root: /*[[#{uri.front.info.monthly.path}]]*/'rootUrl'
},
module:{
confirmPopup : null
},
submitted: false,
};
let formControl = {
init(){
<script th:inline="javascript">
let ENV = {
httpUrl: {
root: /*[[#{uri.front.info.monthly.path}]]*/'rootUrl'
},
module: {
confirmPopup: null
},
submitted: false,
};
let formControl = {
init() {
}
}
</script>
}
}
</script>
</section>

View File

@@ -1,93 +1,95 @@
<!DOCTYPE html>
<html layout:decorate="~{layout/layout}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
xmlns:th="http://www.thymeleaf.org">
xmlns:th="http://www.thymeleaf.org">
<div layout:fragment="content" th:classappend="'mypage-wrap bg-gray'">
<main id="content" role="main">
<!-- alert-box 클래스 리스트
fail : 실패(빨강)
warning : 경고(노랑)
success : 성공(초록)
info : 인포(파랑)
-->
<article class="alert-box warning" th:if="${isUnregisteredDate}"> <!-- TODO Controller 단에서 처리 필요. 임시 -->
<p class="tit"><strong th:text="${userInfo?.ownerName}">홍길동</strong>님,</p>
<span class="txt">
<main id="content" role="main">
<!-- alert-box 클래스 리스트
fail : 실패(빨강)
warning : 경고(노랑)
success : 성공(초록)
info : 인포(파랑)
-->
<article class="alert-box warning" th:if="${isUnregisteredDate}"> <!-- TODO Controller 단에서 처리 필요. 임시 -->
<p class="tit"><strong th:text="${userInfo?.ownerName}">홍길동</strong>님,</p>
<span class="txt">
일계부를 등록하지 않은 날짜가 있습니다. <br>
정확한 조사를 위해 꾸준히 입력해 주세요.
</span>
</article>
</article>
<section class="info-top-area">
<div class="inner">
<dl class="info-card">
<dt class="name" th:text="${userInfo?.ownerName}"></dt>
<dd class="location" th:text="${userInfo?.address}"></dd><!-- TODO 임가 주소 위치 임시로 . 처리함. -->
<dd class="date" th:if="${latestRegisteredDate != null or !#strings.isEmpty(latestRegisteredDate)}" th:text="${'최근등록: '+latestRegisteredDate}"></dd>
</dl>
<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>
</th:block>
<section class="info-top-area">
<div class="inner">
<dl class="info-card">
<dt class="name" th:text="${userInfo?.ownerName}"></dt>
<dd class="location" th:text="${userInfo?.address}"></dd><!-- TODO 임가 주소 위치 임시로 . 처리함. -->
<dd class="date" th:if="${latestRegisteredDate != null or !#strings.isEmpty(latestRegisteredDate)}"
th:text="${'최근등록: '+latestRegisteredDate}"></dd>
</dl>
<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>
</th:block>
</div>
</section>
</div>
</section>
<section class="info-bottom-area bg-white bg-lround">
<ul class="btn-link-list">
<li>
<a href="/info/user/password">
<i class="ico-privacy ico-normal" aria-hidden="true"></i>
<dl>
<dt>개인정보 변경</dt>
<dd>이름, 주소, 연락처를 수정할 수 있어요</dd>
</dl>
</a>
</li>
<li>
<a href="/info/monthly">
<i class="ico-chart ico-normal" aria-hidden="true"></i>
<dl>
<dt>임산물 현황</dt>
<dd>이번 달 생산한 임산물을 입력해 주세요</dd>
</dl>
</a>
</li>
<li>
<a href="/info/bank">
<i class="ico-bank ico-normal" aria-hidden="true"></i>
<dl>
<dt>은행 자동이체 내역</dt>
<dd>자동으로 입금·출금된 금액을 <br>
기록해 주세요</dd>
</dl>
</a>
</li>
</ul>
</section>
</main>
<section class="info-bottom-area bg-white bg-lround">
<ul class="btn-link-list">
<li>
<a href="/info/user/password">
<i class="ico-privacy ico-normal" aria-hidden="true"></i>
<dl>
<dt>개인정보 변경</dt>
<dd>이름, 주소, 연락처를 수정할 수 있어요</dd>
</dl>
</a>
</li>
<li>
<a href="/info/monthly">
<i class="ico-chart ico-normal" aria-hidden="true"></i>
<dl>
<dt>임산물 현황</dt>
<dd>이번 달 생산한 임산물을 입력해 주세요</dd>
</dl>
</a>
</li>
<li>
<a href="/info/bank">
<i class="ico-bank ico-normal" aria-hidden="true"></i>
<dl>
<dt>은행 자동이체 내역</dt>
<dd>자동으로 입금·출금된 금액을 <br>
기록해 주세요
</dd>
</dl>
</a>
</li>
</ul>
</section>
</main>
</div>
<section layout:fragment="script">
<script th:inline="javascript">
let ENV = {
httpUrl: {
root: /*[[#{uri.front.info.path}]]*/'rootUrl',
},
submitted: false,
};
<script th:inline="javascript">
let ENV = {
httpUrl: {
root: /*[[#{uri.front.info.path}]]*/'rootUrl',
},
submitted: false,
};
let formControl = {
createValid() {
let formControl = {
createValid() {
}
};
</script>
}
};
</script>
</section>

File diff suppressed because it is too large Load Diff

View File

@@ -1,45 +1,46 @@
<!DOCTYPE html>
<html layout:decorate="~{layout/layout}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
xmlns:th="http://www.thymeleaf.org">
xmlns:th="http://www.thymeleaf.org">
<div layout:fragment="content" th:classappend="'mypage-wrap'">
<main id="content" role="main">
<div class="inner">
<hgroup class="tit-group">
<h3>
월별 등록된 <strong>임산물 현황</strong>을 <br> 확인하세요.
</h3>
</hgroup>
<ul class="product-col-list">
<main id="content" role="main">
<div class="inner">
<hgroup class="tit-group">
<h3>
월별 등록된 <strong>임산물 현황</strong>을 <br> 확인하세요.
</h3>
</hgroup>
<ul class="product-col-list">
<li th:each="item : ${list.content}" th:classappend="${item.forestProductStatus != MonthStatus.NONE} ? ' complete'">
<a th:href="@{/info/monthly/create/{id}(id=${item.id})}">
<p class="list-tit" th:text="${item.koreanMonth}"></p>
<span class="tag" th:text="${item.forestProductStatus.desc}"></span>
</a>
</li>
</ul>
</div>
</main>
<li th:each="item : ${list.content}"
th:classappend="${item.forestProductStatus != MonthStatus.NONE} ? ' complete'">
<a th:href="@{/info/monthly/create/{id}(id=${item.id})}">
<p class="list-tit" th:text="${item.koreanMonth}"></p>
<span class="tag" th:text="${item.forestProductStatus.desc}"></span>
</a>
</li>
</ul>
</div>
</main>
</div>
<section layout:fragment="script">
<script th:inline="javascript">
let ENV = {
httpUrl: {
root: /*[[#{uri.front.info.monthly.path}]]*/'rootUrl'
},
module:{
confirmPopup : null
},
submitted: false,
};
let formControl = {
init(){
<script th:inline="javascript">
let ENV = {
httpUrl: {
root: /*[[#{uri.front.info.monthly.path}]]*/'rootUrl'
},
module: {
confirmPopup: null
},
submitted: false,
};
let formControl = {
init() {
}
}
</script>
}
}
</script>
</section>

File diff suppressed because it is too large Load Diff

View File

@@ -1,119 +1,129 @@
<!DOCTYPE html>
<html layout:decorate="~{layout/layout}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
xmlns:th="http://www.thymeleaf.org">
xmlns:th="http://www.thymeleaf.org">
<div layout:fragment="content" th:classappend="'mypage-wrap'">
<main id="content" role="main">
<div class="inner">
<section class="search-area">
<form autocomplete="off" method="get" name="reqForm" action="/info/notice" onsubmit="formControl.goSearch()"
th:object="${reqVO}"
>
<input type="hidden" name="sort" id="sort" value="createdAt,DESC"/>
<input type="hidden" name="page" id="page" th:value="${notices != null} ? ${notices.number} : 0"/>
<main id="content" role="main">
<div class="inner">
<section class="search-area">
<form autocomplete="off" method="get" name="reqForm" action="/info/notice"
onsubmit="formControl.goSearch()"
th:object="${reqVO}"
>
<input type="hidden" name="sort" id="sort" value="createdAt,DESC"/>
<input type="hidden" name="page" id="page" th:value="${notices != null} ? ${notices.number} : 0"/>
<div id="searchFieldId" class="component-select bottom-sheet" data-props-default="제목 + 내용" data-props-type="bottomSheet">
<input type="hidden" name="searchField"/>
<button type="button" class="select-box">
<span class="select-txt">제목 + 내용</span>
</button>
<div class="select-options">
<div class="select-header">
<p>검색 분류 선택</p>
<button type="button" class="select-close">
<span class="hide-txt">닫기</span>
</button>
</div>
<div class="select-scroll">
<ul class="">
<li class="option" th:classappend="*{searchField == null or searchField == 'titleContent'} ? ' current' : ''" data-value="titleContent">제목 + 내용</li>
<li class="option" th:classappend="*{searchField == 'title'} ? ' current' : ''" data-value="title">제목</li>
<li class="option" th:classappend="*{searchField == 'content'} ? ' current' : ''" data-value="content">내용</li>
</ul>
</div>
</div>
</div>
<div class="component-input">
<div class="input-field">
<input type="text" id="temp_input_ico_id_0001" placeholder="검색어를 입력해 주세요" name="searchValue" th:field="*{searchValue}"/>
<i class="input-field-ico ico-search" aria-hidden="true" onclick="formControl.goSearch()"></i>
</div>
</div>
</form>
</section>
<hr>
<div id="searchFieldId" class="component-select bottom-sheet" data-props-default="제목 + 내용"
data-props-type="bottomSheet">
<input type="hidden" name="searchField"/>
<button type="button" class="select-box">
<span class="select-txt">제목 + 내용</span>
</button>
<div class="select-options">
<div class="select-header">
<p>검색 분류 선택</p>
<button type="button" class="select-close">
<span class="hide-txt">닫기</span>
</button>
</div>
<div class="select-scroll">
<ul class="">
<li class="option"
th:classappend="*{searchField == null or searchField == 'titleContent'} ? ' current' : ''"
data-value="titleContent">제목 + 내용
</li>
<li class="option" th:classappend="*{searchField == 'title'} ? ' current' : ''"
data-value="title">제목
</li>
<li class="option" th:classappend="*{searchField == 'content'} ? ' current' : ''"
data-value="content">내용
</li>
</ul>
</div>
</div>
</div>
<div class="component-input">
<div class="input-field">
<input type="text" id="temp_input_ico_id_0001" placeholder="검색어를 입력해 주세요" name="searchValue"
th:field="*{searchValue}"/>
<i class="input-field-ico ico-search" aria-hidden="true"
onclick="formControl.goSearch()"></i>
</div>
</div>
</form>
</section>
<hr>
<section class="list-area" th:unless="${notices.content.size() > 0}">
<div class="no-data">
<i class="ico-nodata ico-large" aria-hidden="true"></i>
<p>조회 가능한 목록이 없습니다.</p>
</div>
</section>
<section class="list-area" th:unless="${notices.content.size() > 0}">
<div class="no-data">
<i class="ico-nodata ico-large" aria-hidden="true"></i>
<p>조회 가능한 목록이 없습니다.</p>
</div>
</section>
<section class="list-area" th:if="${notices.content.size() > 0}">
<p class="total-num">
총 <strong th:text="${notices.totalElements}"></strong>건
</p>
<ul>
<section class="list-area" th:if="${notices.content.size() > 0}">
<p class="total-num">
총 <strong th:text="${notices.totalElements}"></strong>건
</p>
<ul>
<li th:each="item : ${notices.content}">
<a th:href="@{'/info/notice/' + ${item.id}}">
<p class="list-tit" th:text="${item.title}"></p>
<p class="list-info">
<span class="date" th:text="${#temporals.format(item.createdAt, 'yyyy.MM.dd')}">2025.05.28</span>
<span class="badge" th:if="${item.newDate}">NEW</span>
</p>
</a>
</li>
<li th:each="item : ${notices.content}">
<a th:href="@{'/info/notice/' + ${item.id}}">
<p class="list-tit" th:text="${item.title}"></p>
<p class="list-info">
<span class="date" th:text="${#temporals.format(item.createdAt, 'yyyy.MM.dd')}">2025.05.28</span>
<span class="badge" th:if="${item.newDate}">NEW</span>
</p>
</a>
</li>
</ul>
</ul>
<div th:replace="common/list-components :: paginationCommon(${notices})"></div>
<div th:replace="common/list-components :: paginationCommon(${notices})"></div>
</section>
</section>
</div>
</main>
</div>
</main>
</div>
<section layout:fragment="script">
<script th:inline="javascript">
let ENV = {
httpUrl: {
root: /*[[#{uri.front.info.notice.path}]]*/'detailUrl',
notice: /*[[#{uri.front.info.notice.path}]]*/'noticeUrl'
},
module:{
confirmPopup : null
},
submitted: false,
};
let formControl = {
init(){
<script th:inline="javascript">
let ENV = {
httpUrl: {
root: /*[[#{uri.front.info.notice.path}]]*/'detailUrl',
notice: /*[[#{uri.front.info.notice.path}]]*/'noticeUrl'
},
module: {
confirmPopup: null
},
submitted: false,
};
let formControl = {
init() {
},
},
/**
* TODO 검색할때 각 페이지에 함수 구현 필요.
* TODO 일단 뒤로가기에 대한 부분 정의가 없기에 페이지 이동으로 처리해둠...
*/
goSearch(){
const f = document.reqForm;
/**
* TODO 검색할때 각 페이지에 함수 구현 필요.
* TODO 일단 뒤로가기에 대한 부분 정의가 없기에 페이지 이동으로 처리해둠...
*/
goSearch() {
const f = document.reqForm;
f.searchField.value = document.getElementById('searchFieldId').value;
f.submit();
},
goPageable(page, size, sort){
const f = document.reqForm;
f.page.value = page;
f.submit();
}
}
</script>
f.searchField.value = document.getElementById('searchFieldId').value;
f.submit();
},
goPageable(page, size, sort) {
const f = document.reqForm;
f.page.value = page;
f.submit();
}
}
</script>
</section>

View File

@@ -1,71 +1,72 @@
<!DOCTYPE html>
<html layout:decorate="~{layout/layout}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
xmlns:th="http://www.thymeleaf.org">
xmlns:th="http://www.thymeleaf.org">
<div layout:fragment="content" th:classappend="'mypage-wrap'">
<main id="content" role="main">
<div class="detail-wrap">
<div class="inner">
<dl class="detail-tit-group">
<dt th:text="${notice.title}"></dt>
<dd>[[${#temporals.format(notice.createdAt, 'yyyy.MM.dd')}]] <span class="badge" th:if="${notice.newDate}">new</span></dd>
</dl>
<div class="detail-content">
<p th:utext="${notice.content}"></p>
</div>
<main id="content" role="main">
<div class="detail-wrap">
<div class="inner">
<dl class="detail-tit-group">
<dt th:text="${notice.title}"></dt>
<dd>[[${#temporals.format(notice.createdAt, 'yyyy.MM.dd')}]] <span class="badge"
th:if="${notice.newDate}">new</span>
</dd>
</dl>
<div class="detail-content">
<p th:utext="${notice.content}"></p>
</div>
<div class="download-file" th:if="${!#lists.isEmpty(notice.uploadFiles)}">
<p class="tit">첨부파일</p>
<ul>
<li th:each="item : ${notice.uploadFiles}"><a th:href="${item.attachmentURL}" download
th:text="${item.originName}"></a></li>
</ul>
</div>
<button type="button" class="btn btn-list btn-full" onclick="formControl.goList()">
<span class="btn-txt">목록</span>
</button>
<div class="download-file" th:if="${!#lists.isEmpty(notice.uploadFiles)}">
<p class="tit">첨부파일</p>
<ul>
<li th:each="item : ${notice.uploadFiles}"><a th:href="${item.attachmentURL}" download th:text="${item.originName}"></a></li>
</ul>
</div>
<button type="button" class="btn btn-list btn-full" onclick="formControl.goList()">
<span class="btn-txt">목록</span>
</button>
</div>
</div>
</main>
</div>
</div>
</main>
</div>
root: /*[[|#{uri.front.info.user.path}/password|]]*/'rootUrl',
<section layout:fragment="script">
<script th:inline="javascript">
let ENV = {
httpUrl: {
root: /*[[#{uri.front.info.notice.path}]]*/'detailUrl',
notice: /*[[#{uri.front.info.notice.path}]]*/'noticeUrl'
},
module:{
confirmPopup : null
},
submitted: false,
};
let formControl = {
init() {
<script th:inline="javascript">
let ENV = {
httpUrl: {
root: /*[[#{uri.front.info.notice.path}]]*/'detailUrl',
notice: /*[[#{uri.front.info.notice.path}]]*/'noticeUrl'
},
module: {
confirmPopup: null
},
submitted: false,
};
let formControl = {
init() {
},
goList(){
/**
* TODO 외부 유입에 따라 history.back과 location.href 가 적절하게 사용되어야함...
* 전체적인 수정 필요.(이전 페이지
*/
const previousUrl = document.referrer;
},
goList() {
/**
* TODO 외부 유입에 따라 history.back과 location.href 가 적절하게 사용되어야함...
* 전체적인 수정 필요.(이전 페이지
*/
const previousUrl = document.referrer;
if (previousUrl.includes('/info/notice')) {
history.back();
} else {
location.href = '/info/notice';
}
if (previousUrl.includes('/info/notice')) {
history.back();
} else {
location.href = '/info/notice';
}
}
}
}
</script>
}
</script>
</section>

View File

@@ -1,83 +1,83 @@
<!DOCTYPE html>
<html layout:decorate="~{layout/layout}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
xmlns:th="http://www.thymeleaf.org">
xmlns:th="http://www.thymeleaf.org">
<div layout:fragment="content" th:classappend="'mypage-wrap'">
<main id="content" role="main">
<div class="inner">
<hgroup class="tit-group">
<h3>
개인정보 보호를 위해 <br>
<strong>비밀번호를 다시 입력</strong>해 주세요.
</h3>
<p>본인 확인 후 개인정보 변경이 가능합니다.</p>
</hgroup>
<main id="content" role="main">
<div class="inner">
<hgroup class="tit-group">
<h3>
개인정보 보호를 위해 <br>
<strong>비밀번호를 다시 입력</strong>해 주세요.
</h3>
<p>본인 확인 후 개인정보 변경이 가능합니다.</p>
</hgroup>
<section class="form-group">
<form method="post" name="reqForm" id="reqForm" onsubmit="formControl.authInfoUser();" th:action="@{/}" >
<div class="component-input" data-props-toggle-Password="true">
<div class="input-label">
<label for="password" class="label-txt">비밀번호</label>
</div>
<div class="input-field">
<input type="password" id="password" placeholder="비밀번호 4자리를 입력해 주세요" name="password" maxlength="4">
</div>
</div>
<div class="component-btns">
<div class="btns-row">
<button type="button" class="btn btn-full btn-l btn-primary" onclick="formControl.authInfoUser()">
<span class="btn-txt">다음</span>
</button>
</div>
</div>
</form>
</section>
<section class="form-group">
<form method="post" name="reqForm" id="reqForm" onsubmit="formControl.authInfoUser();" th:action="@{/}">
<div class="component-input" data-props-toggle-Password="true">
<div class="input-label">
<label for="password" class="label-txt">비밀번호</label>
</div>
<div class="input-field">
<input type="password" id="password" placeholder="비밀번호 4자리를 입력해 주세요" name="password"
maxlength="4">
</div>
</div>
<div class="component-btns">
<div class="btns-row">
<button type="button" class="btn btn-full btn-l btn-primary"
onclick="formControl.authInfoUser()">
<span class="btn-txt">다음</span>
</button>
</div>
</div>
</form>
</section>
</div>
</main>
</div>
</main>
</div>
<section layout:fragment="script">
<script th:inline="javascript">
let ENV = {
httpUrl: {
root: /*[[|#{uri.front.info.user.path}/password|]]*/'rootUrl',
auth: /*[[|/api/front#{uri.front.info.user.path}/password/auth|]]*/'passwordAuthUrl',
user: /*[[#{uri.front.info.user.path}]]*/'userUrl',
<script th:inline="javascript">
let ENV = {
httpUrl: {
root: /*[[|#{uri.front.info.user.path}/password|]]*/'rootUrl',
auth: /*[[|/api/front#{uri.front.info.user.path}/password/auth|]]*/'passwordAuthUrl',
user: /*[[#{uri.front.info.user.path}]]*/'userUrl',
},
},
submitted: false,
};
let formControl = {
authInfoUser() {
const f = document.reqForm;
submitted: false,
};
let formControl = {
authInfoUser() {
const f = document.reqForm;
const obj = $(f).serializeObject();
console.log(obj)
ajaxUtil._ajaxAsync(
ENV.httpUrl.auth,
obj,
function (rstData, status) {
if(rstData.code ==='SUCCESS'){
location.replace(ENV.httpUrl.user);
} else if (rstData.code === 'ERROR'){
if(rstData.message ==='INVALID_PASSWORD'){
ajaxUtil._alert('입력하신 정보가 맞지 않습니다.\n 다시 확인해주세요.',null);
} else {
ajaxUtil._alert('잠시 뒤에 다시 시도해 주세요.', null);
}
}
},
);
}
};
</script>
const obj = $(f).serializeObject();
console.log(obj)
ajaxUtil._ajaxAsync(
ENV.httpUrl.auth,
obj,
function (rstData, status) {
if (rstData.code === 'SUCCESS') {
location.replace(ENV.httpUrl.user);
} else if (rstData.code === 'ERROR') {
if (rstData.message === 'INVALID_PASSWORD') {
ajaxUtil._alert('입력하신 정보가 맞지 않습니다.\n 다시 확인해주세요.', null);
} else {
ajaxUtil._alert('잠시 뒤에 다시 시도해 주세요.', null);
}
}
},
);
}
};
</script>
</section>

View File

@@ -1,364 +1,376 @@
<!DOCTYPE html>
<html layout:decorate="~{layout/layout-none}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
xmlns:th="http://www.thymeleaf.org">
xmlns:th="http://www.thymeleaf.org">
<div layout:fragment="content" th:classappend="'mypage-wrap'">
<main id="content" role="main">
<div class="inner">
<main id="content" role="main">
<div class="inner">
<p class="form-desc">필수입력</p>
<p class="form-desc">필수입력</p>
<section class="form-group">
<form method="post" name="reqForm" id="reqForm" onsubmit="formControl.authInfoUser();" th:action="@{/api/front/info/user/update}" th:object="${userInfo}">
<!-- 이름 -->
<div class="component-input">
<div class="input-label">
<label for="temp_input_0001" class="label-txt">
이름<i class="ico-required-mark" role="img" aria-label="필수">*</i>
</label>
</div>
<div class="input-field">
<input type="text" id="temp_input_0001" placeholder="이름을 입력해 주세요" th:field="*{ownerName}" maxlength="10">
</div>
</div>
<!-- 연령 -->
<div class="component-input">
<div class="input-label">
<label for="temp_input_0002" class="label-txt">
연령<span>(만 나이)</span> <i class="ico-required-mark" role="img" aria-label="필수">*</i>
</label>
</div>
<div class="input-field">
<input type="text" id="temp_input_0002" placeholder="만 나이를 입력해 주세요" th:field="*{ownerAge}" maxlength="3" oninput="this.value=this.value.replace(/[^0-9]/g,'')">
</div>
</div>
<!-- 가구연락처 -->
<div class="input-flex-group type-num">
<div class="input-label">
<label for="tel1Id" class="label-txt">
가구 연락처
</label>
</div>
<div class="d-flex">
<div class="select-group">
<section class="form-group">
<form method="post" name="reqForm" id="reqForm" onsubmit="formControl.authInfoUser();"
th:action="@{/api/front/info/user/update}" th:object="${userInfo}">
<!-- 이름 -->
<div class="component-input">
<div class="input-label">
<label for="temp_input_0001" class="label-txt">
이름<i class="ico-required-mark" role="img" aria-label="필수">*</i>
</label>
</div>
<div class="input-field">
<input type="text" id="temp_input_0001" placeholder="이름을 입력해 주세요" th:field="*{ownerName}"
maxlength="10">
</div>
</div>
<!-- 연령 -->
<div class="component-input">
<div class="input-label">
<label for="temp_input_0002" class="label-txt">
연령<span>(만 나이)</span> <i class="ico-required-mark" role="img" aria-label="필수">*</i>
</label>
</div>
<div class="input-field">
<input type="text" id="temp_input_0002" placeholder="만 나이를 입력해 주세요" th:field="*{ownerAge}"
maxlength="3" oninput="this.value=this.value.replace(/[^0-9]/g,'')">
</div>
</div>
<!-- 가구연락처 -->
<div class="input-flex-group type-num">
<div class="input-label">
<label for="tel1Id" class="label-txt">
가구 연락처
</label>
</div>
<div class="d-flex">
<div class="select-group">
<div id="tel1Id" class="component-select bottom-sheet" th:data-props-default="${userInfo.tel1}" data-props-type="bottomSheet">
<input type="hidden" th:field="*{tel1}" data-type="select">
<button type="button" class="select-box">
<span class="select-txt"></span>
</button>
<div class="select-options">
<div class="select-header">
<p>가구 연락처</p>
<button type="button" class="select-close">
<span class="hide-txt">닫기</span>
</button>
</div>
<div class="select-scroll">
<ul class="">
<li class="option" data-value="02">02</li>
<li class="option" data-value="31">31</li>
<li class="option" data-value="033">033</li>
<li class="option" data-value="042">042</li>
<li class="option" data-value="043">043</li>
<li class="option" data-value="051">051</li>
<li class="option" data-value="052">052</li>
<li class="option" data-value="053">053</li>
<li class="option" data-value="054">054</li>
<li class="option" data-value="055">055</li>
<li class="option" data-value="061">061</li>
<li class="option" data-value="062">062</li>
<li class="option" data-value="063">063</li>
<li class="option" data-value="064">064</li>
<li class="option" data-value="010">010</li>
<li class="option" data-value="011">011</li>
<li class="option" data-value="111">111</li>
</ul>
</div>
</div>
</div>
</div>
<div class="component-input">
<div class="input-field">
<input type="text" placeholder=0000 th:field="*{tel2}" maxlength="4" oninput="this.value=this.value.replace(/[^0-9]/g,'')"/>
</div>
</div>
<div class="component-input">
<div class="input-field">
<input type="text" placeholder=0000 th:field="*{tel3}" maxlength="4" oninput="this.value=this.value.replace(/[^0-9]/g,'')"/>
</div>
</div>
</div>
</div>
<!-- 휴대폰 번호 -->
<div class="input-flex-group type-num">
<div class="input-label">
<label for="phoneId" class="label-txt">
휴대폰 번호 <i class="ico-required-mark" role="img" aria-label="필수">*</i>
</label>
</div>
<div class="d-flex">
<div class="select-group">
<div id="tel1Id" class="component-select bottom-sheet"
th:data-props-default="${userInfo.tel1}" data-props-type="bottomSheet">
<input type="hidden" th:field="*{tel1}" data-type="select">
<button type="button" class="select-box">
<span class="select-txt"></span>
</button>
<div class="select-options">
<div class="select-header">
<p>가구 연락처</p>
<button type="button" class="select-close">
<span class="hide-txt">닫기</span>
</button>
</div>
<div class="select-scroll">
<ul class="">
<li class="option" data-value="02">02</li>
<li class="option" data-value="31">31</li>
<li class="option" data-value="033">033</li>
<li class="option" data-value="042">042</li>
<li class="option" data-value="043">043</li>
<li class="option" data-value="051">051</li>
<li class="option" data-value="052">052</li>
<li class="option" data-value="053">053</li>
<li class="option" data-value="054">054</li>
<li class="option" data-value="055">055</li>
<li class="option" data-value="061">061</li>
<li class="option" data-value="062">062</li>
<li class="option" data-value="063">063</li>
<li class="option" data-value="064">064</li>
<li class="option" data-value="010">010</li>
<li class="option" data-value="011">011</li>
<li class="option" data-value="111">111</li>
</ul>
</div>
</div>
</div>
</div>
<div class="component-input">
<div class="input-field">
<input type="text" placeholder=0000 th:field="*{tel2}" maxlength="4"
oninput="this.value=this.value.replace(/[^0-9]/g,'')"/>
</div>
</div>
<div class="component-input">
<div class="input-field">
<input type="text" placeholder=0000 th:field="*{tel3}" maxlength="4"
oninput="this.value=this.value.replace(/[^0-9]/g,'')"/>
</div>
</div>
</div>
</div>
<!-- 휴대폰 번호 -->
<div class="input-flex-group type-num">
<div class="input-label">
<label for="phoneId" class="label-txt">
휴대폰 번호 <i class="ico-required-mark" role="img" aria-label="필수">*</i>
</label>
</div>
<div class="d-flex">
<div class="select-group">
<div id="phoneId" class="component-select bottom-sheet" th:data-props-default="${userInfo.phone1}" data-props-type="bottomSheet">
<input type="hidden" th:field="*{phone1}" data-type="select">
<button type="button" class="select-box">
<span class="select-txt"></span>
</button>
<div class="select-options">
<div class="select-header">
<p>휴대폰 번호</p>
<button type="button" class="select-close">
<span class="hide-txt">닫기</span>
</button>
</div>
<div class="select-scroll">
<ul class="">
<li class="option" data-value="010">010</li>
<li class="option" data-value="011">011</li>
</ul>
</div>
</div>
</div>
</div>
<div class="component-input">
<div class="input-field">
<input type="text" id="temp_input_0006" placeholder=0000 th:field="*{phone2}" maxlength="4" oninput="this.value=this.value.replace(/[^0-9]/g,'')">
</div>
</div>
<div class="component-input">
<div class="input-field">
<input type="text" id="temp_input_0007" placeholder=0000 th:field="*{phone3}" maxlength="4" oninput="this.value=this.value.replace(/[^0-9]/g,'')">
</div>
</div>
</div>
</div>
<!-- 도로명 주소 -->
<div class="input-col-group">
<div class="select-group">
<div class="select-label">
<p class="label-txt">
도로명 주소
<i class="ico-required-mark" role="img" aria-label="필수">*</i>
</p>
</div>
<div id="phoneId" class="component-select bottom-sheet"
th:data-props-default="${userInfo.phone1}" data-props-type="bottomSheet">
<input type="hidden" th:field="*{phone1}" data-type="select">
<button type="button" class="select-box">
<span class="select-txt"></span>
</button>
<div class="select-options">
<div class="select-header">
<p>휴대폰 번호</p>
<button type="button" class="select-close">
<span class="hide-txt">닫기</span>
</button>
</div>
<div class="select-scroll">
<ul class="">
<li class="option" data-value="010">010</li>
<li class="option" data-value="011">011</li>
</ul>
</div>
</div>
</div>
</div>
<div class="component-input">
<div class="input-field">
<input type="text" id="temp_input_0006" placeholder=0000 th:field="*{phone2}"
maxlength="4" oninput="this.value=this.value.replace(/[^0-9]/g,'')">
</div>
</div>
<div class="component-input">
<div class="input-field">
<input type="text" id="temp_input_0007" placeholder=0000 th:field="*{phone3}"
maxlength="4" oninput="this.value=this.value.replace(/[^0-9]/g,'')">
</div>
</div>
</div>
</div>
<!-- 도로명 주소 -->
<div class="input-col-group">
<div class="select-group">
<div class="select-label">
<p class="label-txt">
도로명 주소
<i class="ico-required-mark" role="img" aria-label="필수">*</i>
</p>
</div>
<div id="regionMainCodeId" class="component-select bottom-sheet" data-props-default="시/도 선택" data-props-type="bottomSheet">
<input type="hidden" th:field="*{regionMainCode}" data-type="select">
<button type="button" class="select-box">
<span class="select-txt">선택</span>
</button>
<div class="select-options">
<div class="select-header">
<p>시/도 선택</p>
<button type="button" class="select-close">
<span class="hide-txt">닫기</span>
</button>
</div>
<div class="select-scroll">
<ul class="">
<th:block th:each="item : ${regionMainList}">
<li class="option" th:data-value="${item.id}" th:text="${item.codeText}">option1</li>
</th:block>
</ul>
</div>
</div>
</div>
<div id="regionMainCodeId" class="component-select bottom-sheet" data-props-default="시/도 선택"
data-props-type="bottomSheet">
<input type="hidden" th:field="*{regionMainCode}" data-type="select">
<button type="button" class="select-box">
<span class="select-txt">선택</span>
</button>
<div class="select-options">
<div class="select-header">
<p>시/도 선택</p>
<button type="button" class="select-close">
<span class="hide-txt">닫기</span>
</button>
</div>
<div class="select-scroll">
<ul class="">
<th:block th:each="item : ${regionMainList}">
<li class="option" th:data-value="${item.id}"
th:text="${item.codeText}">option1
</li>
</th:block>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="select-group">
<div id="regionSubCodeId" class="component-select bottom-sheet" data-props-default="시/군/구 선택" data-props-type="bottomSheet">
<input type="hidden" th:field="*{regionSubCode}" data-type="select">
<button type="button" class="select-box">
<span class="select-txt">선택</span>
</button>
<div class="select-options">
<div class="select-header">
<p>시/군/구 선택</p>
<button type="button" class="select-close">
<span class="hide-txt">닫기</span>
</button>
</div>
<div class="select-scroll">
<ul class="">
<th:block th:each="item : ${regionSubList}">
<li class="option" th:data-value="${item.id}" th:text="${item.codeText}" >option1</li>
</th:block>
<div class="select-group">
<div id="regionSubCodeId" class="component-select bottom-sheet"
data-props-default="시/군/구 선택" data-props-type="bottomSheet">
<input type="hidden" th:field="*{regionSubCode}" data-type="select">
<button type="button" class="select-box">
<span class="select-txt">선택</span>
</button>
<div class="select-options">
<div class="select-header">
<p>시/군/구 선택</p>
<button type="button" class="select-close">
<span class="hide-txt">닫기</span>
</button>
</div>
<div class="select-scroll">
<ul class="">
<th:block th:each="item : ${regionSubList}">
<li class="option" th:data-value="${item.id}"
th:text="${item.codeText}">option1
</li>
</th:block>
</ul>
</div>
</div>
</div>
</div>
<div class="component-input">
<div class="input-field">
<input type="text" id="temp_input_00023" placeholder="세부 주소를 입력해 주세요" th:field="*{address}" maxlength="50"/>
</div>
</div>
</div>
</form>
</section>
</ul>
</div>
</div>
</div>
</div>
<div class="component-input">
<div class="input-field">
<input type="text" id="temp_input_00023" placeholder="세부 주소를 입력해 주세요"
th:field="*{address}" maxlength="50"/>
</div>
</div>
</div>
</form>
</section>
<div class="component-btns">
<div class="btns-row">
<button type="button" class="btn btn-full btn-l btn-primary" onclick="formControl.confirmPopup()">
<span class="btn-txt">변경</span>
</button>
</div>
</div>
<div class="component-btns">
<div class="btns-row">
<button type="button" class="btn btn-full btn-l btn-primary" onclick="formControl.confirmPopup()">
<span class="btn-txt">변경</span>
</button>
</div>
</div>
</div>
</main>
</div>
</main>
<!-- 모달 팝업 -->
<div class="layer-wrap">
<div class="component-modal confirmPopup" 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">개인정보 수집 및 활용 동의</h3>
</div>
<div class="modal-content">
<div class="modal-content-inner">
<div>
이런 저런 내용<br><br><br><br><br><br><br><br><br>모달 스크롤 적용필요!!!
</div>
<div class="component-btns">
<div class="btns-row two-col">
<div class="btns-col-1">
<button type="button" class="btn btn-full btn-l btn-secondary" onclick="ENV.module.confirmPopup.close();">
<span class="btn-txt">동의 안함</span>
</button>
</div>
<div class="btns-col-2">
<button type="button" class="btn btn-full btn-l btn-primary" onclick="formControl.confirmPopupOk()">
<span class="btn-txt">동의</span>
</button>
</div>
</div>
</div>
</div>
</div>
<button class="modal-close"></button>
</div>
</div>
</div>
</div>
<!-- //모달 팝업 -->
<!-- 모달 팝업 -->
<div class="layer-wrap">
<div class="component-modal confirmPopup" 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">개인정보 수집 및 활용 동의</h3>
</div>
<div class="modal-content">
<div class="modal-content-inner">
<div>
이런 저런 내용<br><br><br><br><br><br><br><br><br>모달 스크롤 적용필요!!!
</div>
<div class="component-btns">
<div class="btns-row two-col">
<div class="btns-col-1">
<button type="button" class="btn btn-full btn-l btn-secondary"
onclick="ENV.module.confirmPopup.close();">
<span class="btn-txt">동의 안함</span>
</button>
</div>
<div class="btns-col-2">
<button type="button" class="btn btn-full btn-l btn-primary"
onclick="formControl.confirmPopupOk()">
<span class="btn-txt">동의</span>
</button>
</div>
</div>
</div>
</div>
</div>
<button class="modal-close"></button>
</div>
</div>
</div>
</div>
<!-- //모달 팝업 -->
</div>
<section layout:fragment="script">
<script th:inline="javascript">
let ENV = {
httpUrl: {
root: /*[[#{uri.front.info.user.path}]]*/'rootUrl',
user: /*[[|/api/front#{uri.front.info.user.path}/update|]]*/'updateUrl',
myInfo: /*[[#{uri.front.info.path}]]*/'myInfoUrl',
},
module:{
confirmPopup : null
},
submitted: false,
};
<script th:inline="javascript">
let ENV = {
httpUrl: {
root: /*[[#{uri.front.info.user.path}]]*/'rootUrl',
user: /*[[|/api/front#{uri.front.info.user.path}/update|]]*/'updateUrl',
myInfo: /*[[#{uri.front.info.path}]]*/'myInfoUrl',
},
module: {
confirmPopup: null
},
submitted: false,
};
let formControl = {
init(){
this._bindUI();
ajaxUtil._alert('select 010->10으로 노출\n 최초값 지정 및 값 취득 함수 필요\n 개인정보 작성 필요\n 모달 내부 스크롤 기능 추가 필요',null);
let formControl = {
init() {
this._bindUI();
ajaxUtil._alert('select 010->10으로 노출\n 최초값 지정 및 값 취득 함수 필요\n 개인정보 작성 필요\n 모달 내부 스크롤 기능 추가 필요', null);
},
_bindUI(){
ENV.module.confirmPopup = document.querySelector(".confirmPopup").ui;
},
confirmPopup(){
ENV.module.confirmPopup.open();
},
confirmPopupOk(){
ENV.module.confirmPopup.close();
},
_bindUI() {
ENV.module.confirmPopup = document.querySelector(".confirmPopup").ui;
},
confirmPopup() {
ENV.module.confirmPopup.open();
},
confirmPopupOk() {
ENV.module.confirmPopup.close();
setTimeout(function() {
formControl.updateUserInfo();
}, 500);
},
updateUserInfo() {
setTimeout(function () {
formControl.updateUserInfo();
}, 500);
},
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;
}
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;
}
const obj = $(f).serializeObject();
console.log(obj)
ajaxUtil._ajaxAsync(
ENV.httpUrl.user,
obj,
function (rstData, status) {
if(rstData.code ==='SUCCESS'){
ajaxUtil._alert('개인정보 변경이 완료되었습니다.', null, function () {
/**
* TODO
* 내정보에서만 들어온다는 가정하에서 back을 하게함 SB에는 내정보로 이동하게 되어 있음.
*/
history.back()
});
} else if (rstData.code === 'ERROR'){
ajaxUtil._alert('잠시 뒤에 다시 시도해 주세요.', null);
}
},
);
},
const obj = $(f).serializeObject();
console.log(obj)
ajaxUtil._ajaxAsync(
ENV.httpUrl.user,
obj,
function (rstData, status) {
if (rstData.code === 'SUCCESS') {
ajaxUtil._alert('개인정보 변경이 완료되었습니다.', null, function () {
/**
* TODO
* 내정보에서만 들어온다는 가정하에서 back을 하게함 SB에는 내정보로 이동하게 되어 있음.
*/
history.back()
});
} else if (rstData.code === 'ERROR') {
ajaxUtil._alert('잠시 뒤에 다시 시도해 주세요.', null);
}
},
);
},
telAndPhoneCheck(tel1, tel2, tel3) {
// 공백 제거
tel1 = tel1.trim();
tel2 = tel2.trim();
tel3 = tel3.trim();
telAndPhoneCheck(tel1, tel2, tel3) {
// 공백 제거
tel1 = tel1.trim();
tel2 = tel2.trim();
tel3 = tel3.trim();
const telRegex = /^[0-9]+$/;
if (!telRegex.test(tel1) || !telRegex.test(tel2) || !telRegex.test(tel3)) {
return null;
}
if (!((tel1.length === 2 || tel1.length === 3) && tel2.length === 4 && tel3.length === 4)) {
return null;
}
const formatted = `${tel1}-${tel2}-${tel3}`;
return formatted;
}
const telRegex = /^[0-9]+$/;
if (!telRegex.test(tel1) || !telRegex.test(tel2) || !telRegex.test(tel3)) {
return null;
}
if (!((tel1.length === 2 || tel1.length === 3) && tel2.length === 4 && tel3.length === 4)) {
return null;
}
const formatted = `${tel1}-${tel2}-${tel3}`;
return formatted;
}
};
</script>
};
</script>
</section>

View File

@@ -4,15 +4,15 @@
<body>
<section layout:fragment="content">
<p>Page content goes here</p>
<p>Page content goes here</p>
</section>
<div class="container">
<footer class="py-3 my-4 border-top">
<div class="text-center">
<span class="text-muted">&copy; 2022 All rights reserved</span>
</div>
</footer>
<footer class="py-3 my-4 border-top">
<div class="text-center">
<span class="text-muted">&copy; 2022 All rights reserved</span>
</div>
</footer>
</div>
</body>

View File

@@ -6,7 +6,7 @@
<body>
<section class="container" layout:fragment="content">
<p>Page content goes here</p>
<p>Page content goes here</p>
</section>
</body>