[BO] 문자 발송 작업 (3)

This commit is contained in:
kangsunlee
2025-07-08 16:09:14 +09:00
parent 68f99ca8fb
commit a9b9b896b6
10 changed files with 543 additions and 69 deletions

View File

@@ -4,7 +4,7 @@
<update id="operate">
/* operate : 문자 자동 발송 활성화 상태 수정 */
UPDATE sms_auto_status
SET active = #{active}
<include refid="common.fields.DeleteBaseSet" />
SET active = #{active},
<include refid="common.fields.UpdateBaseSet" />
</update>
</mapper>

View File

@@ -94,7 +94,7 @@
<a aria-current="page" th:href="${topNode.uri}" >
<img class="logo" th:src="@{/static/assets/images/common/ico_logo.svg}" alt="로고 이미지">
</a>
<p class="logo-tit">임가경제조사 일계부 관리자모드</p>
<p class="logo-tit"><a th:href="${topNode.uri}">임가경제조사 일계부 관리자모드</a></p>
</div>
<ul class="main-menu" th:if="${topNode != null}">
<li class="menu-item" th:each="menu : ${topNode.children}"

View File

@@ -1,35 +1,423 @@
<!DOCTYPE html>
<html layout:decorate="~{layout/layout-home}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
<html layout:decorate="~{layout/layout-home}"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
xmlns:sec="http://www.w3.org/1999/xhtml"
xmlns:th="http://www.thymeleaf.org">
<head>
<title>관리자 수정</title>
</head>
<body>
<section layout:fragment="content">
<hgroup class="page-tit-group">
<h2 class="page-tit">
2025년 6월 현황
</h2>
<div class="table-tit-group large">
<div class="component-select">
<select class="select-list" required>
<option value="" disabled hidden>선택해주세요.</option>
<option value="value1" selected>전체</option>
<option value="value2">Option 2</option>
</select>
</div>
</div>
</hgroup>
<div class="content-inner">
<section class="dounut-chart-area">
<div class="chart-group type-green">
<dl>
<dt>
<strong>일계부 진행률</strong>
<span>(전체 임가 기준)</span>
</dt>
<dd>
<strong class="percent">50</strong>
<span class="d-flex">
<span>1006</span>
/
<span>1476</span>
</span>
</dd>
</dl>
<div class="donut-chart" style="--percent: 50;">
</div>
</div>
<div class="p-5 mb-4 bg-light rounded-3">
<div class="container-fluid py-5">
<h1 class="display-5 fw-bold">안녕하세요, <span class="text-muted"
sec:authentication="name"></span> :-)</h1>
<p class="col-md-8 fs-4">
관리자 메인에 오신걸 환영합니다. <span class="text-muted" sec:authentication="name"></span> 님께 부여된 역할에 따라
메뉴이용이
제한되는 점에 유의해주세요.
</p>
<div class="chart-group type-blue">
<dl>
<dt>
<strong>일계부 진행률</strong>
<span>(전체 임가 기준)</span>
</dt>
<dd>
<strong class="percent">68</strong>
<span class="d-flex">
<span>1006</span>
/
<span>1476</span>
</span>
</dd>
</dl>
<div class="donut-chart" style="--percent: 68;">
</div>
</div>
<div class="chart-group type-orange">
<dl>
<dt>
<strong>일계부 진행률</strong>
<span>(전체 임가 기준)</span>
</dt>
<dd>
<strong class="percent">48</strong>
<span class="d-flex">
<span>1006</span>
/
<span>1476</span>
</span>
</dd>
</dl>
<div class="donut-chart" style="--percent: 48;">
</div>
</div>
</section>
<section>
<div class="table-group">
<div class="table-tit-group large">
<h3>
지방실사별 진행현황
</h3>
</div>
<table>
<thead>
<tr>
<th>
실사
</th>
<th>임계부 진행률</th>
<th>현장 방문률(1차)</th>
<th>답례품 전달률</th>
</tr>
</thead>
<tbody>
<tr>
<td>서울</td>
<td>
<div class="progress-group type-green">
<progress class="progress" value="85" min="0" max="100"></progress>
<div class="detail">
<p class="percent">85</p>
<span class="d-flex">
(
<span>66</span>
/
<span>78</span>
)
</span>
</div>
</div>
</td>
<td>
<div class="progress-group type-blue">
<progress class="progress" value="85" min="0" max="100"></progress>
<div class="detail">
<p class="percent">85</p>
<span class="d-flex">
(
<span>66</span>
/
<span>78</span>
)
</span>
</div>
</div>
</td>
<td>
<div class="progress-group type-orange">
<progress class="progress" value="85" min="0" max="100"></progress>
<div class="detail">
<p class="percent">85</p>
<span class="d-flex">
(
<span>66</span>
/
<span>78</span>
)
</span>
</div>
</div>
</td>
</tr>
<tr>
<td>강원</td>
<td>
<div class="progress-group type-green">
<progress class="progress" value="35" min="0" max="100"></progress>
<div class="detail">
<p class="percent">35</p>
<span class="d-flex">
(
<span>66</span>
/
<span>78</span>
)
</span>
</div>
</div>
</td>
<td>
<div class="progress-group type-blue">
<progress class="progress" value="55" min="0" max="100"></progress>
<div class="detail">
<p class="percent">55</p>
<span class="d-flex">
(
<span>66</span>
/
<span>78</span>
)
</span>
</div>
</div>
</td>
<td>
<div class="progress-group type-orange">
<progress class="progress" value="85" min="0" max="100"></progress>
<div class="detail">
<p class="percent">85</p>
<span class="d-flex">
(
<span>66</span>
/
<span>78</span>
)
</span>
</div>
</div>
</td>
</tr>
<tr class="total">
<td>전체</td>
<td>
<span>68</span>%
</td>
<td>
<span>68</span>%
</td>
<td>
<span>68</span>%
</td>
</tr>
</tbody>
</table>
</div>
<div class="table-group">
<div class="table-tit-group large">
<h3>
조사원별 진행 현황
</h3>
<div class="component-select">
<select class="select-list" required>
<option value="" disabled hidden>선택해주세요.</option>
<option value="value1" selected>전체</option>
<option value="value2">Option 2</option>
</select>
</div>
</div>
<table>
<colgroup>
<col width="8%"/>
<col width="8%"/>
<col width="8%"/>
<col width="25%"/>
<col width="25%"/>
<col width="25%"/>
</colgroup>
<thead>
<tr>
<th>조사원명</th>
<th>실사</th>
<th>할당 임가 수</th>
<th>임계부 진행률</th>
<th>현장 방문률(1차)</th>
<th>답례품 전달률</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<a href="">김조사</a>
</td>
<td>서울</td>
<td>24</td>
<td>
<div class="progress-group type-green">
<progress class="progress" value="85" min="0" max="100"></progress>
<div class="detail">
<p class="percent">85</p>
<span class="d-flex">
(
<span>66</span>
/
<span>78</span>
)
</span>
</div>
</div>
</td>
<td>
<div class="progress-group type-blue">
<progress class="progress" value="85" min="0" max="100"></progress>
<div class="detail">
<p class="percent">85</p>
<span class="d-flex">
(
<span>66</span>
/
<span>78</span>
)
</span>
</div>
</div>
</td>
<td>
<div class="progress-group type-orange">
<progress class="progress" value="85" min="0" max="100"></progress>
<div class="detail">
<p class="percent">85</p>
<span class="d-flex">
(
<span>66</span>
/
<span>78</span>
)
</span>
</div>
</div>
</td>
</tr>
<tr>
<td>
<a href="">김조사</a>
</td>
<td>서울</td>
<td>24</td>
<td>
<div class="progress-group type-green">
<progress class="progress" value="85" min="0" max="100"></progress>
<div class="detail">
<p class="percent">85</p>
<span class="d-flex">
(
<span>66</span>
/
<span>78</span>
)
</span>
</div>
</div>
</td>
<td>
<div class="progress-group type-blue">
<progress class="progress" value="85" min="0" max="100"></progress>
<div class="detail">
<p class="percent">85</p>
<span class="d-flex">
(
<span>66</span>
/
<span>78</span>
)
</span>
</div>
</div>
</td>
<td>
<div class="progress-group type-orange">
<progress class="progress" value="85" min="0" max="100"></progress>
<div class="detail">
<p class="percent">85</p>
<span class="d-flex">
(
<span>66</span>
/
<span>78</span>
)
</span>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</section>
<section th:if="${loginUserRoles.id == 'ROLE_ADMIN'}">
<div class="table-group">
<div class="table-tit-group large">
<h3>
문자 발송 체크
</h3>
</div>
<button type="button" class="btn small">
<span class="btn-txt">
<label class="radio-inner">
<input type="checkbox" id="smsAutoSend" th:checked="${smsActive}"
onclick="smsAutoSendConfirm(this);">
<span class="radio-item">
<span class="radio-txt">문자 자동 발송</span>
</span>
</label>
</span>
</button>
</div>
</section>
<p class="col-md-8 fs-5">
<span>역할</span>
<span class="text-muted"
th:each="role, status : ${loginUserRoles}"
th:text="${role.getId()} + ' (' + ${role.description} + ')' + ${!status.last ? ', ': ''}"></span>
</p>
</div>
</div>
</section>
</body>
<section layout:fragment="script">
<script>
/**
* 문자 발송 체크 스크립트
* */
// 문자 자동 발송 컨펌창
const smsAutoSendConfirm = (el) => {
let message = el.checked ? '문자 자동 발송 기능을 사용하시겠습니까?' : '문자 자동 발송 기능을 중지하시겠습니까?';
etUI.dialog.confirm({
title: '문자 자동 발송 안내',
message: message,
negativeCallback: function () {
$(el).prop('checked', !el.checked);
},
positiveCallback: function () {
updateSmsAutoStatusActive(el.checked);
},
});
}
// 문자 자동 발송 기능 활성화
const updateSmsAutoStatusActive = (active) => {
ajaxUtil._ajaxMethod(
'/api/smsAutoStatus/update',
JSON.stringify({
active: active,
}),
() => {
$('#smsAutoSend').prop('checked', active);
},
(code, rstData) => {
if(code == 422) alert(rstData.responseText);
$('#smsAutoSend').prop('checked', !active);
},
'patch',
'json',
{ handle422Type: 'alert' }
);
}
</script>
</section>
</html>

View File

@@ -4,23 +4,26 @@
<head th:replace="~{common/components :: head}"></head>
<body>
<header th:replace="~{common/components :: header}"></header>
<div id="wrap">
<header th:replace="~{common/components :: header}"></header>
<div id="container">
<div id="content" role="main">
<div class="inner">
<div class="content-inner">
<div th:replace="~{common/components :: operationMessage}"></div>
<div style="display: flex; justify-content: space-evenly;align-items: center; width:100%; background: #DEE2E6; height: 500px; font-size: 16px;">
<section class="container" layout:fragment="content">
<div th:replace="~{common/components :: operationMessage}"></div>
<div class="content-inner">
<section layout:fragment="content">
page content
</section>
</div>
</div>
</div>
</div>
</div>
<div th:replace="~{common/components :: footer}"></div>
<section layout:fragment="script"></section>
</div>
</body>
</html>