들여쓰기 변경

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> <!DOCTYPE html>
<html layout:decorate="~{layout/layout}" 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"> xmlns:th="http://www.thymeleaf.org">
<div layout:fragment="content"> <div layout:fragment="content" th:classappend="'mypage-wrap'">
<main id="content" role="main"> <main id="content" role="main">
<div class="inner">
<style> <hgroup class="tit-group">
label { <h3>
display: inline-block; 이번달의 <br>
width: 150px; <strong>은행 자동이체 내역 입력 현황</strong>을
} 확인하세요.
</h3>
div { </hgroup>
margin-bottom: 15px; <ul class="product-col-list">
} <li>
<a href="">
.invalid-feedback { <p class="list-tit">수입</p>
display: none; <span class="tag">미등록</span>
font-size: 12px; </a>
font-weight: bold; </li>
} <li class="complete">
<a href="">
.is-invalid + .invalid-feedback { <p class="list-tit">지출</p>
display: block; <span class="tag">등록완료</span>
} </a>
</li>
input[readonly] { </ul>
background-color: #e9ecef; </div>
color: #6c757d; </main>
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> </div>
<section layout:fragment="script"> <section layout:fragment="script">
<script> <script th:inline="javascript">
const updateUser = () => { let ENV = {
const f = document.reqForm; httpUrl: {
const obj = $(f).serializeObject(); root: /*[[#{uri.front.info.monthly.path}]]*/'rootUrl'
},
module: {
confirmPopup: null
},
submitted: false,
};
let formControl = {
init() {
// 기존 에러 메세지 초기화 }
$('.is-invalid').removeClass('is-invalid'); }
</script>
$.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>
</section> </section>

View File

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

View File

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

View File

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

File diff suppressed because it is too large Load Diff

View File

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

File diff suppressed because it is too large Load Diff

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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