mirror of
https://github.com/suhf/No1WMS.git
synced 2026-02-05 04:03:45 +09:00
aop로 권한 적용되게 추가
This commit is contained in:
@@ -27,9 +27,6 @@
|
||||
$(".group_tr").on("click", function(event){
|
||||
read($(event.currentTarget).data("tid"));
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
function onSearch(isPersonalSearch){
|
||||
@@ -59,7 +56,7 @@
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="mt-5 mb-5 text-center">
|
||||
<h1>그룹 권한 관리</h1><form method="post" action="/account/create"><button class="btn btn-primary" type="submit" id="btn_create">생성</button></form>
|
||||
<h1>계정 관리</h1><form method="post" action="/account/create"><button class="btn btn-primary" type="submit" id="btn_create">생성</button></form>
|
||||
</div>
|
||||
<div>
|
||||
<hr>
|
||||
@@ -77,7 +74,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${list }" var="dto" varStatus="status">
|
||||
<tr class="group_tr" data-tid="${dto.id}">
|
||||
<tr class="group_tr" data-mingu = "111" data-tid="${dto.id}">
|
||||
<td>${dto.employeeNumber}</td>
|
||||
<td>${dto.name}</td>
|
||||
<td>
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
alert("재정의 됨");
|
||||
}
|
||||
*/
|
||||
|
||||
const tid = '${dto.id}';
|
||||
$(function(){
|
||||
|
||||
@@ -26,6 +27,35 @@
|
||||
$(".c_body").after($form);
|
||||
$form.submit();
|
||||
}
|
||||
function goDelete(){
|
||||
yesNoModalTextDefine("계정 삭제", "해당 계정을 더이상 사용 안하시겠습니까?");
|
||||
$("#yesNoModalLabel").text(yesNoModal.title);
|
||||
$("#yesNoModalBodyTextDiv").text(yesNoModal.body);
|
||||
yesNoModal.yesFunction = deleteProcess;
|
||||
yesNoModalBootStrap.show();
|
||||
|
||||
|
||||
}
|
||||
|
||||
function deleteProcess(){
|
||||
const data = {};
|
||||
data.id = tid;
|
||||
|
||||
$.ajax({
|
||||
type: 'post', // 타입 (get, post, put 등등)
|
||||
url: '/account/delete_process', // 요청할 서버url
|
||||
dataType: 'json', // 데이터 타입 (html, xml, json, text 등등)
|
||||
data: data,
|
||||
success: function (result) { // 결과 성공 콜백함수
|
||||
const $form =$("<form method='get' action='/account/list'></form>");
|
||||
$(".c_body").after($form);
|
||||
$form.submit();
|
||||
},
|
||||
error: function (request, status, error) {
|
||||
alert(error)
|
||||
}
|
||||
});
|
||||
}
|
||||
function resetPassword(){
|
||||
const data = {};
|
||||
data.id = tid;
|
||||
@@ -93,6 +123,7 @@
|
||||
<button class="btn btn-primary" id="password_reset_button" onclick="resetPassword()">비밀번호 리셋</button>
|
||||
<button class="btn btn-primary" id="btn_edit" onclick="goUpdate()">수정</button>
|
||||
<button class="btn btn-danger" id="btn_exit" onclick="goList()">뒤로</button>
|
||||
<button class="btn btn-danger" id="btn_delete" onclick="goDelete()">삭제</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
<!-- 스크립트 부분 안건들여도됨-->
|
||||
<script>
|
||||
let searchModalBootStrap;
|
||||
let yesNoModalBootStrap;
|
||||
let featherLoad = false;
|
||||
$(function(){
|
||||
//네비게이션 관련
|
||||
const $listNavLink = $("a.nav-link");
|
||||
@@ -36,7 +38,7 @@
|
||||
//네비게이션 관련 끝
|
||||
|
||||
//yes no 모달 관련
|
||||
const yesNoModalBootStrap = new bootstrap.Modal("#yes_no_modal");
|
||||
yesNoModalBootStrap = new bootstrap.Modal("#yes_no_modal");
|
||||
$("#yes_no_modal_show_button").on("click", function(){
|
||||
$("#yesNoModalLabel").text(yesNoModal.title);
|
||||
$("#yesNoModalBodyTextDiv").text(yesNoModal.body);
|
||||
@@ -82,7 +84,10 @@
|
||||
|
||||
|
||||
//네비게이션 쪽 아이콘만들어 주는 함수
|
||||
feather.replace();
|
||||
if(!featherLoad) {
|
||||
featherLoad = true;
|
||||
feather.replace();
|
||||
}
|
||||
});
|
||||
/*
|
||||
* 검색 팝업 모달 닫는 함수
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||
<!-- 네비게이션 쪽 -->
|
||||
<div class="col-auto col-md-2 col-xl-2 px-sm-2 px-0 navi-bg">
|
||||
<div class="d-flex flex-column align-items-center align-items-sm-start px-3 pt-2 min-vh-100">
|
||||
@@ -9,76 +10,102 @@
|
||||
<div class="text-center">
|
||||
<img class="img-user" src="https://academy.ilwoo.org/data/file/reference/3531300541_J1gHPmC6_479f762b4825515abc781b3a616929d8949ea2c5.jpg" alt="유저 이미지">
|
||||
<br>
|
||||
<p class="user-name">김이박 사원</p>
|
||||
<p class="user-name">${userData.name}</p>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<hr class="my-3">
|
||||
<c:if test="${authSession.account.read}">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link d-flex align-items-center gap-2" href="/account/list">
|
||||
<i data-feather="users"></i>계정
|
||||
</a>
|
||||
</li>
|
||||
</c:if>
|
||||
<c:if test="${authSession.account.read}">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link d-flex align-items-center gap-2" href="/password_reset">
|
||||
<i data-feather="key"></i>비밀번호 초기화
|
||||
</a>
|
||||
</li>
|
||||
</c:if>
|
||||
<c:if test="${authSession.authority.read}">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link d-flex align-items-center gap-2 active" aria-current="page" href="/authority/list">
|
||||
<i data-feather="user"></i>권한
|
||||
</a>
|
||||
</li>
|
||||
</c:if>
|
||||
<c:if test="${authSession.category.read}">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link d-flex align-items-center gap-2" href="/category/list">
|
||||
<i data-feather="user"></i>제품 카테고리
|
||||
</a>
|
||||
</li>
|
||||
</c:if>
|
||||
<c:if test="${authSession.product.read}">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link d-flex align-items-center gap-2" href="/product/list">
|
||||
<i data-feather="box"></i>제품
|
||||
</a>
|
||||
</li>
|
||||
</c:if>
|
||||
<c:if test="${authSession.price.read}">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link d-flex align-items-center gap-2" href="/price/list">
|
||||
<i data-feather="dollar-sign"></i>제품 가격
|
||||
</a>
|
||||
</li>
|
||||
</c:if>
|
||||
<c:if test="${authSession.vendor.read}">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link d-flex align-items-center gap-2" href="/vender/list">
|
||||
<i data-feather="compass"></i>거래처
|
||||
</a>
|
||||
</li>
|
||||
</c:if>
|
||||
<c:if test="${authSession.warehouse.read}">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link d-flex align-items-center gap-2" href="/warehouse/list">
|
||||
<i data-feather="inbox"></i>창고
|
||||
</a>
|
||||
</li>
|
||||
</c:if>
|
||||
<c:if test="${authSession.product.read}">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link d-flex align-items-center gap-2" href="/stock/list">
|
||||
<i data-feather="archive"></i>재고
|
||||
</a>
|
||||
</li>
|
||||
</c:if>
|
||||
<c:if test="${authSession.account.read}">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link d-flex align-items-center gap-2" href="/plan_in/list">
|
||||
<i data-feather="user"></i>입고 예정
|
||||
</a>
|
||||
</li>
|
||||
</c:if>
|
||||
<c:if test="${authSession.in.read}">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link d-flex align-items-center gap-2" href="/in/list">
|
||||
<i data-feather="check"></i>입고
|
||||
</a>
|
||||
</li>
|
||||
</c:if>
|
||||
<c:if test="${authSession.out.read}">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link d-flex align-items-center gap-2" href="/out/list">
|
||||
<i data-feather="truck"></i>출고
|
||||
</a>
|
||||
</li>
|
||||
</c:if>
|
||||
<c:if test="${authSession.board.read}">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link d-flex align-items-center gap-2" href="/board/list">
|
||||
<i data-feather="list"></i>게시판
|
||||
</a>
|
||||
</li>
|
||||
</c:if>
|
||||
</ul>
|
||||
|
||||
<hr class="my-3">
|
||||
|
||||
77
src/main/webapp/WEB-INF/views/modal/login.jsp
Normal file
77
src/main/webapp/WEB-INF/views/modal/login.jsp
Normal file
@@ -0,0 +1,77 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles"%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
|
||||
<script src="https://unpkg.com/feather-icons"></script>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>No1 WMS</title>
|
||||
<style>
|
||||
.form-signin {
|
||||
width: 100%;
|
||||
max-width: 330px;
|
||||
padding: 15px;
|
||||
margin: auto;
|
||||
}
|
||||
body{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-top: 40px;
|
||||
padding-bottom: 40px;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body class="text-center">
|
||||
<script>
|
||||
function onLogin(){
|
||||
const data={};
|
||||
data.employeeNumber=$("#employ_number").val();
|
||||
data.password=$("#password").val();
|
||||
$.ajax({
|
||||
type: 'post', // 타입 (get, post, put 등등)
|
||||
url: '/login/check_password', // 요청할 서버url
|
||||
dataType: 'json', // 데이터 타입 (html, xml, json, text 등등)
|
||||
data: data,
|
||||
success: function (result) { // 결과 성공 콜백함수
|
||||
window.location.href = "/";
|
||||
},
|
||||
error: function (request, status, error) {
|
||||
alert(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<main class="form-signin">
|
||||
<img class="mb-4" src="/docs/5.0/assets/brand/bootstrap-logo.svg" alt="" width="72" height="57">
|
||||
<h1 class="h3 mb-3 fw-normal">Please sign in</h1>
|
||||
|
||||
<div class="form-floating">
|
||||
<input type="text" class="form-control" id="employ_number" name="employeeNumber" placeholder="사번">
|
||||
<label for="employ_number">사번</label>
|
||||
</div>
|
||||
<div class="form-floating">
|
||||
<input type="password" name="password" class="form-control" id="password" placeholder="비밀번호">
|
||||
<label for="password">비밀번호</label>
|
||||
</div>
|
||||
|
||||
<div class="checkbox mb-3">
|
||||
<label>
|
||||
<a href="/">비밀번호를 잊으셨나요?</a>
|
||||
</label>
|
||||
</div>
|
||||
<button class="w-100 btn btn-lg btn-primary" type="button" onclick="onLogin()">로그인</button>
|
||||
<p class="mt-5 mb-3 text-muted">© 2023–2024</p>
|
||||
</main>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user