Compare commits
24 Commits
6ca6d6399b
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
177b326baa | ||
|
|
513f1fe53a | ||
|
|
fc2bc31a52 | ||
|
|
f07be31978 | ||
|
|
b0e1174ef2 | ||
|
|
141f3e3b5d | ||
| 1520676916 | |||
| 47ce48e323 | |||
|
|
441d91d1e2 | ||
| 34b2e8c5de | |||
|
|
d6d9aa555b | ||
|
|
22a213a4db | ||
| f5c8bb302c | |||
|
|
013b08e9b8 | ||
|
|
443e416386 | ||
|
|
9b4b31924b | ||
| c5c5c3dcc9 | |||
| f8973bd47f | |||
| 01ffb88358 | |||
|
|
5c9ea74c69 | ||
| 10f7551bbd | |||
| 229f578d69 | |||
|
|
df4cc6465c | ||
|
|
27a4fa71c4 |
@@ -18,92 +18,79 @@ import com.example.demo.service.BookInsertService;
|
|||||||
@Controller
|
@Controller
|
||||||
public class BookInsertController {
|
public class BookInsertController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private BookInsertService bookInsertService;
|
private BookInsertService bookInsertService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private BookCategoryRepository categoryRepository;
|
private BookCategoryRepository categoryRepository;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private SubCategoryRepository subCategoryRepository;
|
private SubCategoryRepository subCategoryRepository;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private StorageLocationRepository storageLocationRepository;
|
private StorageLocationRepository storageLocationRepository;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private BookInsertRepository bookInsertRepository;
|
private BookInsertRepository bookInsertRepository;
|
||||||
|
|
||||||
@GetMapping("/bookInsert")
|
@GetMapping("/bookInsert")
|
||||||
public String bookInsert(Model model) {
|
public String bookInsert(Model model) {
|
||||||
model.addAttribute("nextBookManageId",bookInsertService.createBookManageId());
|
model.addAttribute("nextBookManageId", bookInsertService.createBookManageId());
|
||||||
model.addAttribute("bookInsert",new BookInsert());
|
model.addAttribute("bookInsert", new BookInsert());
|
||||||
model.addAttribute("categoryList",categoryRepository.findAll());
|
model.addAttribute("categoryList", categoryRepository.findAll());
|
||||||
model.addAttribute("subCategoryList",subCategoryRepository.findAll());
|
model.addAttribute("subCategoryList", subCategoryRepository.findAll());
|
||||||
model.addAttribute("locationList",storageLocationRepository.findAll());
|
model.addAttribute("locationList", storageLocationRepository.findAll());
|
||||||
model.addAttribute("bookInsert",new BookInsert());
|
model.addAttribute("bookInsert", new BookInsert());
|
||||||
return "bookInsert";
|
return "bookInsert";
|
||||||
}
|
}
|
||||||
|
|
||||||
// 初期表示: 空のformを渡す(th:fieldの初期値が空になる)
|
// 初期表示: 空のformを渡す(th:fieldの初期値が空になる)
|
||||||
|
|
||||||
// 確認画面から戻る: POSTされた入力中の値がformに入ったまま入力画面へ
|
// 確認画面から戻る: POSTされた入力中の値がformに入ったまま入力画面へ
|
||||||
@PostMapping("/bookInsertConfirm")
|
//入力内容確認してOKであれば確認画面へ
|
||||||
public String bookInsertConfirm(@Validated BookInsert bookInsert,BindingResult result,Model model) {
|
@PostMapping("/bookInsertConfirm")
|
||||||
if(result.hasErrors()) {
|
public String bookInsertConfirm(@Validated BookInsert bookInsert, BindingResult result, Model model) {
|
||||||
model.addAttribute("nextBookManageId",bookInsertService.createBookManageId());
|
if (result.hasErrors()) {
|
||||||
model.addAttribute("categoryList",categoryRepository.findAll());
|
model.addAttribute("nextBookManageId", bookInsertService.createBookManageId());
|
||||||
if(bookInsert.getBookCategoryId() != null) { //nullじゃなかったら
|
model.addAttribute("categoryList", categoryRepository.findAll());
|
||||||
model.addAttribute("subCategoryList",subCategoryRepository.findByBookCategory_BookCategoryId(bookInsert.getBookCategoryId()));
|
if (bookInsert.getBookCategoryId() != null) { //nullじゃなかったら
|
||||||
//そのカテゴリに属するサブカテゴリを持ってくる
|
model.addAttribute("subCategoryList",
|
||||||
} else{
|
subCategoryRepository.findByBookCategory_BookCategoryId(bookInsert.getBookCategoryId()));
|
||||||
model.addAttribute("subCategoryList",subCategoryRepository.findAll());
|
//そのカテゴリに属するサブカテゴリを持ってくる
|
||||||
}
|
} else {
|
||||||
model.addAttribute("locationList",storageLocationRepository.findAll());
|
model.addAttribute("subCategoryList", subCategoryRepository.findAll());
|
||||||
model.addAttribute("bookInsert", bookInsert);
|
}
|
||||||
return "bookInsert";
|
model.addAttribute("locationList",storageLocationRepository.findAll());
|
||||||
|
model.addAttribute("bookInsert", bookInsert);
|
||||||
|
return "bookInsert";
|
||||||
|
|
||||||
}
|
}
|
||||||
bookInsertService.save(bookInsert);
|
bookInsertService.save(bookInsert);
|
||||||
model.addAttribute("bookInsert",bookInsert);
|
model.addAttribute("bookInsert", bookInsert);
|
||||||
return "bookInsertConfirm";
|
return "bookInsertConfirm";
|
||||||
}
|
}
|
||||||
|
|
||||||
//確認画面から「もどる」ボタンを押したら入力画面に戻る
|
@PostMapping("/bookInsert/category")
|
||||||
@PostMapping("/bookInsert")
|
public String changeCategory(BookInsert bookInsert, Model model) {
|
||||||
public String bookInsertBack(BookInsert bookInsert,Model model) {
|
//カテゴリプルダウンに表示するデータを取得
|
||||||
model.addAttribute("nextBookManageId",bookInsertService.createBookManageId());
|
model.addAttribute("nextBookManageId", bookInsertService.createBookManageId());
|
||||||
model.addAttribute("categoryList",categoryRepository.findAll());
|
model.addAttribute("categoryList", categoryRepository.findAll());
|
||||||
if(bookInsert.getBookCategoryId() !=null) {
|
if (bookInsert.getBookCategoryId() != null) { //nullじゃなかったら
|
||||||
model.addAttribute("subCategoryList",subCategoryRepository.findByBookCategory_BookCategoryId(bookInsert.getBookCategoryId()));
|
model.addAttribute("subCategoryList",
|
||||||
} else{
|
subCategoryRepository.findByBookCategory_BookCategoryId(bookInsert.getBookCategoryId()));
|
||||||
model.addAttribute("subCategoryList",subCategoryRepository.findAll());
|
//そのカテゴリに属するサブカテゴリを持ってくる
|
||||||
}
|
} else {
|
||||||
model.addAttribute("locationList",storageLocationRepository.findAll());
|
model.addAttribute("subCategoryList", subCategoryRepository.findAll());
|
||||||
model.addAttribute("bookInsert",bookInsert);
|
}
|
||||||
return "bookInsert";
|
model.addAttribute("locationList", storageLocationRepository.findAll());
|
||||||
}
|
model.addAttribute("bookInsert", bookInsert);
|
||||||
|
|
||||||
@PostMapping("/bookInsert/category")
|
return "bookInsert";
|
||||||
public String changeCategory(BookInsert bookInsert,Model model) {
|
}
|
||||||
//カテゴリプルダウンに表示するデータを取得
|
|
||||||
model.addAttribute("nextBookManageId",bookInsertService.createBookManageId());
|
|
||||||
model.addAttribute("categoryList",categoryRepository.findAll());
|
|
||||||
model.addAttribute("subCategoryList",subCategoryRepository.findByBookCategory_BookCategoryId(bookInsert.getBookCategoryId()));
|
|
||||||
model.addAttribute("locationList",storageLocationRepository.findAll());
|
|
||||||
model.addAttribute("bookInsert", bookInsert);
|
|
||||||
|
|
||||||
return "bookInsert";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//画面で選択したカテゴリbookInsert.getBookCategoryId()に選択した結果をいれる
|
||||||
|
//subCategoryRepository.findBookCategory_BookCategoryId(bookInsert.getBookCategoryId(1)));
|
||||||
//画面で選択したカテゴリbookInsert.getBookCategoryId()に選択した結果をいれる
|
//「カテゴリIDが1のサブカテゴリを取ってくる」
|
||||||
//subCategoryRepository.findBookCategory_BookCategoryId(bookInsert.getBookCategoryId(1)));
|
//model.addAttribute("subCategoryList",取得結果)
|
||||||
//「カテゴリIDが1のサブカテゴリを取ってくる」
|
|
||||||
//model.addAttribute("subCategoryList",取得結果)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,11 @@
|
|||||||
package com.example.demo.controller;
|
package com.example.demo.controller;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.Model;
|
import org.springframework.ui.Model;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
import com.example.demo.entity.BookLend;
|
|
||||||
import com.example.demo.service.BookLendService;
|
import com.example.demo.service.BookLendService;
|
||||||
|
|
||||||
|
|
||||||
@@ -20,12 +18,19 @@ public class LendListController {
|
|||||||
@GetMapping("/lendList")
|
@GetMapping("/lendList")
|
||||||
public String list(Model model) {
|
public String list(Model model) {
|
||||||
|
|
||||||
List<BookLend> aaa = lendlistService.findAll();
|
|
||||||
|
|
||||||
// findAllを使って、DBから一覧を取得 でバックで取得したのを確認
|
// findAllを使って、DBから一覧を取得 でバックで取得したのを確認
|
||||||
model.addAttribute("list",lendlistService.findAll());
|
model.addAttribute("list",lendlistService.findAll());
|
||||||
|
|
||||||
return "lendList";
|
return "lendList";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/return-book")
|
||||||
|
public String retun(@RequestParam(name="lendId") int returnBook){
|
||||||
|
|
||||||
|
lendlistService.regist(returnBook);
|
||||||
|
|
||||||
|
|
||||||
|
return "bookLendResult";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
package com.example.demo.controller;
|
package com.example.demo.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpSession;
|
import jakarta.servlet.http.HttpSession;
|
||||||
import jakarta.validation.Valid;
|
import jakarta.validation.Valid;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.Model;
|
import org.springframework.ui.Model;
|
||||||
import org.springframework.validation.BindingResult;
|
import org.springframework.validation.BindingResult;
|
||||||
@@ -11,7 +14,9 @@ import org.springframework.web.bind.annotation.ModelAttribute;
|
|||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
|
||||||
import com.example.demo.entity.AccountEntity;
|
import com.example.demo.entity.AccountEntity;
|
||||||
|
import com.example.demo.entity.Employee;
|
||||||
import com.example.demo.form.LoginForm;
|
import com.example.demo.form.LoginForm;
|
||||||
|
import com.example.demo.repository.EmployeeRepository;
|
||||||
import com.example.demo.service.LoginService;
|
import com.example.demo.service.LoginService;
|
||||||
|
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
@@ -21,12 +26,20 @@ import lombok.RequiredArgsConstructor;
|
|||||||
public class LoginController {
|
public class LoginController {
|
||||||
|
|
||||||
private final LoginService loginService;
|
private final LoginService loginService;
|
||||||
|
@Autowired
|
||||||
|
private EmployeeRepository employeeRepository;
|
||||||
|
|
||||||
|
|
||||||
// Boot起動直後にログイン画面に移動する用のメソッド
|
// Boot起動直後にログイン画面に移動する用のメソッド
|
||||||
@GetMapping("/")
|
@GetMapping("/")
|
||||||
public String index(HttpSession session) {
|
public String index(Model model,HttpSession session) {
|
||||||
if (session.getAttribute("loginEmployee") != null) {
|
if (session.getAttribute("loginEmployee") != null) {
|
||||||
return "redirect:/topmenu";
|
if(session.getAttribute("EmployeeId") != null) {
|
||||||
|
|
||||||
|
List<Employee> emrp = employeeRepository.findByEmployeeId((Integer)session.getAttribute("EmployeeId") );
|
||||||
|
model.addAttribute("LoginName",emrp.getFirst().getEmployeeName());
|
||||||
|
}
|
||||||
|
return "topmenu";
|
||||||
}
|
}
|
||||||
return "redirect:/login";
|
return "redirect:/login";
|
||||||
}
|
}
|
||||||
@@ -34,7 +47,12 @@ public class LoginController {
|
|||||||
@GetMapping("/login")
|
@GetMapping("/login")
|
||||||
public String loginForm(Model model, HttpSession session) {
|
public String loginForm(Model model, HttpSession session) {
|
||||||
if (session.getAttribute("loginEmployee") != null) {
|
if (session.getAttribute("loginEmployee") != null) {
|
||||||
return "redirect:/topmenu";
|
if(session.getAttribute("EmployeeId") != null) {
|
||||||
|
|
||||||
|
List<Employee> emrp = employeeRepository.findByEmployeeId((Integer)session.getAttribute("EmployeeId") );
|
||||||
|
model.addAttribute("LoginName",emrp.getFirst().getEmployeeName());
|
||||||
|
}
|
||||||
|
return "topmenu";
|
||||||
}
|
}
|
||||||
|
|
||||||
model.addAttribute("loginForm", new LoginForm());
|
model.addAttribute("loginForm", new LoginForm());
|
||||||
@@ -56,12 +74,18 @@ public class LoginController {
|
|||||||
AccountEntity accountEntity = loginService.login(loginForm);
|
AccountEntity accountEntity = loginService.login(loginForm);
|
||||||
if (accountEntity == null) {
|
if (accountEntity == null) {
|
||||||
model.addAttribute("loginError",
|
model.addAttribute("loginError",
|
||||||
"ログインIDまたはパスワードが正しくありません");
|
"社員IDまたはパスワードが正しくありません");
|
||||||
return "login";
|
return "login";
|
||||||
}
|
}
|
||||||
|
|
||||||
session.setAttribute("loginEmployee", accountEntity);
|
session.setAttribute("loginEmployee", accountEntity);
|
||||||
return "redirect:/topmenu";
|
|
||||||
|
List<Employee> emrp = employeeRepository.findByEmployeeId(accountEntity.getEmployee().getEmployeeId());
|
||||||
|
model.addAttribute("LoginName",emrp.getFirst().getEmployeeName());
|
||||||
|
session.setAttribute("EmployeeId", accountEntity.getEmployee().getEmployeeId());
|
||||||
|
|
||||||
|
|
||||||
|
return "topmenu";
|
||||||
}
|
}
|
||||||
|
|
||||||
// ログアウト処理
|
// ログアウト処理
|
||||||
@@ -73,7 +97,13 @@ public class LoginController {
|
|||||||
|
|
||||||
// 各画面からトップメニューへの遷移用
|
// 各画面からトップメニューへの遷移用
|
||||||
@GetMapping("/topmenu")
|
@GetMapping("/topmenu")
|
||||||
public String showTopMenu() {
|
public String showTopMenu(Model model,HttpSession session) {
|
||||||
|
|
||||||
|
if(session.getAttribute("EmployeeId") != null) {
|
||||||
|
|
||||||
|
List<Employee> emrp = employeeRepository.findByEmployeeId((Integer)session.getAttribute("EmployeeId") );
|
||||||
|
model.addAttribute("LoginName",emrp.getFirst().getEmployeeName());
|
||||||
|
}
|
||||||
return "topmenu";
|
return "topmenu";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5,6 +5,7 @@ import java.util.List;
|
|||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import com.example.demo.entity.Book;
|
import com.example.demo.entity.Book;
|
||||||
import com.example.demo.entity.BookLend;
|
import com.example.demo.entity.BookLend;
|
||||||
@@ -26,7 +27,19 @@ public class BookLendService {
|
|||||||
private EmployeeRepository employeeRepository;
|
private EmployeeRepository employeeRepository;
|
||||||
|
|
||||||
public List<BookLend> findAll() {
|
public List<BookLend> findAll() {
|
||||||
return bookLendRepository.findAll();
|
return bookLendRepository.findBybookStatus(1);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional
|
||||||
|
public void regist(Integer lendId) {
|
||||||
|
|
||||||
|
BookLend booklend = bookLendRepository.findById(lendId).orElse(null);
|
||||||
|
|
||||||
|
booklend.setBookStatus(0);
|
||||||
|
|
||||||
|
bookLendRepository.save(booklend);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void save(int bookId, String bookManageId, int employeeId,
|
public void save(int bookId, String bookManageId, int employeeId,
|
||||||
|
|||||||
@@ -78,7 +78,7 @@
|
|||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr th:each="book : ${book}" th:if="${book.bookManageId != null}">
|
<tr th:each="book : ${book}" th:if="${book.bookManageId != null && book.isDeleted != 1}">
|
||||||
|
|
||||||
<td th:hidden="*{book.bookId}"></td>
|
<td th:hidden="*{book.bookId}"></td>
|
||||||
<td th:text="*{book.bookManageId}"></td>
|
<td th:text="*{book.bookManageId}"></td>
|
||||||
|
|||||||
@@ -12,6 +12,12 @@
|
|||||||
図書貸出処理
|
図書貸出処理
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
|
<div class="float-end">
|
||||||
|
<a th:href="@{/topmenu}">
|
||||||
|
トップメニューへ
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
以下の図書を貸出します。貸出先の社員IDと返却予定日を入力してください。
|
以下の図書を貸出します。貸出先の社員IDと返却予定日を入力してください。
|
||||||
</p>
|
</p>
|
||||||
@@ -20,8 +26,7 @@
|
|||||||
図書情報
|
図書情報
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<form th:action="@{/bookLend/confirm}" method="POST"
|
<form th:action="@{/bookLend/confirm}" method="POST" id="lendForm">
|
||||||
id="lendForm">
|
|
||||||
|
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<table class="info-table">
|
<table class="info-table">
|
||||||
@@ -36,7 +41,7 @@
|
|||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<!-- <td th:hidden="*{book.bookId}"></td>-->
|
<!-- <td th:hidden="*{book.bookId}"></td>-->
|
||||||
<td th:text="*{book.bookManageId}"></td>
|
<td th:text="*{book.bookManageId}"></td>
|
||||||
<td th:text="*{book.title}"></td>
|
<td th:text="*{book.title}"></td>
|
||||||
<td th:text="*{book.author}"></td>
|
<td th:text="*{book.author}"></td>
|
||||||
|
|||||||
20
src/main/resources/templates/bookLendResult.html
Normal file
20
src/main/resources/templates/bookLendResult.html
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html xmlns:th="http://www.thymeleaf.org">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>貸出中図書、返却処理結果画面</title>
|
||||||
|
<link rel="stylesheet" th:href="@{/css/style.css}">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<h1>返却処理が完了しました。</h1>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
<form th:action="@{/lendList}" method="get">
|
||||||
|
<button type="submit" th:value="貸出">貸出中図書一覧に戻る</button>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
@@ -10,12 +10,12 @@
|
|||||||
<body>
|
<body>
|
||||||
<h1>貸出中図書一覧</h1>
|
<h1>貸出中図書一覧</h1>
|
||||||
|
|
||||||
<!-- action先要修正 -->
|
<div class="float-end">
|
||||||
<form action="/lendList" method="GET">
|
<a th:href="@{/topmenu}">トップメニューへ</a>
|
||||||
<input type="submit" value="返却" class="btn">
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
<th>管理ID</th>
|
<th>管理ID</th>
|
||||||
<th>タイトル</th>
|
<th>タイトル</th>
|
||||||
<th>返却予定日</th>
|
<th>返却予定日</th>
|
||||||
<th>超過日数</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
@@ -37,42 +37,30 @@
|
|||||||
<td th:text="*{booklist.book.bookManageId}"></td>
|
<td th:text="*{booklist.book.bookManageId}"></td>
|
||||||
<td th:text="*{booklist.book.title}"></td>
|
<td th:text="*{booklist.book.title}"></td>
|
||||||
<td th:text="*{booklist.bookReturnDate}"></td>
|
<td th:text="*{booklist.bookReturnDate}"></td>
|
||||||
<!-- <td th:text="*{booklist.}"></td>-->
|
|
||||||
|
|
||||||
|
<td>
|
||||||
|
<form th:action="@{/return-book}" method="get">
|
||||||
|
<button type="submit" name="lendId" th:value="${booklist.lendId}"
|
||||||
|
onclick="return MoveCheck();">返却
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
</td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
</form>
|
<script>
|
||||||
|
|
||||||
<!-- 以下ポップアップ -->
|
function MoveCheck() {
|
||||||
<div id="registerModal" class="modal-overlay">
|
return window.confirm("返却処理を実行します。よろしいですか?");
|
||||||
|
}
|
||||||
<div class="modal">
|
|
||||||
|
|
||||||
<div class="modal-message">
|
|
||||||
返却処理が完了しました!
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="modal-buttons">
|
|
||||||
|
|
||||||
<!-- OK -->
|
|
||||||
<form method="get" action="/lendList">
|
|
||||||
|
|
||||||
<button type="submit" class="modal-btn">
|
|
||||||
OK
|
|
||||||
</button>
|
|
||||||
|
|
||||||
</form>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>ログイン</title>
|
<title>ログイン</title>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
@@ -16,7 +17,7 @@
|
|||||||
<form th:action="@{/login}" th:object="${loginForm}" method="post">
|
<form th:action="@{/login}" th:object="${loginForm}" method="post">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="employeeId">社員ID</label>
|
<label for="employeeId">社員ID</label>
|
||||||
<input id="employeeId" type="text" th:field="*{employeeId}">
|
<input id="employeeId" type="text" th:field="*{employeeId}"pattern="^[0-9]+$"title="数値以外は入力しないでください">
|
||||||
<p class="field-error" th:errors="*{employeeId}"></p>
|
<p class="field-error" th:errors="*{employeeId}"></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html xmlns:th="http://www.thymeleaf.org">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
<div class="header-right">
|
<div class="header-right">
|
||||||
|
|
||||||
<span class="user">
|
<span class="user">
|
||||||
テストユーザー(一般)
|
<h1 th:text="${LoginName}"></h1>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<a class="button-link" th:href="@{/logout}">
|
<a class="button-link" th:href="@{/logout}">
|
||||||
@@ -61,16 +61,18 @@
|
|||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<!-- ===== 管理者のみ ===== -->
|
<!-- ===== 管理者のみ ===== -->
|
||||||
|
<th th:if="${session.loginEmployee.adminFlag == 1}">
|
||||||
|
|
||||||
<a class="card" href="/bookInsert">
|
<a class="card" href="/bookInsert">
|
||||||
|
|
||||||
<h3>新規図書登録</h3>
|
<h3>新規図書登録</h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
図書の登録申請を<br> 行います。
|
図書の登録申請を<br> 行います。
|
||||||
</p>
|
</p>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
|
|
||||||
@@ -95,6 +97,7 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
</th>
|
||||||
|
|
||||||
<a class="card" href="/passwordChange">
|
<a class="card" href="/passwordChange">
|
||||||
<h3>パスワード変更</h3>
|
<h3>パスワード変更</h3>
|
||||||
@@ -104,6 +107,11 @@
|
|||||||
</p>
|
</p>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var admin =getElementByID
|
||||||
|
</script>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
Reference in New Issue
Block a user