Compare commits
2 Commits
fc2bc31a52
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
177b326baa | ||
|
|
513f1fe53a |
@@ -27,7 +27,7 @@ public class BookLendService {
|
||||
private EmployeeRepository employeeRepository;
|
||||
|
||||
public List<BookLend> findAll() {
|
||||
return bookLendRepository.findAll();
|
||||
return bookLendRepository.findBybookStatus(1);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -12,6 +12,12 @@
|
||||
図書貸出処理
|
||||
</h1>
|
||||
|
||||
<div class="float-end">
|
||||
<a th:href="@{/topmenu}">
|
||||
トップメニューへ
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
以下の図書を貸出します。貸出先の社員IDと返却予定日を入力してください。
|
||||
</p>
|
||||
@@ -20,8 +26,7 @@
|
||||
図書情報
|
||||
</h2>
|
||||
|
||||
<form th:action="@{/bookLend/confirm}" method="POST"
|
||||
id="lendForm">
|
||||
<form th:action="@{/bookLend/confirm}" method="POST" id="lendForm">
|
||||
|
||||
<div class="card-body">
|
||||
<table class="info-table">
|
||||
@@ -36,7 +41,7 @@
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<!-- <td th:hidden="*{book.bookId}"></td>-->
|
||||
<!-- <td th:hidden="*{book.bookId}"></td>-->
|
||||
<td th:text="*{book.bookManageId}"></td>
|
||||
<td th:text="*{book.title}"></td>
|
||||
<td th:text="*{book.author}"></td>
|
||||
@@ -112,7 +117,7 @@
|
||||
<p>
|
||||
貸出処理を行うと、対象の図書のステータスが「貸出中」に変更されます。
|
||||
</p>
|
||||
|
||||
|
||||
<input type="hidden" name="bookManageId" th:value="${book.bookManageId}">
|
||||
<input type="hidden" name="bookId" th:value="${book.bookId}">
|
||||
|
||||
|
||||
@@ -10,53 +10,57 @@
|
||||
<body>
|
||||
<h1>貸出中図書一覧</h1>
|
||||
|
||||
|
||||
<table>
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th>社員ID</th>
|
||||
<th>社員名</th>
|
||||
<th>管理ID</th>
|
||||
<th>タイトル</th>
|
||||
<th>返却予定日</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<div class="float-end">
|
||||
<a th:href="@{/topmenu}">トップメニューへ</a>
|
||||
</div>
|
||||
|
||||
|
||||
<tbody>
|
||||
<tr th:each="booklist : ${list}">
|
||||
<table>
|
||||
|
||||
<td th:text="*{booklist.employeeBooklend.employeeId}"></td>
|
||||
<td th:text="*{booklist.employeeBooklend.employeeName}"></td>
|
||||
<td th:text="*{booklist.book.bookManageId}"></td>
|
||||
<td th:text="*{booklist.book.title}"></td>
|
||||
<td th:text="*{booklist.bookReturnDate}"></td>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>社員ID</th>
|
||||
<th>社員名</th>
|
||||
<th>管理ID</th>
|
||||
<th>タイトル</th>
|
||||
<th>返却予定日</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
|
||||
<td>
|
||||
<form th:action="@{/return-book}" method="get">
|
||||
<button type="submit" name="lendId" th:value="${booklist.lendId}"
|
||||
onclick="return MoveCheck();">返却
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
<tbody>
|
||||
<tr th:each="booklist : ${list}">
|
||||
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
<td th:text="*{booklist.employeeBooklend.employeeId}"></td>
|
||||
<td th:text="*{booklist.employeeBooklend.employeeName}"></td>
|
||||
<td th:text="*{booklist.book.bookManageId}"></td>
|
||||
<td th:text="*{booklist.book.title}"></td>
|
||||
<td th:text="*{booklist.bookReturnDate}"></td>
|
||||
|
||||
|
||||
<script>
|
||||
<td>
|
||||
<form th:action="@{/return-book}" method="get">
|
||||
<button type="submit" name="lendId" th:value="${booklist.lendId}"
|
||||
onclick="return MoveCheck();">返却
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
|
||||
function MoveCheck() {
|
||||
return window.confirm("返却処理を実行します。よろしいですか?");
|
||||
}
|
||||
</tr>
|
||||
|
||||
</script>
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
function MoveCheck() {
|
||||
return window.confirm("返却処理を実行します。よろしいですか?");
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user