Compare commits
5 Commits
s-ikeda
...
b2dc911b67
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b2dc911b67 | ||
|
|
89a7d71259 | ||
|
|
03c675dd33 | ||
| 5ab1abde4d | |||
| 5f206740cc |
@@ -0,0 +1,11 @@
|
|||||||
|
package com.example.demo.controller;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 書籍貸出承認確認用のコントローラ
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
public class ApprovalConfirmController {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,7 +1,5 @@
|
|||||||
package com.example.demo.controller;
|
package com.example.demo.controller;
|
||||||
|
|
||||||
import static com.example.rhizome.app.presentation.controller.pageproperty.TransitionTargetPageNameKeyword.*;
|
|
||||||
|
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
@@ -14,15 +12,10 @@ import org.springframework.web.bind.annotation.ModelAttribute;
|
|||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
|
||||||
import com.example.rhizome.app.domain.model.LoginInfo;
|
import com.example.demo.form.LoginInfo;
|
||||||
import com.example.rhizome.app.domain.model.LoginUser;
|
import com.example.demo.form.LoginInfo.LoginInfoForm;
|
||||||
import com.example.rhizome.app.presentation.controller.pageproperty.PageReturnAttributeKeyword;
|
import com.example.demo.form.LoginUserForm;
|
||||||
import com.example.rhizome.app.presentation.controller.pageproperty.SessionKeyword;
|
import com.example.demo.form.MessageForm;
|
||||||
import com.example.rhizome.app.presentation.controller.pageproperty.TransitionTargetPageNameKeyword;
|
|
||||||
import com.example.rhizome.app.presentation.form.LoginInfoForm;
|
|
||||||
import com.example.rhizome.app.presentation.form.LoginUserForm;
|
|
||||||
import com.example.rhizome.app.presentation.form.MessageForm;
|
|
||||||
import com.example.rhizome.app.presentation.form.UpdatePersonalUserForm;
|
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
public class LoginController {
|
public class LoginController {
|
||||||
@@ -67,7 +60,8 @@ public class LoginController {
|
|||||||
if (!LoginUserForm.checkParameter(loginInfoForm)) {
|
if (!LoginUserForm.checkParameter(loginInfoForm)) {
|
||||||
|
|
||||||
// mail,passwordが仕様を満たしていない場合
|
// mail,passwordが仕様を満たしていない場合
|
||||||
model.addAttribute(PageReturnAttributeKeyword.MESSAGE_ERROR, new MessageForm(MAIL_ADDRESS_PASSWORD_ERROR));
|
model.addAttribute(PageReturnAttributeKeyword.MESSAGE_ERROR,
|
||||||
|
new MessageForm(MAIL_ADDRESS_PASSWORD_ERROR));
|
||||||
|
|
||||||
// エラーだった場合に login.html に処理を戻す。mailAddress, password を login.htmlに表示するために
|
// エラーだった場合に login.html に処理を戻す。mailAddress, password を login.htmlに表示するために
|
||||||
// ここで addAttribute する
|
// ここで addAttribute する
|
||||||
@@ -99,7 +93,8 @@ public class LoginController {
|
|||||||
if (!loginUser.isAdminUser()) {
|
if (!loginUser.isAdminUser()) {
|
||||||
// 管理者ではない場合直で自分の情報を更新するページに遷移する
|
// 管理者ではない場合直で自分の情報を更新するページに遷移する
|
||||||
// 編集対象のログイン者の情報を画面に渡す値にセット
|
// 編集対象のログイン者の情報を画面に渡す値にセット
|
||||||
model.addAttribute(PageReturnAttributeKeyword.UPDATE_PERSONAL_EMPLOYEE_USER_FORM, UpdatePersonalUserForm.convertFrom(loginUser));
|
model.addAttribute(PageReturnAttributeKeyword.UPDATE_PERSONAL_EMPLOYEE_USER_FORM,
|
||||||
|
UpdatePersonalUserForm.convertFrom(loginUser));
|
||||||
// 個人の情報更新ページに遷移
|
// 個人の情報更新ページに遷移
|
||||||
return TransitionTargetPageNameKeyword.UPDATE_PERSONAL_EMPLOYEE_INPUT_HTML;
|
return TransitionTargetPageNameKeyword.UPDATE_PERSONAL_EMPLOYEE_INPUT_HTML;
|
||||||
}
|
}
|
||||||
@@ -115,6 +110,8 @@ public class LoginController {
|
|||||||
// エラー画面に遷移
|
// エラー画面に遷移
|
||||||
return TransitionTargetPageNameKeyword.ERROR_HTML;
|
return TransitionTargetPageNameKeyword.ERROR_HTML;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ログイン者情報のインスタンスを作成
|
* ログイン者情報のインスタンスを作成
|
||||||
*
|
*
|
||||||
@@ -134,7 +131,6 @@ public class LoginController {
|
|||||||
// セッションにない場合は画面からの input 値 を取得
|
// セッションにない場合は画面からの input 値 を取得
|
||||||
return new LoginInfo(
|
return new LoginInfo(
|
||||||
loginInfoForm.getMailAddress(),
|
loginInfoForm.getMailAddress(),
|
||||||
loginInfoForm.getPassword()
|
loginInfoForm.getPassword());
|
||||||
);
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
package com.example.demo.controller;
|
|
||||||
|
|
||||||
public class a {
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
package com.example.demo.entity;
|
|
||||||
|
|
||||||
public class a {
|
|
||||||
|
|
||||||
}
|
|
||||||
24
team1/src/main/java/com/example/demo/form/LoginInfo.java
Normal file
24
team1/src/main/java/com/example/demo/form/LoginInfo.java
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
package com.example.demo.form;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
public class LoginInfo {
|
||||||
|
//ログインをする人
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class LoginInfoForm {
|
||||||
|
/**
|
||||||
|
* メールアドレス
|
||||||
|
*/
|
||||||
|
private String mailAddress;
|
||||||
|
/**
|
||||||
|
* パスワード
|
||||||
|
*/
|
||||||
|
private String password;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
package com.example.demo.form;
|
package com.example.demo.form;
|
||||||
|
|
||||||
|
import com.example.demo.form.LoginInfo.LoginInfoForm;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|||||||
14
team1/src/main/java/com/example/demo/form/MessageForm.java
Normal file
14
team1/src/main/java/com/example/demo/form/MessageForm.java
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
package com.example.demo.form;
|
||||||
|
|
||||||
|
//画面にエラー表示する
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class MessageForm {
|
||||||
|
private String message;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
package com.example.demo.service;
|
||||||
|
|
||||||
|
public interface ApprovalBorrowBooks {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package com.example.demo.service.Impl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import com.example.demo.service.ApprovalBorrowBooks;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
@Transactional
|
||||||
|
public class ApprovalBorrowBooksImpl implements ApprovalBorrowBooks{
|
||||||
|
|
||||||
|
}
|
||||||
141
team1/src/main/resources/templates/approvalConfirm.html
Normal file
141
team1/src/main/resources/templates/approvalConfirm.html
Normal file
@@ -0,0 +1,141 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html xmlns:th="http://www.thymeleaf.org">
|
||||||
|
<head>
|
||||||
|
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
||||||
|
<!-- 外部のスクリプトファイルを読み込む -->
|
||||||
|
<script th:src="@{/js/common.js}"></script>
|
||||||
|
<!-- CSSの読み込み -->
|
||||||
|
<link rel="stylesheet" th:href="@{/css/all.css}">
|
||||||
|
<link rel=stylesheet th:href="@{/css/style.css}" type="text/css">
|
||||||
|
<title>書籍貸出承認確認</title>
|
||||||
|
</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>
|
||||||
|
<!-- 変数名は変更したが、中身は変更していない -->
|
||||||
|
<!-- ボタンや遷移も手を付けていない -->
|
||||||
|
<form action="insertEmployee"
|
||||||
|
id="insertForm"
|
||||||
|
method="post"
|
||||||
|
th:object="${insertEmployeeForm}">
|
||||||
|
|
||||||
|
<div class="msgBox error" th:if="${messageError != null}">
|
||||||
|
<span class="error" th:each="message : ${messageError.message}" th:text="${message}"></span>
|
||||||
|
</div>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th class="header">申請ID</th>
|
||||||
|
<td>
|
||||||
|
<label>
|
||||||
|
<input class="readOnly"
|
||||||
|
name="idRquest"
|
||||||
|
readonly="readonly"
|
||||||
|
type="text"
|
||||||
|
value="自動で設定されます"/>
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th class="header">申請者名</th>
|
||||||
|
<td>
|
||||||
|
<label>
|
||||||
|
<input class="readOnly"
|
||||||
|
name="nmEmployee"
|
||||||
|
readonly="readonly"
|
||||||
|
th:value="*{nmEmployee}"
|
||||||
|
type="text"/>
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th class="header">申請日</th>
|
||||||
|
<td>
|
||||||
|
<label>
|
||||||
|
<input class="readOnly"
|
||||||
|
name="dataRequest"
|
||||||
|
readonly="readonly"
|
||||||
|
th:value="*{dataRequest}"
|
||||||
|
type="text"/>
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th class="header">ISBN</th>
|
||||||
|
<td>
|
||||||
|
<label>
|
||||||
|
<input class="readOnly"
|
||||||
|
name="isBn"
|
||||||
|
readonly="readonly"
|
||||||
|
th:value="*{isBn}"
|
||||||
|
type="text"/>
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th class="header">書籍名</th>
|
||||||
|
<td>
|
||||||
|
<label>
|
||||||
|
<input class="readOnly"
|
||||||
|
name="nmBook"
|
||||||
|
readonly="readonly"
|
||||||
|
th:value="*{nmBook}"
|
||||||
|
type="text"/>
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th class="header">出版社</th>
|
||||||
|
<td>
|
||||||
|
<label>
|
||||||
|
<input class="readOnly"
|
||||||
|
name="publisher"
|
||||||
|
readonly="readonly"
|
||||||
|
th:value="*{publisher}"
|
||||||
|
type="text"/>
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th class="header">特記事項</th>
|
||||||
|
<td>
|
||||||
|
<label>
|
||||||
|
<input class="readOnly"
|
||||||
|
name="note"
|
||||||
|
readonly="readonly"
|
||||||
|
th:value="*{note}"
|
||||||
|
type="text"/>
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th class="header">貸出日</th>
|
||||||
|
<td>
|
||||||
|
<label>
|
||||||
|
<input class="readOnly"
|
||||||
|
name="dateBorrow"
|
||||||
|
readonly="readonly"
|
||||||
|
th:value="*{dateBorrow}"
|
||||||
|
type="text"/>
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th class="header">返却予定日</th>
|
||||||
|
<td>
|
||||||
|
<label>
|
||||||
|
<input class="readOnly"
|
||||||
|
name="dateScheduledReturn"
|
||||||
|
readonly="readonly"
|
||||||
|
th:value="*{date_scheduled_return}"
|
||||||
|
type="text"/>
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<!-- パスワード記入欄 -->>
|
<!-- パスワード記入欄 -->
|
||||||
<th style="text-align: right;">パスワード</th>
|
<th style="text-align: right;">パスワード</th>
|
||||||
<td>
|
<td>
|
||||||
<input placeholder="パスワード"
|
<input placeholder="パスワード"
|
||||||
|
|||||||
Reference in New Issue
Block a user