내정보 공지사항 : 검색 제외
This commit is contained in:
@@ -35,6 +35,29 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div th:fragment="paginationCommon(items)">
|
||||
<nav class="component-pagination" aria-label="페이지네이션">
|
||||
|
||||
<a th:href="|javascript:goPageable(0, ${items.pageable.pageSize}, '${items.pageable.sort}')|" class="pagination-item first"><span class="hide-txt">첫 페이지로 이동</span></a>
|
||||
<a th:href="|javascript:goPageable(${items.pageable.pageNumber - 1}, ${items.pageable.pageSize}, '${items.pageable.sort}')|" class="pagination-item prev"><span class="hide-txt">이전 페이지로 이동</span></a>
|
||||
|
||||
|
||||
<th:block th:each="idx : ${#numbers.sequence(0, items.totalPages == 0 ? 0 : items.totalPages - 1)}">
|
||||
<th:block th:if="${idx == items.pageable.pageNumber}">
|
||||
<span class="pagination-item" aria-current="page" th:text="${idx+1}"></span>
|
||||
</th:block>
|
||||
<th:block th:if="${idx != items.pageable.pageNumber}">
|
||||
<a th:href="|javascript:goPageable(${idx}, ${items.pageable.pageSize}, '${items.pageable.sort}')|" class="pagination-item" th:text="${idx+1}"></a>
|
||||
</th:block>
|
||||
</th:block>
|
||||
|
||||
<a th:href="|javascript:goPageable(${items.pageable.pageNumber + 1}, ${items.pageable.pageSize}, '${items.pageable.sort}')|" class="pagination-item next"><span class="hide-txt">다음 페이지로 이동</span></a>
|
||||
<a th:href="|javascript:goPageable(${items.pageable.pageNumber-1}, ${items.pageable.pageSize}, '${items.pageable.sort}')|" class="pagination-item last"><span class="hide-txt">마지막 페이지로 이동</span></a>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -26,11 +26,13 @@
|
||||
<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>
|
||||
|
||||
<a href="/info/notice/1" class="notice-box"><!-- TODO 공지사항 작성후 처리 필요 -->
|
||||
<p class="tit">공지사항</p>
|
||||
<p class="txt">2025 임가경제조사 실시 안내</p>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -2,127 +2,88 @@
|
||||
<html layout:decorate="~{layout/layout}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
xmlns:th="http://www.thymeleaf.org">
|
||||
|
||||
<div layout:fragment="content">
|
||||
<main id="content" role="main">
|
||||
<div layout:fragment="content" th:classappend="'mypage-wrap'">
|
||||
<main id="content" role="main">
|
||||
<div class="inner">
|
||||
<section class="search-area">
|
||||
<div id="select3" class="component-select bottom-sheet" data-props-default="제목 + 내용" data-props-type="bottomSheet">
|
||||
<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 current" data-value="option1">제목 + 내용</li>
|
||||
<li class="option" data-value="option2">제목</li>
|
||||
<li class="option" data-value="option3">내용</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="component-input">
|
||||
<div class="input-field">
|
||||
<input type="text" id="temp_input_ico_id_0001" placeholder="검색어를 입력해 주세요">
|
||||
<i class="input-field-ico ico-search" aria-hidden="true"></i>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<hr>
|
||||
|
||||
<style>
|
||||
label {
|
||||
display: inline-block;
|
||||
width: 150px;
|
||||
}
|
||||
<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>
|
||||
|
||||
div {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
<section class="list-area" th:if="${notices.content.size() > 0}">
|
||||
<p class="total-num">
|
||||
총 <strong th:text="${notices.totalElements}"></strong>건
|
||||
</p>
|
||||
<ul>
|
||||
|
||||
.invalid-feedback {
|
||||
display: none;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
}
|
||||
<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>
|
||||
|
||||
.is-invalid + .invalid-feedback {
|
||||
display: block;
|
||||
}
|
||||
</ul>
|
||||
|
||||
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 th:replace="common/list-components :: paginationCommon(${notices})"></div>
|
||||
|
||||
<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>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
<section layout:fragment="script">
|
||||
<script>
|
||||
const updateUser = () => {
|
||||
const f = document.reqForm;
|
||||
const obj = $(f).serializeObject();
|
||||
|
||||
// 기존 에러 메세지 초기화
|
||||
$('.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 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,
|
||||
};
|
||||
</script>
|
||||
|
||||
</section>
|
||||
|
||||
72
front/src/main/resources/templates/info/notice/{id}.html
Normal file
72
front/src/main/resources/templates/info/notice/{id}.html
Normal file
@@ -0,0 +1,72 @@
|
||||
<!DOCTYPE html>
|
||||
<html layout:decorate="~{layout/layout}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
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>
|
||||
|
||||
|
||||
|
||||
|
||||
<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>
|
||||
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() {
|
||||
|
||||
},
|
||||
goList(){
|
||||
/**
|
||||
* TODO 외부 유입에 따라 history.back과 location.href 가 적절하게 사용되어야함...
|
||||
* 전체적인 수정 필요.(이전 페이지
|
||||
*/
|
||||
const previousUrl = document.referrer;
|
||||
|
||||
if (previousUrl.includes('/info/notice')) {
|
||||
history.back();
|
||||
} else {
|
||||
location.href = '/info/notice';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
</section>
|
||||
|
||||
</html>
|
||||
@@ -47,6 +47,10 @@
|
||||
user: /*[[#{uri.front.info.user.path}]]*/'userUrl',
|
||||
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
submitted: false,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user