11 Commits

Author SHA1 Message Date
acd7534fdb Merge branch 's-choi' of https://gitea.it-college.co.jp/2026_09_5H_Spring_KIZAKI/Monegement into s-morimto
# Conflicts:
#	src/main/resources/templates/transaction_detail.html
2026-09-28 16:38:26 +09:00
ee5ec5009d Merge branch 's-choi' of https://gitea.it-college.co.jp/2026_09_5H_Spring_KIZAKI/Monegement into s-morimto 2026-09-28 15:28:53 +09:00
7604e9ee76 Merge branch 's-choi' of https://gitea.it-college.co.jp/2026_09_5H_Spring_KIZAKI/Monegement into s-morimto 2026-09-28 14:22:22 +09:00
26fa2365e8 Merge branch 's-choi' of https://gitea.it-college.co.jp/2026_09_5H_Spring_KIZAKI/Monegement into s-morimto
# Conflicts:
#	src/main/resources/templates/select_course.html
2026-09-28 09:43:26 +09:00
5adb527d7a Merge branch 's-choi' of https://gitea.it-college.co.jp/2026_09_5H_Spring_KIZAKI/Monegement into s-morimto 2026-09-25 14:23:20 +09:00
e54e0133f7 Merge branch 's-choi' of https://gitea.it-college.co.jp/2026_09_5H_Spring_KIZAKI/Monegement into s-morimto 2026-09-25 14:03:37 +09:00
c3dae348bf no message 2026-09-25 13:38:58 +09:00
ea1e18ad93 Merge branch 'k-kobayashi' of https://gitea.it-college.co.jp/2026_09_5H_Spring_KIZAKI/Monegement into s-morimto 2026-09-25 13:35:56 +09:00
bb3b8965b2 Merge branch 's-choi' of https://gitea.it-college.co.jp/2026_09_5H_Spring_KIZAKI/Monegement into s-morimto
# Conflicts:
#	src/main/resources/templates/menu.html
#	src/main/resources/templates/select_course.html
#	src/main/resources/templates/transaction_detail.html
2026-09-25 13:28:04 +09:00
3b239d07bd Merge branch 'k-kobayashi' of https://gitea.it-college.co.jp/2026_09_5H_Spring_KIZAKI/Monegement into s-morimto 2026-09-25 13:17:12 +09:00
0c54a42b97 Merge branch 'k-oshita' of https://gitea.it-college.co.jp/2026_09_5H_Spring_KIZAKI/Monegement into s-morimto
# Conflicts:
#	src/main/resources/templates/menu.html
#	src/main/resources/templates/transaction_detail.html
2026-09-25 13:14:52 +09:00
18 changed files with 82 additions and 79 deletions

View File

@@ -52,14 +52,18 @@ public class GlobalExceptionHandler {
return "error"; return "error";
} }
@ExceptionHandler(Exception.class) @ExceptionHandler(Exception.class)
public String AllException(Model model, Exception e, HttpSession session) { public String AllException(Model model, Exception e, HttpSession session) {
model.addAttribute("error", SEVERE_ERROR_MESSAGE_BAD_REQUEST);
e.printStackTrace(); e.printStackTrace();
System.out.println("session invalidated exception"); LOGGER.log(Level.SEVERE, SEVERE_ERROR_MESSAGE_ILLEGAL_TRANSITION, e);
session.invalidate();
System.out.println("session invalidated");
session.invalidate();
return "error"; return "error";
} }
} }

View File

@@ -57,7 +57,7 @@ public class GoalModel {
goalModel.getTargetAmount(), goalModel.getTargetAmount(),
goalModel.getDeadline(), goalModel.getDeadline(),
0, 0,
userEntity); userEntity, 0);
} }
public static GoalModel convertFrom(GoalForm goalForm) { public static GoalModel convertFrom(GoalForm goalForm) {

View File

@@ -25,8 +25,6 @@ public class LoginServiceImpl implements LoginService {
if (userEntity == null) { if (userEntity == null) {
return null; return null;
} else if (userEntity.getDeleteFlag() == 1) {
return null;
} }
boolean isValidPassword = false; boolean isValidPassword = false;

View File

@@ -53,13 +53,13 @@ public class UserServiceImpl implements UserService {
userEntity.setQuestionEntity(questionEntity); userEntity.setQuestionEntity(questionEntity);
userEntity.setCourseEntity(courseEntity); userEntity.setCourseEntity(courseEntity);
userEntity.setDeleteFlag(0); userEntity.setDeleteFlag(0);
goalEntity.setUserEntity(userRepository.save(userEntity)); userRepository.save(userEntity);
goalRepository.save(goalEntity);
} }
@Override @Override

View File

@@ -29,7 +29,7 @@ public class CategoryEntity {
@Column(name = "category_id") @Column(name = "category_id")
private Long categoryId; private Long categoryId;
@Column(name = "category_name", nullable = false, length = 50) @Column(name = "category_name", nullable = false)
private String categoryName; private String categoryName;
@Column(name = "transaction_type", nullable = false) @Column(name = "transaction_type", nullable = false)

View File

@@ -27,7 +27,7 @@ public class CourseEntity {
@Column(name = "course_id") @Column(name = "course_id")
private Long courseId; private Long courseId;
@Column(name = "course_name", nullable = false, length = 50) @Column(name = "course_name", nullable = false)
private String courseName; private String courseName;

View File

@@ -34,7 +34,7 @@ public class FixedCostEntity {
@JoinColumn(name = "category_id") @JoinColumn(name = "category_id")
private CategoryEntity categoryEntity; private CategoryEntity categoryEntity;
@Column(name = "fixed_cost_name", nullable = false, length = 50) @Column(name = "fixed_cost_name", nullable = false)
private String fixedCostName; private String fixedCostName;
@Column(name = "amount", nullable = false) @Column(name = "amount", nullable = false)

View File

@@ -29,10 +29,10 @@ public class GoalEntity {
private Long goalId; private Long goalId;
@Column(name = "goal_title", nullable = true) @Column(name = "goal_title", nullable = true)
private String goalTitle = "名前を設定してください"; private String goalTitle;
@Column(name = "goal_subtitle", nullable = true) @Column(name = "goal_subtitle", nullable = true)
private String goalSubtitle = "説明を書いてください"; private String goalSubtitle;
@Column(name = "target_amount", nullable = true) @Column(name = "target_amount", nullable = true)
private Integer targetAmount; private Integer targetAmount;
@@ -46,5 +46,7 @@ public class GoalEntity {
@ManyToOne(fetch = FetchType.LAZY) @ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "user_id") @JoinColumn(name = "user_id")
private UserEntity userEntity; private UserEntity userEntity;
private Integer deleteFlag;
} }

View File

@@ -1,5 +0,0 @@
package com.example.demo.app.infra.entity;
public class TestController6 {
}

View File

@@ -30,7 +30,7 @@ public class UserEntity {
@Column(name = "user_id") @Column(name = "user_id")
private Long userId; private Long userId;
@Column(name = "user_name", nullable = false, length = 100) @Column(name = "user_name", nullable = false)
private String userName; private String userName;
@Column(name = "mail_address", nullable = false) @Column(name = "mail_address", nullable = false)
@@ -39,7 +39,7 @@ public class UserEntity {
@Column(name = "password", nullable = false) @Column(name = "password", nullable = false)
private String password; private String password;
@Column(name = "secret_answer", nullable = false, length = 100) @Column(name = "secret_answer", nullable = false)
private String secretQuestionAnswer; private String secretQuestionAnswer;
@Column(name = "birth_date", nullable = false) @Column(name = "birth_date", nullable = false)

View File

@@ -11,5 +11,4 @@ public class ErrorController {
public String showError() { public String showError() {
return TransitionTargetPageNameKeyword.ERROR_HTML; return TransitionTargetPageNameKeyword.ERROR_HTML;
} }
} }

View File

@@ -57,7 +57,8 @@ public class ProfileController {
profileModel.getBirthDate(), profileModel.getBirthDate(),
profileModel.getSaving(), profileModel.getSaving(),
profileModel.getAnnualIncome(), profileModel.getAnnualIncome(),
profileModel.getMonthlyBudget()); profileModel.getMonthlyBudget(),
profileModel.getBirthDate());
model.addAttribute(PageReturnAttributeKeyword.PROFILE_EDIT_FORM, profileEditForm); model.addAttribute(PageReturnAttributeKeyword.PROFILE_EDIT_FORM, profileEditForm);
return TransitionTargetPageNameKeyword.PROFILE_EDIT_HTML; return TransitionTargetPageNameKeyword.PROFILE_EDIT_HTML;

View File

@@ -16,4 +16,5 @@ public class ProfileEditForm {
private Integer saving; private Integer saving;
private Integer annualIncome; private Integer annualIncome;
private Integer monthlyBudget; private Integer monthlyBudget;
private LocalDate birthDate;
} }

View File

@@ -138,6 +138,8 @@
</div> </div>
</div> </div>
<div class="card shadow-sm"> <div class="card shadow-sm">

View File

@@ -8,8 +8,9 @@
<title>コース選択</title> <title>コース選択</title>
</head> </head>
<body style="padding-bottom: 120px; padding-top: 60px;"> <body style="padding-bottom: 120px">
<div th:replace="~{header :: header}"></div> <div th:replace="~{header :: header}"></div>
<h1 class="page-title">コース選択</h1> <h1 class="page-title">コース選択</h1>
<th:block th:if="${mode == 'change'}"> <th:block th:if="${mode == 'change'}">

View File

@@ -1,153 +1,153 @@
<!DOCTYPE html> <!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"> <html xmlns:th="http://www.thymeleaf.org">
<head> <head>
<meta charset="UTF-8" name="viewport" content="width=device-width, initial-scale=1" http-equiv="Content-Type"> <meta charset="UTF-8" name="viewport" content="width=device-width, initial-scale=1" http-equiv="Content-Type">
<title>収支詳細</title> <title>収支詳細</title>
<link rel="stylesheet" th:href="@{/css/transaction_detail.css}"> <link rel="stylesheet" th:href="@{/css/transaction_detail.css}">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/css/bootstrap.min.css" rel="stylesheet"> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" th:href="@{/css/style.css}"> <link rel="stylesheet" th:href="@{/css/style.css}">
</head> </head>
<body style="padding-top:80px; padding-bottom:80px;"> <body style="padding-top:80px; padding-bottom:80px;">
<div th:replace="~{header :: header}"></div> <div th:replace="~{header :: header}"></div>
<div class="main-container"> <div class="main-container">
<h2 class="page-title" <h2 class="page-title"
th:text="${today}"> th:text="${today}">
</h2> </h2>
<div th:each="transactionForm : ${transactionFormList}" <div th:each="transactionForm : ${transactionFormList}"
class="card shadow-sm mb-3"> class="card shadow-sm mb-3">
<div class="card-body"> <div class="card-body">
<div class="d-flex justify-content-between"> <div class="d-flex justify-content-between">
<span class="fw-bold" <span class="fw-bold"
th:text="${transactionForm.categoryName}"> th:text="${transactionForm.categoryName}">
</span> </span>
<span th:text="'¥' + ${transactionForm.amount}"> <span th:text="'¥' + ${transactionForm.amount}">
</span> </span>
</div> </div>
<div class="d-flex justify-content-end gap-2 mt-3"> <div class="d-flex justify-content-end gap-2 mt-3">
<form th:action="@{/transaction/update}" <form th:action="@{/transaction/update}"
method="get"> method="get">
<input type="hidden" <input type="hidden"
name="today" name="today"
th:value="${today}"> th:value="${today}">
<input type="hidden" <input type="hidden"
name="transactionId" name="transactionId"
th:value="${transactionForm.transactionId}"> th:value="${transactionForm.transactionId}">
<button class="btn btn-sm btn-primary" <button class="btn btn-sm btn-primary"
type="submit"> type="submit">
編集 編集
</button> </button>
</form> </form>
<form th:action="@{/transaction/delete}" <form th:action="@{/transaction/delete}"
method="post"> method="post">
<input type="hidden" <input type="hidden"
name="today" name="today"
th:value="${today}"> th:value="${today}">
<input type="hidden" <input type="hidden"
name="transactionId" name="transactionId"
th:value="${transactionForm.transactionId}"> th:value="${transactionForm.transactionId}">
<button class="btn btn-sm btn-danger" <button class="btn btn-sm btn-danger"
type="submit"> type="submit">
削除 削除
</button> </button>
</form> </form>
</div> </div>
</div> </div>
</div> </div>
<div class="d-grid mt-4"> <div class="d-grid mt-4">
<form th:action="@{/transaction/create}" <form th:action="@{/transaction/create}"
method="get"> method="get">
<input type="hidden" <input type="hidden"
name="today" name="today"
id="today" id="today"
th:value="${today}"> th:value="${today}">
<button class="btn btn-success w-100" <button class="btn btn-success w-100"
type="submit"> type="submit">
新規登録 新規登録
</button> </button>
</form> </form>
</div> </div>
<div class="d-grid mt-4"> <div class="d-grid mt-4">
<form th:action="@{/fixed-cost/list}" method="get"> <form th:action="@{/fixed-cost/list}" method="get">
<input type="hidden" <input type="hidden"
name="today" name="today"
id="today" id="today"
th:value="${today}"> th:value="${today}">
<button class="btn btn-dark w-100" <button class="btn btn-dark w-100"
type="submit"> type="submit">
固定費一覧 固定費一覧
</button> </button>
</form> </form>
</div> </div>
<div class="d-grid mt-4"> <div class="d-grid mt-4">
<form th:action="@{/category/list}" <form th:action="@{/category/list}"
method="get"> method="get">
<input type="hidden" <input type="hidden"
name="today" name="today"
id="today" id="today"
th:value="${today}"> th:value="${today}">
<button class="btn btn-dark w-100" <button class="btn btn-dark w-100"
type="submit"> type="submit">
カテゴリ一覧 カテゴリ一覧
</button> </button>
</form> </form>
</div> </div>
</div> </div>
<div th:replace="~{footer :: footer}"></div> <div th:replace="~{footer :: footer}"></div>
</body> </body>
</html> </html>

View File

@@ -80,7 +80,7 @@
</div> </div>
<div class="mb-3"> <div class="mb-3">
<label for="goalId" class="form-label">目標貯金額</label> <label for="goalId" class="form-label">目標</label>
<input type="number" id="goalId" class="form-control" th:field="*{goalId}" min="0" required> <input type="number" id="goalId" class="form-control" th:field="*{goalId}" min="0" required>
</div> </div>