마이페이지 > 대시보드설정 작업완료.

대시보드 셈플 페이지 몇가지 추가.
강석 최 2022-10-14 17:14:48 +09:00
parent 7dafd7ce53
commit b99189a024
24 changed files with 418 additions and 274 deletions

View File

@ -35,6 +35,8 @@ public class BaseModel {
private String startDate;
@Transient
private String endDate;
@Transient
private Boolean dashboardFlag = false;
public void setQueryInfo(){
setFirstIndex((getPageIndex()-1)*getRowCnt());

View File

@ -2,7 +2,9 @@ package com.dbnt.faisp.config;
import com.dbnt.faisp.menuMgt.model.MenuMgt;
import com.dbnt.faisp.menuMgt.service.MenuMgtService;
import com.dbnt.faisp.userInfo.model.UserInfo;
import lombok.RequiredArgsConstructor;
import org.springframework.security.core.annotation.AuthenticationPrincipal;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@ -17,11 +19,12 @@ public class ModalController {
private final MenuMgtService menuMgtService;
@GetMapping("/menuModal")
public ModelAndView menuModalPage(MenuMgt menuMgt){
public ModelAndView menuModalPage(@AuthenticationPrincipal UserInfo loginUser, MenuMgt menuMgt){
ModelAndView mav = new ModelAndView("commonModal/menuModal");
menuMgt.setUserSeq(loginUser.getUserSeq());
menuMgt.setQueryInfo();
mav.addObject("menuMgtList", menuMgtService.selectMenuMgtList(menuMgt));
menuMgt.setContentCnt(menuMgtService.selectMenuMgtListCnt(menuMgt));
mav.addObject("menuMgtList", menuMgtService.selectMenuMgtListToAccessAuth(menuMgt));
menuMgt.setContentCnt(menuMgtService.selectMenuMgtListToAccessAuthCnt(menuMgt));
menuMgt.setPaginationInfo();
mav.addObject("searchParams", menuMgt);
return mav;

View File

@ -29,7 +29,13 @@ public class AffairController { // 첩보수집활동 > 외사경찰 견문관
@GetMapping("/affairMgt")
public ModelAndView affairMgtPage(@AuthenticationPrincipal UserInfo loginUser, AffairBoard affairBoard){
ModelAndView mav = new ModelAndView("igActivities/fpiMgt/affair/affairMgt");
ModelAndView mav;
if(affairBoard.getDashboardFlag()){
mav = new ModelAndView("igActivities/fpiMgt/affair/affairMgtDashboard");
affairBoard.setRowCnt(5);
}else{
mav = new ModelAndView("igActivities/fpiMgt/affair/affairMgt");
}
mav.addObject("page", "main");
mav.addObject("searchUrl", "/affair/affairMgt");
//메뉴권한 확인

View File

@ -25,7 +25,13 @@ public class PlanController { // 첩보수집활동 > 외사경찰 견문관리
@GetMapping("/planMgt")
public ModelAndView monthPlanPage(@AuthenticationPrincipal UserInfo loginUser, PlanBoard planBoard){
ModelAndView mav = new ModelAndView("igActivities/fpiMgt/affairPlan/planMgt");
ModelAndView mav = null;
if(planBoard.getDashboardFlag()){
mav = new ModelAndView("igActivities/fpiMgt/affairPlan/planMgtDashboard");
planBoard.setRowCnt(5);
}else{
mav = new ModelAndView("igActivities/fpiMgt/affairPlan/planMgt");
}
mav.addObject("page", "main");
mav.addObject("searchUrl", "/affairPlan/planMgt");
//메뉴권한 확인

View File

@ -30,7 +30,13 @@ public class ResultController { // 첩보수집활동 > 외사경찰 견문관
@GetMapping("/resultMgt")
public ModelAndView resultMgtPage(@AuthenticationPrincipal UserInfo loginUser, ResultBoard resultBoard){
ModelAndView mav = new ModelAndView("igActivities/fpiMgt/affairResult/resultMgt");
ModelAndView mav = null;
if(resultBoard.getDashboardFlag()){
mav = new ModelAndView("igActivities/fpiMgt/affairResult/resultMgtDashboard");
resultBoard.setRowCnt(5);
}else{
mav = new ModelAndView("igActivities/fpiMgt/affairResult/resultMgt");
}
mav.addObject("page", "main");
mav.addObject("searchUrl", "/affairResult/resultMgt");
//메뉴권한 확인

View File

@ -13,4 +13,7 @@ public interface MenuMgtMapper {
Integer selectMenuMgtListCnt(MenuMgt menuMgt);
List<MenuMgt> selectAccessMenuListWhereUserSeq(Integer userSeq);
List<MenuMgt> selectMenuMgtListToAccessAuth(MenuMgt menuMgt);
Integer selectMenuMgtListToAccessAuthCnt(MenuMgt menuMgt);
}

View File

@ -35,6 +35,8 @@ public class MenuMgt extends BaseModel {
@Transient
private List<MenuMgt> childList;
@Transient
private Integer userSeq;
@Transient
private Integer cat1RowspanCnt;

View File

@ -25,6 +25,13 @@ public class MenuMgtService {
return menuMgtMapper.selectMenuMgtListCnt(menuMgt);
}
public List<MenuMgt> selectMenuMgtListToAccessAuth(MenuMgt menuMgt){
List<MenuMgt> menuList = menuMgtMapper.selectMenuMgtListToAccessAuth(menuMgt);
return menuListRowspanSet(menuList);
}
public Integer selectMenuMgtListToAccessAuthCnt(MenuMgt menuMgt){
return menuMgtMapper.selectMenuMgtListToAccessAuthCnt(menuMgt);
}
@Transient
public String saveMenuMgt(MenuMgt menuMgt) {
if(menuMgt.getMenuKey()==null){

View File

@ -23,7 +23,13 @@ public class PublicBoardController {
@GetMapping("/noticePage")
public ModelAndView organMgtPage(@AuthenticationPrincipal UserInfo loginUser, PublicBoard publicBoard) {
ModelAndView mav = new ModelAndView("publicBoard/notice/noticePage");
ModelAndView mav;
if(publicBoard.getDashboardFlag()){
mav = new ModelAndView("publicBoard/notice/noticePageDashBoard");
publicBoard.setRowCnt(5);
}else{
mav = new ModelAndView("publicBoard/notice/noticePage");
}
publicBoard.setQueryInfo();
publicBoard.setPublicType("PLB001");
if (loginUser.getUserRole().contains(Role.SUB_ADMIN.getValue())) {

View File

@ -31,7 +31,13 @@ public class TranslatorController {
@GetMapping("/info")
public ModelAndView translatorInfo(@AuthenticationPrincipal UserInfo loginUser,Translator translator,HttpServletResponse response) {
ModelAndView mav = new ModelAndView("translator/translator");
ModelAndView mav;
if (translator.getDashboardFlag()){
mav = new ModelAndView("translator/translatorDashboard");
translator.setRowCnt(5);
}else{
mav = new ModelAndView("translator/translator");
}
translator.setDownOrganCdList(loginUser.getDownOrganCdList());
//엑셀다운
if(translator.getExcel() != null && translator.getExcel().equals("Y")){

View File

@ -39,4 +39,10 @@ public class MyInfoController {
return mav;
}
@PostMapping("saveDashboardConfig")
@ResponseBody
public void saveDashboardConfig(@AuthenticationPrincipal UserInfo loginUser, @RequestBody List<DashboardConfig> configList){
userInfoService.saveDashboardConfigList(loginUser.getUserSeq(), configList);
}
}

View File

@ -3,9 +3,7 @@ package com.dbnt.faisp.userInfo.repository;
import com.dbnt.faisp.userInfo.model.DashboardConfig;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.List;
public interface DashboardConfigRepository extends JpaRepository<DashboardConfig, DashboardConfig.DashboardConfigId> {
void deleteByUserSeq(Integer userSeq);
}

View File

@ -119,4 +119,14 @@ public class UserInfoService implements UserDetailsService {
public List<DashboardConfig> getDashboardConfigList(Integer userSeq) {
return userInfoMapper.selectDashboardConfigList(userSeq);
}
@Transactional
public void saveDashboardConfigList(Integer userSeq, List<DashboardConfig> configList) {
dashboardConfigRepository.deleteByUserSeq(userSeq);
for(DashboardConfig config: configList){
config.setUserSeq(userSeq);
}
dashboardConfigRepository.saveAll(configList);
}
}

View File

@ -4,6 +4,20 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dbnt.faisp.menuMgt.mapper.MenuMgtMapper">
<sql id="selectMenuMgtListWhere">
<if test='cat1Cd != null and cat1Cd != ""'>
and cat1_cd = #{cat1Cd}
</if>
<if test='cat2Cd != null and cat2Cd != ""'>
and cat2_cd = #{cat2Cd}
</if>
<if test='cat3Cd != null and cat3Cd != ""'>
and cat3_cd = #{cat3Cd}
</if>
<if test='menuUrl != null and menuUrl != ""'>
and menu_url like '%'||#{menuUrl}||'%'
</if>
</sql>
<select id="selectMenuMgtList" resultType="MenuMgt" parameterType="MenuMgt">
select menu_key as menuKey,
cat1_cd as cat1Cd,
@ -13,18 +27,7 @@
approval_chk as approvalChk
from menu_mgt
<where>
<if test='cat1Cd != null and cat1Cd != ""'>
and cat1_cd = #{cat1Cd}
</if>
<if test='cat2Cd != null and cat2Cd != ""'>
and cat2_cd = #{cat2Cd}
</if>
<if test='cat3Cd != null and cat3Cd != ""'>
and cat3_cd = #{cat3Cd}
</if>
<if test='menuUrl != null and menuUrl != ""'>
and menu_url like '%'||#{menuUrl}||'%'
</if>
<include refid="selectMenuMgtListWhere"></include>
</where>
order by cat1_cd, cat2_cd, cat3_cd
limit #{rowCnt} offset #{firstIndex}
@ -33,18 +36,7 @@
select count(*)
from menu_mgt
<where>
<if test='cat1Cd != null and cat1Cd != ""'>
and cat1_cd = #{cat1Cd}
</if>
<if test='cat2Cd != null and cat2Cd != ""'>
and cat2_cd = #{cat2Cd}
</if>
<if test='cat3Cd != null and cat3Cd != ""'>
and cat3_cd = #{cat3Cd}
</if>
<if test='menuUrl != null and menuUrl != ""'>
and menu_url like '%'||#{menuUrl}||'%'
</if>
<include refid="selectMenuMgtListWhere"></include>
</where>
</select>
@ -59,4 +51,30 @@
and aa.access_auth is not null
order by cat1_cd, cat2_cd, cat3_cd
</select>
<select id="selectMenuMgtListToAccessAuth" resultType="MenuMgt" parameterType="MenuMgt">
select ab.menu_key,
ab.cat1_cd,
ab.cat2_cd,
ab.cat3_cd,
ab.menu_url
from access_config aa
inner join menu_mgt ab on aa.menu_key = ab.menu_key
where aa.user_seq = #{userSeq}
and aa.access_auth is not null
<include refid="selectMenuMgtListWhere"></include>
order by cat1_cd, cat2_cd, cat3_cd
limit #{rowCnt} offset #{firstIndex}
</select>
<select id="selectMenuMgtListToAccessAuthCnt" resultType="int" parameterType="MenuMgt">
select count(*)
from access_config aa
inner join menu_mgt ab on aa.menu_key = ab.menu_key
where aa.user_seq = #{userSeq}
and aa.access_auth is not null
<where>
<include refid="selectMenuMgtListWhere"></include>
</where>
</select>
</mapper>

View File

@ -0,0 +1,32 @@
$(function (){
$.ajax({
type : 'GET',
url : "/myInfo/getDashBoardConfig",
dataType:"json",
success : function(data) {
data = [{menuUrl:"/publicBoard/noticePage"}].concat(data)
getSubPage(data)
},
error : function(xhr, status) {
}
})
})
function getSubPage(menuList){
$.each(menuList, function(idx, menu){
if(idx<6){
$.ajax({
type : 'GET',
url : menu.menuUrl+"?dashboardFlag=true",
dataType:"html",
success : function(html) {
$("#subPage"+idx).append(html);
},
error : function(xhr, status) {
}
})
}
})
}

View File

@ -5,17 +5,40 @@ $(function (){
url : "/myInfo/getDashBoardConfig",
dataType:"json",
success : function(data) {
selectedList = data;
},
error : function(xhr, status) {
}
})
})
$(document).on('click', '.configTr', function (event){
const target = event.target;
if(!(target.className === "moveTd" || $(target).parents(".moveTd").length>0)){
const chkBox = $(this).find(".configChkBox")[0];
chkBox.checked = !chkBox.checked;
}
})
$(document).on('click', '#configAddBtn', function (){
searchModalSubmit(1);
$("#menuModal").modal('show');
})
$(document).on('click', '#configDeleteBtn', function (){
$.each($(".configChkBox:checked"), function (idx, chkBox){
$(chkBox).parents(".configTr").remove();
})
const tempList = [];
$.each($(".configChkBox"), function (idx, chkBox){
$.each(selectedList, function (idx, menu){
if(menu.menuKey === Number($(chkBox).attr('data-menukey'))){
tempList.push(menu);
}
})
})
selectedList = tempList;
orderNumSort();
})
$(document).on('click', '.menuTr', function (){
const checkBox = $(this).find(".menuCheckBox")[0]
@ -23,6 +46,7 @@ $(document).on('click', '.menuTr', function (){
if(checkBox.checked){
selectedList.push({
menuKey: Number(checkBox.value),
orderNum: selectedList.length+1,
cat1Cd: $(this).find(".cat1Cd").val(),
cat2Cd: $(this).find(".cat2Cd").val(),
cat3Cd: $(this).find(".cat3Cd").val(),
@ -32,6 +56,7 @@ $(document).on('click', '.menuTr', function (){
const tempList = [];
$.each(selectedList, function (idx, menu){
if(menu.menuKey !== Number(checkBox.value)){
menu.orderNum = idx+1;
tempList.push(menu);
}
})
@ -50,7 +75,6 @@ $(document).on('click', '#getMenuBtn', function (){
xhr.setRequestHeader($("[name='_csrf_header']").val(), $("[name='_csrf']").val());
},
success : function(html) {
debugger
$("#dashboardConfigTbody").empty().append($(html)[1].children[0].children);
$("#menuModal").modal("hide");
},
@ -86,6 +110,16 @@ $(document).on('click', '#savePasswordBtn', function (){
})
}
})
$(document).on('click', '.upBtn', function (){
const targetTr = $(this).parents('tr');
targetTr.prev().before(targetTr);
orderNumSort();
})
$(document).on('click', '.downBtn', function (){
const targetTr = $(this).parents('tr');
targetTr.next().after(targetTr);
orderNumSort();
})
$(document).on('click', '#configSaveBtn', function (){
contentFade("in");
@ -100,7 +134,6 @@ $(document).on('click', '#configSaveBtn', function (){
success : function(data) {
alert("저장되었습니다.");
contentFade("out");
location.reload();
},
error : function(xhr, status) {
alert("저장에 실패하였습니다.")
@ -109,6 +142,25 @@ $(document).on('click', '#configSaveBtn', function (){
})
})
function orderNumSort(){
$.each($(".configTr"), function(idx, tr){
$(tr).find(".orderNumInput").val(idx+1);
for(const menu of selectedList){
if(Number($(tr).find(".configChkBox").attr("data-menukey"))===menu.menuKey){
menu.orderNum = Number($(tr).find(".orderNumInput").val());
}
}
})
selectedList.sort(function(a,b){
if (a.orderNum > b.orderNum) {
return 1;
}
if (a.orderNum < b.orderNum) {
return -1;
}
return 0;
})
}
function setSelectedChkBox(){
$.each(selectedList, function (idx, item){
$("[value="+item.menuKey+"]").prop("checked", true);

View File

@ -0,0 +1,25 @@
<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<div class="card-header bg-white">
<div class="row justify-content-between">
<div class="col-auto">외사경찰 견문관리</div>
<div class="col-auto"><a href="/affair/affairMgt" class="link-dark"><i class="bi bi-list"></i></a></div>
</div>
</div>
<div class="card-body">
<table class="table table-hover">
<thead>
<tr>
<th>제목</th>
<th>작성일시</th>
</tr>
</thead>
<tbody>
<tr class="affairTr" th:each="affair:${affairList}">
<td th:text="${affair.title}"></td>
<td th:text="${#temporals.format(affair.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
</tr>
</tbody>
</table>
</div>
</html>

View File

@ -0,0 +1,25 @@
<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<div class="card-header bg-white">
<div class="row justify-content-between">
<div class="col-auto">월간계획</div>
<div class="col-auto"><a href="/affairPlan/planMgt" class="link-dark"><i class="bi bi-list"></i></a></div>
</div>
</div>
<div class="card-body">
<table class="table table-hover">
<thead>
<tr>
<th>제목</th>
<th>작성일시</th>
</tr>
</thead>
<tbody>
<tr class="planTr" th:each="plan:${planList}">
<td th:text="${plan.contentTitle}"></td>
<td th:text="${#temporals.format(plan.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
</tr>
</tbody>
</table>
</div>
</html>

View File

@ -0,0 +1,25 @@
<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<div class="card-header bg-white">
<div class="row justify-content-between">
<div class="col-auto">청산보고서</div>
<div class="col-auto"><a href="/affairResult/resultMgt" class="link-dark"><i class="bi bi-list"></i></a></div>
</div>
</div>
<div class="card-body">
<table class="table table-hover">
<thead>
<tr>
<th>제목</th>
<th>작성일시</th>
</tr>
</thead>
<tbody>
<tr class="resultTr" th:each="result:${resultList}">
<td th:text="${result.resultTitle}"></td>
<td th:text="${#temporals.format(result.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
</tr>
</tbody>
</table>
</div>
</html>

View File

@ -3,7 +3,7 @@
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="~{layout/layout}">
<th:block layout:fragment="script">
<!--<script type="text/javascript" th:src="@{/js/admin/userMgt.js}"></script>-->
<script type="text/javascript" th:src="@{/js/dashboard.js}"></script>
</th:block>
<div layout:fragment="content">
<main class="pt-3">
@ -13,219 +13,27 @@
<div class="card-body">
<div class="row">
<div class="col-4 py-1">
<div class="card">
<div class="card-header bg-white">
<div class="row justify-content-between">
<div class="col-auto">목록1</div>
<div class="col-auto"><a href="#" class="link-dark"><i class="bi bi-list"></i></a></div>
</div>
</div>
<div class="card-body">
<table class="table table-hover">
<tbody>
<tr>
<td>제목1</td>
<td class="text-end">2022-08-19</td>
</tr>
<tr>
<td>제목2</td>
<td class="text-end">2022-08-19</td>
</tr>
<tr>
<td>제목3</td>
<td class="text-end">2022-08-19</td>
</tr>
<tr>
<td>제목4</td>
<td class="text-end">2022-08-19</td>
</tr>
<tr>
<td>제목5</td>
<td class="text-end">2022-08-19</td>
</tr>
</tbody>
</table>
</div>
<div class="card" id="subPage0">
</div>
</div>
<div class="col-4 py-1">
<div class="card">
<div class="card-header bg-white">
<div class="row justify-content-between">
<div class="col-auto">목록2</div>
<div class="col-auto"><a href="#" class="link-dark"><i class="bi bi-list"></i></a></div>
</div>
</div>
<div class="card-body">
<table class="table table-hover">
<tbody>
<tr>
<td>제목1</td>
<td class="text-end">2022-08-19</td>
</tr>
<tr>
<td>제목2</td>
<td class="text-end">2022-08-19</td>
</tr>
<tr>
<td>제목3</td>
<td class="text-end">2022-08-19</td>
</tr>
<tr>
<td>제목4</td>
<td class="text-end">2022-08-19</td>
</tr>
<tr>
<td>제목5</td>
<td class="text-end">2022-08-19</td>
</tr>
</tbody>
</table>
</div>
<div class="card" id="subPage1">
</div>
</div>
<div class="col-4 py-1">
<div class="card">
<div class="card-header bg-white">
<div class="row justify-content-between">
<div class="col-auto">목록3</div>
<div class="col-auto"><a href="#" class="link-dark"><i class="bi bi-list"></i></a></div>
</div>
</div>
<div class="card-body">
<table class="table table-hover">
<tbody>
<tr>
<td>제목1</td>
<td class="text-end">2022-08-19</td>
</tr>
<tr>
<td>제목2</td>
<td class="text-end">2022-08-19</td>
</tr>
<tr>
<td>제목3</td>
<td class="text-end">2022-08-19</td>
</tr>
<tr>
<td>제목4</td>
<td class="text-end">2022-08-19</td>
</tr>
<tr>
<td>제목5</td>
<td class="text-end">2022-08-19</td>
</tr>
</tbody>
</table>
</div>
<div class="card" id="subPage2">
</div>
</div>
<div class="col-4 py-1">
<div class="card">
<div class="card-header bg-white">
<div class="row justify-content-between">
<div class="col-auto">목록4</div>
<div class="col-auto"><a href="#" class="link-dark"><i class="bi bi-list"></i></a></div>
</div>
</div>
<div class="card-body">
<table class="table table-hover">
<tbody>
<tr>
<td>제목1</td>
<td class="text-end">2022-08-19</td>
</tr>
<tr>
<td>제목2</td>
<td class="text-end">2022-08-19</td>
</tr>
<tr>
<td>제목3</td>
<td class="text-end">2022-08-19</td>
</tr>
<tr>
<td>제목4</td>
<td class="text-end">2022-08-19</td>
</tr>
<tr>
<td>제목5</td>
<td class="text-end">2022-08-19</td>
</tr>
</tbody>
</table>
</div>
<div class="card" id="subPage3">
</div>
</div>
<div class="col-4 py-1">
<div class="card">
<div class="card-header bg-white">
<div class="row justify-content-between">
<div class="col-auto">목록5</div>
<div class="col-auto"><a href="#" class="link-dark"><i class="bi bi-list"></i></a></div>
</div>
</div>
<div class="card-body">
<table class="table table-hover">
<tbody>
<tr>
<td>제목1</td>
<td class="text-end">2022-08-19</td>
</tr>
<tr>
<td>제목2</td>
<td class="text-end">2022-08-19</td>
</tr>
<tr>
<td>제목3</td>
<td class="text-end">2022-08-19</td>
</tr>
<tr>
<td>제목4</td>
<td class="text-end">2022-08-19</td>
</tr>
<tr>
<td>제목5</td>
<td class="text-end">2022-08-19</td>
</tr>
</tbody>
</table>
</div>
<div class="card" id="subPage4">
</div>
</div>
<div class="col-4 py-1">
<div class="card">
<div class="card-header bg-white">
<div class="row justify-content-between">
<div class="col-auto">목록6</div>
<div class="col-auto"><a href="#" class="link-dark"><i class="bi bi-list"></i></a></div>
</div>
</div>
<div class="card-body">
<table class="table table-hover">
<tbody>
<tr>
<td>제목1</td>
<td class="text-end">2022-08-19</td>
</tr>
<tr>
<td>제목2</td>
<td class="text-end">2022-08-19</td>
</tr>
<tr>
<td>제목3</td>
<td class="text-end">2022-08-19</td>
</tr>
<tr>
<td>제목4</td>
<td class="text-end">2022-08-19</td>
</tr>
<tr>
<td>제목5</td>
<td class="text-end">2022-08-19</td>
</tr>
</tbody>
</table>
</div>
<div class="card" id="subPage5">
</div>
</div>
</div>

View File

@ -0,0 +1,27 @@
<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<div class="card-header bg-white">
<div class="row justify-content-between">
<div class="col-auto">공지사항</div>
<div class="col-auto"><a href="/publicBoard/noticePage" class="link-dark"><i class="bi bi-list"></i></a></div>
</div>
</div>
<div class="card-body">
<table class="table table-hover">
<thead>
<tr>
<th>제목</th>
<th>작성자</th>
<th>작성일시</th>
</tr>
</thead>
<tbody>
<tr class="planTr" th:each="notice:${noticeList}">
<td th:text="${notice.title}"></td>
<td th:text="${notice.wrtUserNm}"></td>
<td th:text="${#temporals.format(notice.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
</tr>
</tbody>
</table>
</div>
</html>

View File

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<div class="card-header bg-white">
<div class="row justify-content-between">
<div class="col-auto">민간통역인현황</div>
<div class="col-auto"><a href="/translator/info" class="link-dark"><i class="bi bi-list"></i></a></div>
</div>
</div>
<div class="card-body">
<table class="table table-striped">
<thead>
<tr>
<th>관서명</th>
<th>언어</th>
<th>성명</th>
<th>위촉일</th>
<th>연락처</th>
</tr>
</thead>
<tbody>
<tr class="userInfoTr" th:each="trInfo:${translatorList}">
<td th:text="${trInfo.ogdp1}"></td>
<td th:text="${trInfo.trLang}"></td>
<td th:text="${trInfo.trName}"></td>
<td th:text="${trInfo.aptDt}"></td>
<td th:text="${trInfo.trPhone}"></td>
</tr>
</tbody>
</table>
</div>
</html>

View File

@ -1,9 +1,11 @@
<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<table>
<tr th:each="dashboardConfig:${dashboardConfigList}">
<tr class="configTr" th:each="dashboardConfig:${dashboardConfigList}">
<td><input type="checkbox" class="configChkBox" th:data-menukey="${dashboardConfig.menuKey}"></td>
<td></td>
<td>
<input type="text" class="border-0 orderNumInput" th:value="${dashboardConfig.orderNum}" readonly>
</td>
<th:block th:each="commonCode:${session.commonCode.get('CAT1')}">
<td th:if="${commonCode.itemCd eq dashboardConfig.cat1Cd}" th:text="${commonCode.itemValue}"></td>
</th:block>
@ -16,6 +18,9 @@
<td th:if="${commonCode.itemCd eq dashboardConfig.cat3Cd}" th:text="${commonCode.itemValue}"></td>
</th:block>
<td th:text="${dashboardConfig.menuUrl}"></td>
<td></td>
<td class="moveTd">
<input type="button" class="btn btn-sm btn-outline-dark upBtn" value="▲">
<input type="button" class="btn btn-sm btn-outline-dark downBtn" value="▼">
</td>
</tr>
</table>

View File

@ -2,6 +2,14 @@
<html lang="ko" xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="~{layout/layout}">
<th:block layout:fragment="css">
<style>
.orderNumInput{
width:60px;
text-align: center;
}
</style>
</th:block>
<th:block layout:fragment="script">
<script type="text/javascript" th:src="@{/js/user/info.js}"></script>
</th:block>
@ -26,40 +34,50 @@
</div>
<div class="tab-pane fade p-2" id="dashboardTabPanel" role="tabpanel" aria-labelledby="dashboardTab" tabindex="0">
<form action="#" id="dashboardConfigForm">
<table class="table table-hover">
<thead>
<tr>
<th><input type="checkbox" class="allChk"></th>
<th>순번</th>
<th>대분류</th>
<th>중분류</th>
<th>소분류</th>
<th>url</th>
<th>위치변경</th>
</tr>
</thead>
<tbody id="dashboardConfigTbody">
<tr th:each="dashboardConfig, idx:${dashboardConfigList}">
<td><input type="checkbox" class="configChkBox" th:data-menukey="${dashboardConfig.menuKey}"></td>
<td th:text="${idx.count}"></td>
<th:block th:each="commonCode:${session.commonCode.get('CAT1')}">
<td th:if="${commonCode.itemCd eq dashboardConfig.cat1Cd}" th:text="${commonCode.itemValue}"></td>
</th:block>
<th:block th:if="${#strings.isEmpty(dashboardConfig.cat2Cd)}"><td></td></th:block>
<th:block th:unless="${#strings.isEmpty(dashboardConfig.cat2Cd)}" th:each="commonCode:${session.commonCode.get('CAT2')}">
<td th:if="${commonCode.itemCd eq dashboardConfig.cat2Cd}" th:text="${commonCode.itemValue}"></td>
</th:block>
<th:block th:if="${#strings.isEmpty(dashboardConfig.cat3Cd)}"><td></td></th:block>
<th:block th:unless="${#strings.isEmpty(dashboardConfig.cat3Cd)}" th:each="commonCode:${session.commonCode.get('CAT3')}">
<td th:if="${commonCode.itemCd eq dashboardConfig.cat3Cd}" th:text="${commonCode.itemValue}"></td>
</th:block>
<td th:text="${dashboardConfig.menuUrl}"></td>
<td></td>
</tr>
</tbody>
</table>
</form>
<div class="row justify-content-end">
<div class="col-auto">
<button type="button" class="btn btn-outline-info" data-bs-toggle="modal" data-bs-target="#questionModal">
<i class="bi bi-question-lg"></i>
</button>
</div>
</div>
<table class="table table-hover">
<thead>
<tr>
<th><input type="checkbox" class="allChk"></th>
<th>순번</th>
<th>대분류</th>
<th>중분류</th>
<th>소분류</th>
<th>url</th>
<th>위치변경</th>
</tr>
</thead>
<tbody id="dashboardConfigTbody">
<tr class="configTr" th:each="dashboardConfig, idx:${dashboardConfigList}">
<td><input type="checkbox" class="configChkBox" th:data-menukey="${dashboardConfig.menuKey}"></td>
<td>
<input type="text" class="border-0 orderNumInput" th:value="${dashboardConfig.orderNum}" readonly>
</td>
<th:block th:each="commonCode:${session.commonCode.get('CAT1')}">
<td th:if="${commonCode.itemCd eq dashboardConfig.cat1Cd}" th:text="${commonCode.itemValue}"></td>
</th:block>
<th:block th:if="${#strings.isEmpty(dashboardConfig.cat2Cd)}"><td></td></th:block>
<th:block th:unless="${#strings.isEmpty(dashboardConfig.cat2Cd)}" th:each="commonCode:${session.commonCode.get('CAT2')}">
<td th:if="${commonCode.itemCd eq dashboardConfig.cat2Cd}" th:text="${commonCode.itemValue}"></td>
</th:block>
<th:block th:if="${#strings.isEmpty(dashboardConfig.cat3Cd)}"><td></td></th:block>
<th:block th:unless="${#strings.isEmpty(dashboardConfig.cat3Cd)}" th:each="commonCode:${session.commonCode.get('CAT3')}">
<td th:if="${commonCode.itemCd eq dashboardConfig.cat3Cd}" th:text="${commonCode.itemValue}"></td>
</th:block>
<td th:text="${dashboardConfig.menuUrl}"></td>
<td class="moveTd">
<input type="button" class="btn btn-sm btn-outline-dark upBtn" value="▲">
<input type="button" class="btn btn-sm btn-outline-dark downBtn" value="▼">
</td>
</tr>
</tbody>
</table>
<div class="row justify-content-between">
<div class="col-auto">
<input type="button" class="btn btn-danger" id="configDeleteBtn" value="삭제">
@ -140,5 +158,22 @@
</div>
</div>
</div>
<div class="modal fade" id="questionModal" tabindex="-1" aria-labelledby="questionModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title fs-5" id="questionModalLabel">안내</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<p>대시보드에 노출될 게시판을 선택하여 저장합니다.</p>
<p>저장에 제한은 없으나 상위 5건과 공지사항만 대시보드에 노출됩니다.</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
</html>