2 Commits

Author SHA1 Message Date
b9036465f2 返却機能 2026-10-21 10:03:06 +09:00
b298aa01c3 書き出し中一覧に表示 2026-10-21 09:24:53 +09:00
6 changed files with 76 additions and 40 deletions

View File

@@ -101,7 +101,7 @@ public class AdminLoanController {
try {
loanService.returnBook(id, admin);
ra.addFlashAttribute("message", "書籍の返却が完了しました。");
return "redirect:/admin/return/complete";
return "returnComplete";
} catch (BusinessException e) {
ra.addFlashAttribute("errorMessage", e.getMessage());
return "redirect:/admin/lendings";

View File

@@ -4,27 +4,18 @@
<head>
<meta charset="UTF-8">
<title>書籍貸出申請</title>
<link rel="stylesheet" th:href="@{/css/style.css}">
</head>
<body>
<h1>
   
<div class="rightSection">
<span class="loginInfo">ログイン者名:<span th:text="${session.loginUser.nmEmployee}"></span></span>
<button class="logoutButton" onclick="logoutSubmit()">ログアウト</button>
</div>
</h1>
<h2>書籍貸出申請を承認しました。</h2>
<div th:replace="~{fragments/header :: header}"></div>
<h1>完了</h1>
<div class="info" th:text="${message} ?:'書籍貸出申請を承認しました。'"></div>
<form action="returnComplete" method="post" >
<div class="msgBox error" th:if="${messageError} != null">
<span class="error" th:text="${messageError.message}"></span>
</div>
</form>
<a th:href="@{/admin/applications}">承認待ち一覧に戻る</a>
<a href="showMenu">メニューに戻る</a>
<p>
<a class="btn" th:href="@{/admin/applications}">承認待ち一覧に戻る</a>
<a class="btn sub" th:href="@{/menu}">メニューに戻る</a>
</p>
</body>

View File

@@ -4,16 +4,14 @@
<head>
<meta charset="UTF-8">
<title>書籍貸出承認確認</title>
<link rel="stylesheet" th:href="@{/css/style.css}">
</head>
<body>
<div th:replace="~{fragments/header :: header}"></div>
<h1>
書籍貸出承認確認   
<div class="rightSection">
<span class="loginInfo">ログイン者名:<span th:text="${session.loginUser.nmEmployee}"></span></span>
<button class="logoutButton" onclick="logoutSubmit()">ログアウト</button>
</div>
</h1>

View File

@@ -4,27 +4,19 @@
<head>
<meta charset="UTF-8">
<title>書籍貸出申請</title>
<link rel="stylesheet" th:href="@{/css/style.css}">
</head>
<body>
<h1>
   
<div class="rightSection">
<span class="loginInfo">ログイン者名:<span th:text="${session.loginUser.nmEmployee}"></span></span>
<button class="logoutButton" onclick="logoutSubmit()">ログアウト</button>
</div>
</h1>
<h2>書籍貸出申請を却下しました。</h2>
<div th:replace="~{fragments/header :: header}"></div>
<h1>却下</h1>
<div class="info" th:text="${message} ?: '書籍貸出申請を却下しました。'"></div>
<p>
<a class="btn" th:href="@{/admin/applications}">承認待ち一覧に戻る</a>
<a class="btn sub" th:href="@{/menu}">メニューに戻る</a>
</p>
<form action="returnRejected" method="post">
<div class="msgBox error" th:if="${messageError} != null">
<span class="error" th:text="${messageError.message}"></span>
</div>
</form>
<a th:href="@{/admin/applications}">承認待ち一覧に戻る</a>
<a href="showMenu">メニューに戻る</a>
</body>

View File

@@ -0,0 +1,34 @@
<!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>
<div th:replace="~{fragments/header :: header}"></div>
<main>
<h1>貸出中書籍一覧</h1>
<div class="error" th:if="${errorMessage}" th:text="${errorMessage}"></div>
<div class="error" th:each="e : ${errors}" th:text="${e}"></div>
<div class="card">
<p th:if="${#lists.isEmpty(list)}">貸出中の書籍はありません。</p>
<table th:unless="${#lists.isEmpty(list)}">
<thead><tr><th>申請ID</th><th>申請者名</th><th>書籍名</th><th>申請日</th><th>貸出日</th><th>返却予定日</th><th>操作</th></tr></thead>
<tbody>
<tr th:each="r : ${list}">
<td th:text="${r.idRequest}"></td>
<td th:text="${r.nmApplicant}"></td>
<td th:text="${r.nmBook}"></td>
<td th:text="${r.dateRequest}"></td>
<td th:text="${r.dateBorrow}"></td>
<td th:text="${r.dateScheduledReturn}"></td>
<td><a class="btn" th:href="@{/admin/lendings/{id}(id=${r.idRequest})}">返却</a></td>
</tr>
</tbody>
</table>
</div>
<p><a class="btn sub" th:href="@{/menu}">メニューに戻る</a></p>
</main>
</body>
</html>

View File

@@ -0,0 +1,21 @@
<!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>
<div th:replace="~{fragments/header :: header}"></div>
<h1>返却完了</h1>
<div class="info" th:text="${message} ?: '書籍の返却が完了しました。'"></div>
<p>
<a class="btn" th:href="@{/admin/lendings}">貸出中書籍一覧に戻る</a>
<a class="btn sub" th:href="@{/menu}">メニューに戻る</a>
</p>
</body>
</html>