5 Commits

Author SHA1 Message Date
h-seya
7de868d37b [EDIT]:図書一覧画面へ遷移できなくなっていた不具合を修正 2026-09-25 10:50:28 +09:00
s-tajihi
d7d6b9b3f5 [edit] 図書一覧HTMLの修正をしました 2026-09-25 10:47:24 +09:00
s-tajihi
19615ef3f4 [edit] 図書一覧表示の修正を行いました 2026-09-25 10:45:49 +09:00
s-tajihi
f059dc9f53 Merge branch 'h-seya' of https://gitea.it-college.co.jp/2026_09_5H_Spring_KIZAKI/ShareBooks_new into s-tajihi
# Conflicts:
#	src/main/resources/templates/book.html
#	src/main/resources/templates/topmenu.html
2026-09-25 10:43:35 +09:00
s-tajihi
0ce3d392a9 Merge branch 'h-seya' of https://gitea.it-college.co.jp/2026_09_5H_Spring_KIZAKI/ShareBooks_new into s-tajihi
# Conflicts:
#	src/main/resources/templates/book.html
#	src/main/resources/templates/topmenu.html
2026-09-25 10:42:35 +09:00
4 changed files with 110 additions and 29 deletions

View File

@@ -9,6 +9,7 @@ import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.OneToOne;
import jakarta.persistence.Table;
import lombok.Data;
@@ -88,4 +89,7 @@ public class Book {
@Column(name = "book_approval", nullable = false)
private Integer bookApproval;
@OneToOne(mappedBy = "book")
private BookLend bookLends;
}

View File

@@ -7,6 +7,8 @@ import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.OneToOne;
import jakarta.persistence.Table;
import lombok.Data;
@@ -22,8 +24,9 @@ public class BookLend {
private int lendId;
// 図書管理ID(BK-1など)
@Column(name = "book_manage_id", nullable = false)
private String bookManageId;
@OneToOne
@JoinColumn(name = "book_manage_id", referencedColumnName = "book_manage_id",nullable = false)
private Book book;
// 図書管理ID(BK-1など)
@Column(name = "employee_id", nullable = false)

View File

@@ -1,25 +1,100 @@
<!DOCTYPE html>
<html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>社内図書一覧</title>
</head>
<body>
<form method="post" action="bookLend">
<div class="container">
<h1>社内図書一覧</h1>
<div class="float-end">
</div>
<form method="get" action="bookLend">
<table class="table table-striped">
<thead>
<tr>
<th>図書ID</th>
<th>ISBN</th>
<th>タイトル</th>
<th>著者名</th>
<th>出版社</th>
<th>出版日</th>
<th>カテゴリー名</th>
<th>サブカテゴリー名</th>
<th>保管場所</th>
<th>本の状態</th>
<th>登録日時</th>
<th>更新日時</th>
<th>寄贈者</th>
<th>貸出状態??</th>
<th>操作??</th>
</tr>
</thead>
<tbody>
<tr th:each="book : ${book}">
<td th:text="*{book.bookManageId}"></td>
<td th:text="*{book.isbn}"></td>
<td th:text="*{book.title}"></td>
<td th:text="*{book.author}"></td>
<td th:text="*{book.publisher}"></td>
<td th:text="*{book.publicationDate}"></td>
<td th:text="*{book.bookSubcategory.bookCategory.bookCategoryName}"></td>
<td th:text="*{book.bookSubcategory.bookSubcategoryName}"></td>
<td th:text="*{book.storageLocation.locationName}"></td>
<td th:text="*{book.condition}"></td>
<td th:text="*{book.createdAt}"></td>
<td th:text="*{book.updatedAt}"></td>
<td th:text="*{book.employee != null ? book.employee.employeeId : '-'}"></td>
<td th:text="*{book.bookLends != null ? book.bookLends.bookStatus : '-'}"></td>
</tr>
</tbody>
</table>
<button type="submit" class="btn-login">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"/><polyline points="10 17 15 12 10 7"/><line x1="15" y1="12" x2="3" y2="12"/></svg>
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round">
<path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4" />
<polyline points="10 17 15 12 10 7" />
<line x1="15" y1="12" x2="3" y2="12" />
</svg>
貸出
</button>
</form>
<button type="submit" class="btn-login">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round">
<path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4" />
<polyline points="10 17 15 12 10 7" />
<line x1="15" y1="12" x2="3" y2="12" />
</svg>
貸出
</button>
</form>
<form method="post" action="update">
<button type="submit" class="btn-login">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"/><polyline points="10 17 15 12 10 7"/><line x1="15" y1="12" x2="3" y2="12"/></svg>
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round">
<path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4" />
<polyline points="10 17 15 12 10 7" />
<line x1="15" y1="12" x2="3" y2="12" />
</svg>
更新
</button>
</form>
</body>
</html>

View File

@@ -35,17 +35,16 @@
<!-- ===== 共通:社内図書一覧 ===== -->
<form method="post" name="社内図書一覧" action="book">
<a href="javascript:form1.submit()">リンク名</a>
<button type="submit" class="btn-book">
<a class="card" href="/book">
<h3>社内図書一覧</h3>
<p>
登録されている図書の<br> 一覧を表示します。
</p>
</button>
</form>
</a>
<hr> <!--区切り線-->
<!-- ===== 共通:寄贈申請 ===== -->