관리자 퍼블 입히기

This commit is contained in:
주수현
2025-06-20 09:26:07 +09:00
parent 6153f03e66
commit c8123527d9
5 changed files with 42 additions and 44 deletions

View File

@@ -72,74 +72,66 @@
</select> </select>
</div> </div>
</div> </div>
<div class="component-btns"> </div>
<div class="btns-row"> <div class="component-btns">
<button class="btn" onclick="goSearch();" <div class="btns-row">
type="button"> <button class="btn" onclick="goInit();" type="button">
검색 <span class="btn-txt">초기화</span>
</button> </button>
<button class="btn" onclick="goInit();" <button class="btn btn-primary" onclick="goSearch();" type="button">
type="button">초기화 <span class="btn-txt">검색</span>
</button> </button>
</div>
</div> </div>
</div> </div>
</section> </section>
<div class="row">
<div class="col text-start">
<div class="fw-bolder text-muted">Total: <span
th:text="${listOutput.totalElements}"></span></div>
</div>
</div>
<section> <section>
<p class="input-label" style="font-size: 16px;">
총 <span th:text="${listOutput.totalElements}"></span>건
</p>
<table> <table>
<thead> <thead>
<tr> <tr>
<th >#</th>
<th scope="col"> <th scope="col">
<label><input class="form-check-input" onchange="toggleCheckbox(this);" <label><input class="form-check-input" onchange="toggleCheckbox(this);"
type="checkbox"/></label> type="checkbox"/></label>
</th> </th>
<th scope="col"><a class="order-able" data-sort-field="id" href="#">ID</a></th> <th scope="col"><a class="order-able" data-sort-field="id" href="#">아이디</a></th>
<th class="text-secondary" scope="col">권한</th> <th scope="col"><a class="order-able" data-sort-field="id" href="#">이름</a></th>
</th> <th class="text-secondary" scope="col">권한</th></th>
<th scope="col"><a class="order-able" data-sort-field="accountDisabled" <th scope="col"><a class="order-able" data-sort-field="id" href="#">실사</a></th>
href="#">활성화</a> <th scope="col"><a class="order-able" data-sort-field="accountDisabled" href="#">계정사용여부</a></th>
</th> <th scope="col"><a class="order-able" data-sort-field="createdAt" href="#">생성일</a>
<th scope="col"><a class="order-able" data-sort-field="createdAt" href="#">등록일</a>
</th>
<th scope="col"><a class="order-able" data-sort-field="updatedAt" href="#">수정일</a>
</th> </th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr th:each="item, status : ${listOutput.content}"> <tr th:each="item, status : ${listOutput.content}">
<th th:text="${status.count + (listOutput.pageable.pageNumber * listOutput.pageable.pageSize)}"> <!-- <th th:text="${status.count + (listOutput.pageable.pageNumber * listOutput.pageable.pageSize)}">
게시물번호 게시물번호
</th> </th>-->
<td><label><input class="form-check-input" name="checkedIds" th:value="${item.id}" <td><label><input class="form-check-input" name="checkedIds" th:value="${item.id}"
type="checkbox"/></label> type="checkbox"/></label>
</td> </td>
<td class="underline"><a th:href="|javascript:goUpdate('${item.id}')|" th:text="${item.id}">아이디</a> <td class="underline"><a th:href="|javascript:goUpdate('${item.id}')|" th:text="${item.id}">아이디</a></td>
</td> <td th:text="${item.name}">이름</td>
<td> <td>
<span th:each="role, status : ${item.roles}" <span th:each="role, status : ${item.roles}" th:text="${role.getDescription()} + ${!status.last ? ', ': ''}"></span>
th:text="${role.getDescription()} + ${!status.last ? ', ': ''}"></span>
</td> </td>
<td th:text="${item.accountDisabled == null || !item.accountDisabled ? 'Y' : 'N' }"></td> <td th:text="${item.regionMainCodeName}">실사</td>
<td th:text="${#temporals.format(item.createdAt, 'yyyy-MM-dd hh:mm')}">등록일</td> <td th:text="${item.accountDisabled == null || !item.accountDisabled ? '사용' : '미사용' }"></td>
<td th:text="${#temporals.format(item.updatedAt, 'yyyy-MM-dd hh:mm')}">수정일</td> <td th:text="${#temporals.format(item.createdAt, 'yyyy-MM-dd hh:mm')}">생성일</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<div th:replace="common/list-components :: pagination(${listOutput})"></div> <div th:replace="common/list-components :: pagination(${listOutput})"></div>
<div class="component-btns bottom-btn-group"> <div class="component-btns bottom-btn-group">
<div class="btns-row align-right"> <div class="btns-row align-right">
<button class="btn btn-success" onclick="goExcel();" type="button">엑셀 다운로드</button> <button class="btn" onclick="goExcel();" type="button"><span class="btn-txt">엑셀 다운로드</span></button>
<button class="btn" onclick="location.href='/settings/admins/create';" type="button">등록</button> <button class="btn" onclick="location.href='/settings/admins/create';" type="button"><span class="btn-txt">등록</span></button>
<button class="btn" onclick="goRemove();" type="button">삭제</button> <button class="btn" onclick="goRemove();" type="button"><span class="btn-txt">삭제</span></button>
</div> </div>
</div> </div>
</section> </section>

View File

@@ -3,12 +3,11 @@
xmlns:th="http://www.thymeleaf.org"> xmlns:th="http://www.thymeleaf.org">
<section layout:fragment="content"> <section layout:fragment="content">
<form <form
method="post" method="post"
th:action="${'/settings/admins/update/' + bindingVO.id}" th:action="${'/settings/admins/update/' + bindingVO.id}"
th:object="${bindingVO}"> th:object="${bindingVO}">
<div class="content-inner">
<input type="hidden" name="seq" th:field="*{seq}"/> <input type="hidden" name="seq" th:field="*{seq}"/>
<table class="type-form"> <table class="type-form">
@@ -152,7 +151,7 @@
<!-- <div th:replace="common/components :: auditArea"></div>--> <!-- <div th:replace="common/components :: auditArea"></div>-->
<div class="component-btns bottom-btn-group"> <div class="component-btns bottom-btn-group">
<div class="btns-row align-right"> <div class="btns-row">
<button type="button" class="btn btn-secondary" onclick="gotoList();return false;"> <button type="button" class="btn btn-secondary" onclick="gotoList();return false;">
<span class="btn-txt">목록</span> <span class="btn-txt">목록</span>
</button> </button>
@@ -161,6 +160,7 @@
</button> </button>
</div> </div>
</div> </div>
</div>
</form> </form>
<!-- 이전 목록페이지의 검색 및 정렬조건 폼 --> <!-- 이전 목록페이지의 검색 및 정렬조건 폼 -->

View File

@@ -42,6 +42,9 @@ class GetAdminsDao implements GetAdminsPortOut {
admins.stream() admins.stream()
.map(admin -> new GetAdmins( .map(admin -> new GetAdmins(
admin.getId(), admin.getId(),
admin.getName(),
admin.getPhone(),
admin.getRegionMainCodeName(),
admin.getCreatedBy(), admin.getCreatedBy(),
admin.getCreatedAt(), admin.getCreatedAt(),
admin.getUpdatedBy(), admin.getUpdatedBy(),

View File

@@ -12,6 +12,9 @@ import lombok.NoArgsConstructor;
@AllArgsConstructor @AllArgsConstructor
public class GetAdmins implements AuditOutput { public class GetAdmins implements AuditOutput {
private String id; private String id;
private String name;
private String phone;
private String regionMainCodeName;
private String createdBy; private String createdBy;
private LocalDateTime createdAt; private LocalDateTime createdAt;
private String updatedBy; private String updatedBy;

View File

@@ -7,10 +7,10 @@
SELECT SELECT
a.seq, a.seq,
a.id AS id, a.id AS id,
a.name, COALESCE(a.name,'-') as name,
a.region_main_code, a.region_main_code,
u.code_text as region_main_code_name, COALESCE(u.code_text,'-') as region_main_code_name,
a.phone, COALESCE(a.phone,'-') as phone,
a.created_by, a.created_by,
a.created_at, a.created_at,
a.updated_by, a.updated_by,