Compare commits
26 Commits
6f56164c13
...
m-ozawa
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9c591c9ff2 | ||
| 61e89fc36f | |||
| 10182adc6d | |||
|
|
e73b98e76d | ||
|
|
b36bce38e1 | ||
| da41c781df | |||
| 103acf1106 | |||
|
|
7d5d038a9e | ||
|
|
7362f58c4f | ||
|
|
9ef18e73ed | ||
|
|
45eff1634e | ||
|
|
136b18bfc7 | ||
|
|
9bba174df3 | ||
|
|
0bf7852ef9 | ||
|
|
cbb6495741 | ||
|
|
c612e9dac3 | ||
|
|
0d582fee5c | ||
|
|
4a01b85ae9 | ||
|
|
013bb72439 | ||
|
|
f647eb6ef2 | ||
|
|
48477829fd | ||
|
|
44ed4b3120 | ||
| dc5f6494cf | |||
| 67f88c89a1 | |||
| e238c6b223 | |||
| 63b7aba82a |
@@ -30,67 +30,54 @@
|
|||||||
<properties>
|
<properties>
|
||||||
<java.version>21</java.version>
|
<java.version>21</java.version>
|
||||||
</properties>
|
</properties>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-data-jpa</artifactId>
|
<artifactId>spring-boot-starter-data-jpa</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-thymeleaf</artifactId>
|
<artifactId>spring-boot-starter-thymeleaf</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-validation</artifactId>
|
<artifactId>spring-boot-starter-validation</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<!-- webmvcから通常のwebスターターに変更 -->
|
||||||
<groupId>org.springframework.boot</groupId>
|
<dependency>
|
||||||
<artifactId>spring-boot-starter-webmvc</artifactId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
</dependency>
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
<dependency>
|
||||||
<artifactId>spring-boot-devtools</artifactId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<scope>runtime</scope>
|
<artifactId>spring-boot-devtools</artifactId> <!-- ここを修正 -->
|
||||||
<optional>true</optional>
|
<scope>runtime</scope>
|
||||||
</dependency>
|
<optional>true</optional>
|
||||||
<dependency>
|
</dependency>
|
||||||
<groupId>com.mysql</groupId>
|
|
||||||
<artifactId>mysql-connector-j</artifactId>
|
|
||||||
<scope>runtime</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.projectlombok</groupId>
|
|
||||||
<artifactId>lombok</artifactId>
|
|
||||||
<optional>true</optional>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-tomcat</artifactId>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-data-jpa-test</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-thymeleaf-test</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-validation-test</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-webmvc-test</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.mysql</groupId>
|
||||||
|
<artifactId>mysql-connector-j</artifactId>
|
||||||
|
<scope>runtime</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
<optional>true</optional>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-tomcat</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-test</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
@@ -135,5 +122,6 @@
|
|||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.example.demo.controller;
|
package com.example.demo.controller;
|
||||||
|
|
||||||
|
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
@@ -15,21 +15,21 @@ import org.springframework.web.bind.annotation.RequestParam;
|
|||||||
import com.example.demo.common.Const;
|
import com.example.demo.common.Const;
|
||||||
import com.example.demo.common.LoginUser;
|
import com.example.demo.common.LoginUser;
|
||||||
import com.example.demo.service.AuthService;
|
import com.example.demo.service.AuthService;
|
||||||
|
|
||||||
/** AUTH-01:ログイン/ログアウト(login.html) */
|
/** AUTH-01:ログイン/ログアウト(login.html) */
|
||||||
@Controller
|
@Controller
|
||||||
public class LoginController {
|
public class LoginController {
|
||||||
private final AuthService authService;
|
private final AuthService authService;
|
||||||
|
|
||||||
public LoginController(AuthService authService) {
|
public LoginController(AuthService authService) {
|
||||||
this.authService = authService;
|
this.authService = authService;
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/")
|
@GetMapping("/")
|
||||||
public String root() {
|
public String root() {
|
||||||
return "redirect:/menu";
|
return "redirect:/menu";
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/login")
|
@GetMapping("/login")
|
||||||
public String loginForm(HttpSession session) {
|
public String loginForm(HttpSession session) {
|
||||||
if (session.getAttribute(Const.SESSION_LOGIN_USER) != null) {
|
if (session.getAttribute(Const.SESSION_LOGIN_USER) != null) {
|
||||||
@@ -37,14 +37,14 @@ public class LoginController {
|
|||||||
}
|
}
|
||||||
return "login";
|
return "login";
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/login")
|
@PostMapping("/login")
|
||||||
public String login(@RequestParam(defaultValue = "") String mailAddress,
|
public String login(@RequestParam(defaultValue = "") String mailAddress,
|
||||||
@RequestParam(defaultValue = "") String password,
|
@RequestParam(defaultValue = "") String password,
|
||||||
HttpServletRequest request, Model model) {
|
HttpServletRequest request, Model model) {
|
||||||
String mail = mailAddress.trim();
|
String mail = mailAddress.trim();
|
||||||
model.addAttribute("mailAddress", mail); // 入力値を保持(パスワードは保持しない)
|
model.addAttribute("mailAddress", mail); // 入力値を保持(パスワードは保持しない)
|
||||||
|
|
||||||
if (mail.isEmpty() || password.isEmpty()) {
|
if (mail.isEmpty() || password.isEmpty()) {
|
||||||
model.addAttribute("errorMessage", "メールアドレスとパスワードを入力してください。");
|
model.addAttribute("errorMessage", "メールアドレスとパスワードを入力してください。");
|
||||||
return "login";
|
return "login";
|
||||||
@@ -63,11 +63,10 @@ public class LoginController {
|
|||||||
request.getSession(true).setAttribute(Const.SESSION_LOGIN_USER, user.get());
|
request.getSession(true).setAttribute(Const.SESSION_LOGIN_USER, user.get());
|
||||||
return "redirect:/menu";
|
return "redirect:/menu";
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/logout")
|
@PostMapping("/logout")
|
||||||
public String logout(HttpSession session) {
|
public String logout(HttpSession session) {
|
||||||
session.invalidate();
|
session.invalidate();
|
||||||
return "redirect:/login";
|
return "redirect:/login";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2,7 +2,7 @@ package com.example.demo.controller;
|
|||||||
|
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
|
||||||
/** メニュー画面(menu.html)。表示内容は管理者フラグで切り替える。 */
|
/** メニュー画面(menu.html)。表示内容は管理者フラグで切り替える。 */
|
||||||
@Controller
|
@Controller
|
||||||
public class MenuController {
|
public class MenuController {
|
||||||
@@ -10,4 +10,4 @@ public class MenuController {
|
|||||||
public String menu() {
|
public String menu() {
|
||||||
return "menu";
|
return "menu";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,33 +1,82 @@
|
|||||||
package com.example.demo.form;
|
package com.example.demo.form;
|
||||||
|
|
||||||
/** 社員登録・編集フォーム */
|
/** 社員登録・編集フォーム */
|
||||||
public class EmployeeForm {
|
public class EmployeeForm {
|
||||||
private Integer idEmployee;
|
private Integer idEmployee;
|
||||||
private String nmEmployee = "";
|
private String nmEmployee = "";
|
||||||
private String knEmployee = "";
|
private String knEmployee = "";
|
||||||
private String mailAddress = "";
|
private String mailAddress = "";
|
||||||
private String password = "";
|
private String password = "";
|
||||||
private String flgAdmin = "0";
|
private String flgAdmin = "0";
|
||||||
private String flgRetirement = "0";
|
private String flgRetirement = "0";
|
||||||
|
|
||||||
public void trim() {
|
public void trim() {
|
||||||
nmEmployee = t(nmEmployee); knEmployee = t(knEmployee); mailAddress = t(mailAddress);
|
nmEmployee = t(nmEmployee);
|
||||||
flgAdmin = t(flgAdmin); flgRetirement = t(flgRetirement);
|
knEmployee = t(knEmployee);
|
||||||
if (password == null) password = "";
|
mailAddress = t(mailAddress);
|
||||||
}
|
flgAdmin = t(flgAdmin);
|
||||||
private static String t(String s) { return s == null ? "" : s.trim(); }
|
flgRetirement = t(flgRetirement);
|
||||||
|
if (password == null)
|
||||||
|
password = "";
|
||||||
|
}
|
||||||
|
|
||||||
public Integer getIdEmployee() { return idEmployee; }
|
private static String t(String s) {
|
||||||
public void setIdEmployee(Integer v) { this.idEmployee = v; }
|
return s == null ? "" : s.trim();
|
||||||
public String getNmEmployee() { return nmEmployee; }
|
}
|
||||||
public void setNmEmployee(String v) { this.nmEmployee = v; }
|
|
||||||
public String getKnEmployee() { return knEmployee; }
|
public Integer getIdEmployee() {
|
||||||
public void setKnEmployee(String v) { this.knEmployee = v; }
|
return idEmployee;
|
||||||
public String getMailAddress() { return mailAddress; }
|
}
|
||||||
public void setMailAddress(String v) { this.mailAddress = v; }
|
|
||||||
public String getPassword() { return password; }
|
public void setIdEmployee(Integer v) {
|
||||||
public void setPassword(String v) { this.password = v; }
|
this.idEmployee = v;
|
||||||
public String getFlgAdmin() { return flgAdmin; }
|
}
|
||||||
public void setFlgAdmin(String v) { this.flgAdmin = v; }
|
|
||||||
public String getFlgRetirement() { return flgRetirement; }
|
public String getNmEmployee() {
|
||||||
public void setFlgRetirement(String v) { this.flgRetirement = v; }
|
return nmEmployee;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNmEmployee(String v) {
|
||||||
|
this.nmEmployee = v;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getKnEmployee() {
|
||||||
|
return knEmployee;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setKnEmployee(String v) {
|
||||||
|
this.knEmployee = v;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMailAddress() {
|
||||||
|
return mailAddress;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMailAddress(String v) {
|
||||||
|
this.mailAddress = v;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPassword() {
|
||||||
|
return password;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPassword(String v) {
|
||||||
|
this.password = v;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFlgAdmin() {
|
||||||
|
return flgAdmin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFlgAdmin(String v) {
|
||||||
|
this.flgAdmin = v;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFlgRetirement() {
|
||||||
|
return flgRetirement;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFlgRetirement(String v) {
|
||||||
|
this.flgRetirement = v;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,4 +10,4 @@ spring.jpa.open-in-view=false
|
|||||||
spring.jpa.properties.hibernate.jdbc.time_zone=Asia/Tokyo
|
spring.jpa.properties.hibernate.jdbc.time_zone=Asia/Tokyo
|
||||||
|
|
||||||
spring.thymeleaf.cache=false
|
spring.thymeleaf.cache=false
|
||||||
server.servlet.session.timeout=30m
|
server.servlet.session.timeout=30m
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div th:replace="~{fragments/header :: header}"></div>
|
<div th:replace="~{fragments/header :: header}"></div>
|
||||||
|
<main class="complete-container">
|
||||||
<h1>完了</h1>
|
<h1>完了</h1>
|
||||||
<div class="info" th:text="${message} ?:'書籍貸出申請を承認しました。'"></div>
|
<div class="info" th:text="${message} ?:'書籍貸出申請を承認しました。'"></div>
|
||||||
|
|
||||||
@@ -16,7 +17,7 @@
|
|||||||
<a class="btn" th:href="@{/admin/applications}">承認待ち一覧に戻る</a>
|
<a class="btn" th:href="@{/admin/applications}">承認待ち一覧に戻る</a>
|
||||||
<a class="btn sub" th:href="@{/menu}">メニューに戻る</a>
|
<a class="btn sub" th:href="@{/menu}">メニューに戻る</a>
|
||||||
</p>
|
</p>
|
||||||
|
</main>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
@@ -9,74 +9,77 @@
|
|||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div th:replace="~{fragments/header :: header}"></div>
|
<div th:replace="~{fragments/header :: header}"></div>
|
||||||
<h1>
|
<main>
|
||||||
書籍貸出承認確認
|
<h1>書籍貸出承認確認</h1>
|
||||||
|
<div class="card">
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th>申請ID</th>
|
||||||
|
<td th:text="${r.idRequest}"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>申請者名</th>
|
||||||
|
<td th:text="${r.nmApplicant}"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>申請日</th>
|
||||||
|
<td th:text="${r.dateRequest}"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>ISBN</th>
|
||||||
|
<td th:text="${r.isbn}"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>書籍名</th>
|
||||||
|
<td th:text="${r.nmBook}" style="width: 700px;"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>出版社</th>
|
||||||
|
<td th:text="${r.publisher}"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>特記事項</th>
|
||||||
|
<td th:text="${r.note}"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>貸出日</th>
|
||||||
|
<td th:text="${r.dateBorrow}"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>返却予定日</th>
|
||||||
|
<td th:text="${r.dateScheduledReturn}"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
</h1>
|
<div class="buttonSection" style="margin-top: 20px;">
|
||||||
|
|
||||||
|
<form th:action="@{/admin/applications/{id}/approve(id=${r.idRequest})}" method="post"
|
||||||
|
style="display: inline;">
|
||||||
|
<button type="submit">承認</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
|
||||||
<table>
|
<form th:action="@{/admin/applications/{id}/reject(id=${r.idRequest})}" method="post"
|
||||||
<tr>
|
style="display: inline; margin-left: 10px;">
|
||||||
<th class="header">申請ID</th>
|
<button type="submit" class="sub">却下</button>
|
||||||
<td><input type="text" readonly="readonly" th:value="${r.idRequest}" /></td>
|
</form>
|
||||||
</tr>
|
<a th:href="@{/admin/applications}" style="text-decoration: none; margin-left: 10px;">
|
||||||
<tr>
|
<button type="button" class="sub">承認待ち一覧に戻る</button>
|
||||||
<th class="header">申請者名</th>
|
</a>
|
||||||
<td><input type="text" readonly="readonly" th:value="${r.nmApplicant}" /></td>
|
</div>
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th class="header">申請日</th>
|
|
||||||
<td><input type="text" readonly="readonly" th:value="${r.dateRequest}" /></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th class="header">ISBN</th>
|
|
||||||
<td><input type="text" readonly="readonly" th:value="${r.isbn}" /></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th class="header">書籍名</th>
|
|
||||||
<td><input type="text" readonly="readonly" th:value="${r.nmBook}" style="width: 300px;" /></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th class="header">出版社</th>
|
|
||||||
<td><input type="text" readonly="readonly" th:value="${r.publisher}" /></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th class="header">特記事項</th>
|
|
||||||
<td><input type="text" readonly="readonly" th:value="${r.note}" /></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th class="header">貸出日</th>
|
|
||||||
<td><input type="text" readonly="readonly" th:value="${r.dateBorrow}" /></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th class="header">返却予定日</th>
|
|
||||||
<td><input type="text" readonly="readonly" th:value="${r.dateScheduledReturn}" /></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<div class="buttonSection" style="margin-top: 20px;">
|
|
||||||
|
|
||||||
<form th:action="@{/admin/applications/{id}/approve(id=${r.idRequest})}" method="post" style="display: inline;">
|
|
||||||
<button type="submit">承認</button>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
|
|
||||||
<form th:action="@{/admin/applications/{id}/reject(id=${r.idRequest})}" method="post"
|
|
||||||
style="display: inline; margin-left: 10px;">
|
|
||||||
<button type="submit">却下</button>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<br>
|
|
||||||
<a th:href="@{/admin/applications}">承認待ち一覧へ戻る</a>
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function logoutSubmit() {
|
function logoutSubmit() {
|
||||||
if (confirm("ログアウトしますか?")) {
|
if (confirm("ログアウトしますか?")) {
|
||||||
window.location.href = "/logout";
|
window.location.href = "/logout";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
@@ -1,23 +1,25 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html xmlns:th="http://www.thymeleaf.org">
|
<html xmlns:th="http://www.thymeleaf.org">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>書籍貸出申請</title>
|
<title>書籍貸出申請</title>
|
||||||
<link rel="stylesheet" th:href="@{/css/style.css}">
|
<link rel="stylesheet" th:href="@{/css/style.css}">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div th:replace="~{fragments/header :: header}"></div>
|
<div th:replace="~{fragments/header :: header}"></div>
|
||||||
<h1>却下</h1>
|
<main class="complete-container">
|
||||||
<div class="info" th:text="${message} ?: '書籍貸出申請を却下しました。'"></div>
|
<h1>却下</h1>
|
||||||
|
<div class="info" th:text="${message} ?: '書籍貸出申請を却下しました。'"></div>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<a class="btn" th:href="@{/admin/applications}">承認待ち一覧に戻る</a>
|
<a class="btn" th:href="@{/admin/applications}">承認待ち一覧に戻る</a>
|
||||||
<a class="btn sub" th:href="@{/menu}">メニューに戻る</a>
|
<a class="btn sub" th:href="@{/menu}">メニューに戻る</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
</main>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
<div class="info" th:text="${message} ?: '処理が完了しました。'"></div>
|
<div class="info" th:text="${message} ?: '処理が完了しました。'"></div>
|
||||||
<p>
|
<p>
|
||||||
<a class="btn" th:href="@{${backUrl}}" th:text="${backLabel}">戻る</a>
|
<a class="btn" th:href="@{${backUrl}}" th:text="${backLabel}">戻る</a>
|
||||||
<a class="btn sub" th:href="@{/menu}">メニューに戻る</a>
|
<!-- <a class="btn sub" th:href="@{/menu}">メニューに戻る</a>-->
|
||||||
</p>
|
</p>
|
||||||
</main>
|
</main>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -0,0 +1,101 @@
|
|||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html xmlns:th="http://www.thymeleaf.org">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>社員登録確認</title>
|
||||||
|
<link rel="stylesheet" th:href="@{/css/style.css}">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<!-- 共通ヘッダー -->
|
||||||
|
<div th:replace="~{fragments/header :: header}"></div>
|
||||||
|
|
||||||
|
<main>
|
||||||
|
<h2>社員登録確認</h2>
|
||||||
|
|
||||||
|
<!-- エラーメッセージ -->
|
||||||
|
<div class="error"
|
||||||
|
th:if="${errors != null and !errors.isEmpty()}">
|
||||||
|
<p th:each="error : ${errors}"
|
||||||
|
th:text="${error}">
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 登録内容確認 -->
|
||||||
|
<div class="card">
|
||||||
|
|
||||||
|
<p>以下の内容で登録します。内容を確認してください。</p>
|
||||||
|
|
||||||
|
<form th:action="@{/admin/employees/new/execute}"
|
||||||
|
th:object="${form}"
|
||||||
|
method="post">
|
||||||
|
|
||||||
|
<!-- 登録内容一覧 -->
|
||||||
|
<table>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th>社員名</th>
|
||||||
|
<td th:text="*{nmEmployee}"></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<th>社員名よみ</th>
|
||||||
|
<td th:text="*{knEmployee}"></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<th>メールアドレス</th>
|
||||||
|
<td th:text="*{mailAddress}"></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<th>パスワード</th>
|
||||||
|
<td>********</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<th>権限</th>
|
||||||
|
<td th:text="*{flgAdmin == '1' ? '管理者' : '一般'}"></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<!-- 登録処理に必要な値を引き継ぐ -->
|
||||||
|
<input type="hidden" th:field="*{nmEmployee}">
|
||||||
|
<input type="hidden" th:field="*{knEmployee}">
|
||||||
|
<input type="hidden" th:field="*{mailAddress}">
|
||||||
|
<input type="hidden" th:field="*{password}">
|
||||||
|
<input type="hidden" th:field="*{flgAdmin}">
|
||||||
|
|
||||||
|
<!-- ボタン:左に戻る、右に登録 -->
|
||||||
|
<!-- <div style="display: flex;-->
|
||||||
|
<!-- justify-content: space-between;-->
|
||||||
|
<!-- align-items: center;-->
|
||||||
|
<!-- width: 100%;-->
|
||||||
|
<!-- margin-top: 20px;">-->
|
||||||
|
|
||||||
|
<!-- 社員情報入力に戻る -->
|
||||||
|
<p>
|
||||||
|
<a class="btn sub"
|
||||||
|
th:href="@{/admin/employees/new}">
|
||||||
|
社員情報入力に戻る
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<!-- 登録 -->
|
||||||
|
<button type="submit" class="btn">
|
||||||
|
登録
|
||||||
|
</button>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
117
book-rent/src/main/resources/templates/employeeRegistInput.html
Normal file
117
book-rent/src/main/resources/templates/employeeRegistInput.html
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html xmlns:th="http://www.thymeleaf.org">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>社員登録</title>
|
||||||
|
<link rel="stylesheet" th:href="@{/css/style.css}">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<!-- 共通ヘッダー -->
|
||||||
|
<div th:replace="~{fragments/header :: header}"></div>
|
||||||
|
|
||||||
|
<main>
|
||||||
|
<h2>社員登録</h2>
|
||||||
|
|
||||||
|
<!-- 入力エラー表示 -->
|
||||||
|
<div class="error" th:if="${errors != null and !errors.isEmpty()}">
|
||||||
|
<p th:each="error : ${errors}" th:text="${error}">
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 社員登録フォーム -->
|
||||||
|
<div class="card">
|
||||||
|
|
||||||
|
<form th:action="@{/admin/employees/new/confirm}" th:object="${form}" method="post">
|
||||||
|
|
||||||
|
<!-- 社員名 -->
|
||||||
|
<div>
|
||||||
|
<label for="nmEmployee">社員名</label>
|
||||||
|
<input type="text" id="nmEmployee" th:field="*{nmEmployee}">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 社員名よみ -->
|
||||||
|
<div>
|
||||||
|
<label for="knEmployee">社員名よみ</label>
|
||||||
|
<input type="text" id="knEmployee" th:field="*{knEmployee}">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- メールアドレス -->
|
||||||
|
<div>
|
||||||
|
<label for="mailAddress">メールアドレス</label>
|
||||||
|
<input type="email" id="mailAddress" th:field="*{mailAddress}">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- パスワード -->
|
||||||
|
<div>
|
||||||
|
<label for="password">パスワード</label>
|
||||||
|
<input type="password" id="password" th:field="*{password}">
|
||||||
|
</div>
|
||||||
|
<label for="flgAdmin">管理者フラグ</label>
|
||||||
|
<select id="flgAdmin" name="flgAdmin">
|
||||||
|
<option value="0" th:selected="${form.flgAdmin == '0'}">0:一般</option>
|
||||||
|
<option value="1" th:selected="${form.flgAdmin == '1'}">1:管理者</option>
|
||||||
|
</select>
|
||||||
|
<p><a class="btn sub" th:href="@{/menu}">メニューへ戻る</a>
|
||||||
|
<button type="submit">登録確認</button>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<!-- 権限:枠線なし・横並び -->
|
||||||
|
<!-- <div style="border: none;-->
|
||||||
|
<!-- display: flex;-->
|
||||||
|
<!-- flex-direction: row;-->
|
||||||
|
<!-- align-items: center;-->
|
||||||
|
<!-- gap: 25px;-->
|
||||||
|
<!-- margin: 15px 0 25px;">-->
|
||||||
|
|
||||||
|
<!-- <label style="display: inline-flex;-->
|
||||||
|
<!-- align-items: center;-->
|
||||||
|
<!-- gap: 5px;-->
|
||||||
|
<!-- white-space: nowrap;">-->
|
||||||
|
<!-- <input type="radio"-->
|
||||||
|
<!-- th:field="*{flgAdmin}"-->
|
||||||
|
<!-- value="1">-->
|
||||||
|
<!-- 管理者-->
|
||||||
|
<!-- </label>-->
|
||||||
|
|
||||||
|
<!-- <label style="display: inline-flex;-->
|
||||||
|
<!-- align-items: center;-->
|
||||||
|
<!-- gap: 5px;-->
|
||||||
|
<!-- white-space: nowrap;">-->
|
||||||
|
<!-- <input type="radio"-->
|
||||||
|
<!-- th:field="*{flgAdmin}"-->
|
||||||
|
<!-- value="0">-->
|
||||||
|
<!-- 一般ユーザー-->
|
||||||
|
<!-- </label>-->
|
||||||
|
|
||||||
|
<!-- </div>-->
|
||||||
|
|
||||||
|
<!-- ボタン:左に戻る・右に確認 -->
|
||||||
|
<!-- <div style="display: flex;-->
|
||||||
|
<!-- justify-content: space-between;-->
|
||||||
|
<!-- align-items: center;-->
|
||||||
|
<!-- width: 100%;-->
|
||||||
|
<!-- margin-top: 20px;">-->
|
||||||
|
|
||||||
|
<!-- <a class="btn sub"-->
|
||||||
|
<!-- th:href="@{/menu}">-->
|
||||||
|
<!-- メニューに戻る-->
|
||||||
|
<!-- </a>-->
|
||||||
|
|
||||||
|
<!-- <button type="submit" class="btn">-->
|
||||||
|
<!-- 確認-->
|
||||||
|
<!-- </button>-->
|
||||||
|
|
||||||
|
<!-- </div>-->
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html xmlns:th="http://www.thymeleaf.org">
|
<html xmlns:th="http://www.thymeleaf.org">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>ログイン</title>
|
<title>ログイン</title>
|
||||||
<link rel="stylesheet" th:href="@{/css/style.css}">
|
<link rel="stylesheet" th:href="@{/css/style.css}">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<main>
|
<main>
|
||||||
<h1>書籍貸出管理システム</h1>
|
<h1>書籍貸出管理システム</h1>
|
||||||
@@ -24,43 +24,43 @@
|
|||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
<!--<!DOCTYPE html>-->
|
<!--<!DOCTYPE html>-->
|
||||||
<!--<html xmlns:th="http://www.thymeleaf.org">-->
|
<!--<html xmlns:th="http://www.thymeleaf.org">-->
|
||||||
|
|
||||||
<!--<head>-->
|
<!--<head>-->
|
||||||
<!-- <meta charset="UTF-8">-->
|
<!-- <meta charset="UTF-8">-->
|
||||||
<!-- <meta name="viewport" content="width=device-width, initial-scale=1.0">-->
|
<!-- <meta name="viewport" content="width=device-width, initial-scale=1.0">-->
|
||||||
|
|
||||||
<!-- 外部スクリプトの読み込み -->
|
<!-- 外部スクリプトの読み込み -->
|
||||||
<!-- <script th:src="@{/js/common.js}"></script>-->
|
<!-- <script th:src="@{/js/common.js}"></script>-->
|
||||||
|
|
||||||
<!-- CSSの読み込み -->
|
<!-- CSSの読み込み -->
|
||||||
<!-- <link rel="stylesheet" th:href="@{/css/all.css}" type="text/css">-->
|
<!-- <link rel="stylesheet" th:href="@{/css/all.css}" type="text/css">-->
|
||||||
<!-- <link rel="stylesheet" th:href="@{/css/style.css}" type="text/css">-->
|
<!-- <link rel="stylesheet" th:href="@{/css/style.css}" type="text/css">-->
|
||||||
|
|
||||||
<!-- <title>ログイン</title>-->
|
<!-- <title>ログイン</title>-->
|
||||||
<!--</head>-->
|
<!--</head>-->
|
||||||
|
|
||||||
<!--<body>-->
|
<!--<body>-->
|
||||||
|
|
||||||
<!-- <div class="loginContainer">-->
|
<!-- <div class="loginContainer">-->
|
||||||
|
|
||||||
<!-- <h1>ログイン</h1>-->
|
<!-- <h1>ログイン</h1>-->
|
||||||
|
|
||||||
<!-- <form th:action="@{/doLogin}"-->
|
<!-- <form th:action="@{/doLogin}"-->
|
||||||
<!-- method="post"-->
|
<!-- method="post"-->
|
||||||
<!-- th:object="${loginInfoForm}">-->
|
<!-- th:object="${loginInfoForm}">-->
|
||||||
|
|
||||||
<!-- エラーメッセージ -->
|
<!-- エラーメッセージ -->
|
||||||
<!-- <div class="msgBox error"-->
|
<!-- <div class="msgBox error"-->
|
||||||
<!-- th:if="${messageError != null}">-->
|
<!-- th:if="${messageError != null}">-->
|
||||||
<!-- <span class="error"-->
|
<!-- <span class="error"-->
|
||||||
<!-- th:text="${messageError.message}"></span>-->
|
<!-- th:text="${messageError.message}"></span>-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
|
|
||||||
<!-- <table>-->
|
<!-- <table>-->
|
||||||
<!-- メールアドレス -->
|
<!-- メールアドレス -->
|
||||||
<!-- <tr>-->
|
<!-- <tr>-->
|
||||||
@@ -75,7 +75,7 @@
|
|||||||
<!-- />-->
|
<!-- />-->
|
||||||
<!-- </td>-->
|
<!-- </td>-->
|
||||||
<!-- </tr>-->
|
<!-- </tr>-->
|
||||||
|
|
||||||
<!-- パスワード -->
|
<!-- パスワード -->
|
||||||
<!-- <tr>-->
|
<!-- <tr>-->
|
||||||
<!-- <th class="header">パスワード</th>-->
|
<!-- <th class="header">パスワード</th>-->
|
||||||
@@ -89,7 +89,7 @@
|
|||||||
<!-- />-->
|
<!-- />-->
|
||||||
<!-- </td>-->
|
<!-- </td>-->
|
||||||
<!-- </tr>-->
|
<!-- </tr>-->
|
||||||
|
|
||||||
<!-- ボタン -->
|
<!-- ボタン -->
|
||||||
<!-- <tr>-->
|
<!-- <tr>-->
|
||||||
<!-- <td class="btnArea" colspan="2">-->
|
<!-- <td class="btnArea" colspan="2">-->
|
||||||
@@ -97,7 +97,7 @@
|
|||||||
<!-- type="submit"-->
|
<!-- type="submit"-->
|
||||||
<!-- value="ログイン"-->
|
<!-- value="ログイン"-->
|
||||||
<!-- />-->
|
<!-- />-->
|
||||||
|
|
||||||
<!-- <button-->
|
<!-- <button-->
|
||||||
<!-- type="button"-->
|
<!-- type="button"-->
|
||||||
<!-- onclick="clearInput()">-->
|
<!-- onclick="clearInput()">-->
|
||||||
@@ -106,11 +106,11 @@
|
|||||||
<!-- </td>-->
|
<!-- </td>-->
|
||||||
<!-- </tr>-->
|
<!-- </tr>-->
|
||||||
<!-- </table>-->
|
<!-- </table>-->
|
||||||
|
|
||||||
<!-- </form>-->
|
<!-- </form>-->
|
||||||
|
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
|
|
||||||
<!-- 入力内容のリセット -->
|
<!-- 入力内容のリセット -->
|
||||||
<!-- <script>-->
|
<!-- <script>-->
|
||||||
<!-- function clearInput() {-->
|
<!-- function clearInput() {-->
|
||||||
@@ -118,6 +118,6 @@
|
|||||||
<!-- document.getElementById('password').value = '';-->
|
<!-- document.getElementById('password').value = '';-->
|
||||||
<!-- }-->
|
<!-- }-->
|
||||||
<!-- </script>-->
|
<!-- </script>-->
|
||||||
|
|
||||||
<!--</body>-->
|
<!--</body>-->
|
||||||
<!--</html>-->
|
<!--</html>-->
|
||||||
@@ -23,3 +23,6 @@
|
|||||||
</main>
|
</main>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div th:replace="~{fragments/header :: header}"></div>
|
<div th:replace="~{fragments/header :: header}"></div>
|
||||||
|
<main class="complete-container">
|
||||||
<h1>返却完了</h1>
|
<h1>返却完了</h1>
|
||||||
<div class="info" th:text="${message} ?: '書籍の返却が完了しました。'"></div>
|
<div class="info" th:text="${message} ?: '書籍の返却が完了しました。'"></div>
|
||||||
|
|
||||||
@@ -16,6 +17,7 @@
|
|||||||
<a class="btn" th:href="@{/admin/lendings}">貸出中書籍一覧に戻る</a>
|
<a class="btn" th:href="@{/admin/lendings}">貸出中書籍一覧に戻る</a>
|
||||||
<a class="btn sub" th:href="@{/menu}">メニューに戻る</a>
|
<a class="btn sub" th:href="@{/menu}">メニューに戻る</a>
|
||||||
</p>
|
</p>
|
||||||
|
</main>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
Reference in New Issue
Block a user