38 Commits

Author SHA1 Message Date
709f5e14da [EDIT]画面の上下に空白を作りました 2026-09-18 14:00:20 +09:00
6197b12ac4 [EDIT]ヘッダーを固定化しました 2026-09-18 13:59:50 +09:00
18faec044e Merge branch 's-choi' of https://gitea.it-college.co.jp/2026_09_5H_Spring_KIZAKI/Monegement into n-kawahito 2026-09-18 13:59:17 +09:00
6b4ae5bd96 Merge branch 'k-oshita' of https://gitea.it-college.co.jp/2026_09_5H_Spring_KIZAKI/Monegement into s-morimto 2026-09-18 13:58:07 +09:00
a2b1922548 Merge branch 'n-kawahito' of https://gitea.it-college.co.jp/2026_09_5H_Spring_KIZAKI/Monegement into s-morimto 2026-09-18 13:35:40 +09:00
1386f4b886 [ADD]新規会員登録のserviceの作成 2026-09-18 13:35:06 +09:00
15bf2949bc [EDIT] 目標を表示する機能を追加しました。 2026-09-18 13:32:14 +09:00
be9abffeaa Merge branch 'n-kawahito' of https://gitea.it-college.co.jp/2026_09_5H_Spring_KIZAKI/Monegement into k-oshita 2026-09-18 13:30:15 +09:00
d696d8f376 [EDIT]フッターの読み込みコードを追加しました 2026-09-18 13:26:49 +09:00
066d76148b [ADD]フッター画面を追加しました。 2026-09-18 13:26:12 +09:00
603d0d083a [ADD]消えたファイルの追加 2026-09-18 13:20:59 +09:00
cbd5aa6a7d Merge branch 'n-kawahito' of https://gitea.it-college.co.jp/2026_09_5H_Spring_KIZAKI/Monegement into s-morimto 2026-09-18 13:12:35 +09:00
43740691b5 [EDIT]Loginの修正 2026-09-18 13:07:23 +09:00
7719c002ff [ADD]共通例外処理を実装しました 2026-09-18 12:46:43 +09:00
8884a74625 [ADD]エラー画面処理を実装しました 2026-09-18 12:46:14 +09:00
kkazuya
61da5163b0 Merge branch 's-morimto' of https://gitea.it-college.co.jp/2026_09_5H_Spring_KIZAKI/Monegement into k-kobayashi
# Conflicts:
#	src/main/java/com/example/demo/app/presentation/controller/UserController.java
#	src/main/resources/templates/login.html
#	src/main/resources/templates/password_reset.html
2026-09-18 12:31:44 +09:00
30a2ef3e21 [EDIT]画面遷移の修正 2026-09-18 11:30:50 +09:00
938574654f [EDIT]Loginに関する修正 2026-09-18 11:28:40 +09:00
e43028c0ee Merge branch 'k-kobayashi' of https://gitea.it-college.co.jp/2026_09_5H_Spring_KIZAKI/Monegement into s-morimto 2026-09-18 11:13:59 +09:00
7ddebf7a4a [RENAME]A→aに変更 2026-09-18 11:13:27 +09:00
cb7a3f542b Merge branch 'k-kobayashi' of https://gitea.it-college.co.jp/2026_09_5H_Spring_KIZAKI/Monegement into k-oshita
# Conflicts:
#	src/main/java/com/example/demo/app/domain/service/impl/CourseInfoServiceImpl.java
2026-09-18 11:11:19 +09:00
b48b3ae0bd [ADD]profileの作成 2026-09-18 11:10:45 +09:00
57749b6354 Merge remote-tracking branch 'origin/k-kobayashi' into s-morimto 2026-09-18 11:08:36 +09:00
a8c46cc9db Merge branch 's-choi' of https://gitea.it-college.co.jp/2026_09_5H_Spring_KIZAKI/Monegement into s-morimto 2026-09-18 11:08:05 +09:00
702dd24d2e Merge branch 'n-kawahito' of https://gitea.it-college.co.jp/2026_09_5H_Spring_KIZAKI/Monegement into k-oshita
# Conflicts:
#	src/main/java/com/example/demo/app/presentation/form/AnalysisForm.java
#	src/main/java/com/example/demo/app/presentation/form/CategoryAnalysisForm.java
2026-09-18 11:04:06 +09:00
d71194659b [FIX]ゴールモデルのバグ修正 2026-09-18 11:02:42 +09:00
44ceb0ca07 Merge branch 'k-kobayashi' of https://gitea.it-college.co.jp/2026_09_5H_Spring_KIZAKI/Monegement into k-oshita
# Conflicts:
#	src/main/java/com/example/demo/app/domain/model/GoalModel.java
#	src/main/java/com/example/demo/app/domain/service/CourseInfoService.java
2026-09-18 11:01:21 +09:00
614533e2b0 Merge remote-tracking branch 'origin/k-kobayashi' into k-oshita
# Conflicts:
#	src/main/java/com/example/demo/app/domain/service/CourseService.java
2026-09-18 10:57:42 +09:00
2da75305fd Merge remote-tracking branch 'origin/k-kobayashi' into k-oshita
# Conflicts:
#	src/main/java/com/example/demo/app/domain/service/impl/CourseServiceImpl.java
2026-09-18 10:56:22 +09:00
f55ece4dc7 「STYLE] 目標名を追記しました。 2026-09-18 10:55:37 +09:00
0a63c81712 Merge branch 's-morimto' of https://gitea.it-college.co.jp/2026_09_5H_Spring_KIZAKI/Monegement into k-oshita 2026-09-18 10:39:13 +09:00
571fcc6d90 [add]余分なファイルをコミットしました 2026-09-18 10:16:49 +09:00
15185672c4 s-choiブランチとのマージ完了 2026-09-18 10:08:41 +09:00
3833689759 [ADD]目標を管理するため機能の追加 2026-09-18 10:05:15 +09:00
0bec7b3b3b [EDIT]目標モデルの改行 2026-09-17 16:52:56 +09:00
662e3433d2 [EDIT]目標のModelの変換部分の修正 2026-09-17 16:12:15 +09:00
60d4ebd74f Merge branch 's-choi' of https://gitea.it-college.co.jp/2026_09_5H_Spring_KIZAKI/Monegement into k-oshita 2026-09-17 15:13:57 +09:00
49af15f939 Merge branch 's-choi' of https://gitea.it-college.co.jp/2026_09_5H_Spring_KIZAKI/Monegement into k-oshita 2026-09-17 14:36:29 +09:00
29 changed files with 766 additions and 23 deletions

View File

@@ -2,6 +2,9 @@ package com.example.demo.app.domain.model;
import java.time.LocalDate;
import com.example.demo.app.infra.entity.GoalEntity;
import com.example.demo.app.presentation.form.GoalForm;
import lombok.AllArgsConstructor;
import lombok.Getter;
@@ -21,4 +24,35 @@ public class GoalModel {
private Integer goalComplete;
public static GoalModel convertFrom(GoalEntity goalEntity) {
return new GoalModel(
goalEntity.getGoalId(),
goalEntity.getGoalTitle(),
goalEntity.getGoalSubtitle(),
goalEntity.getTargetAmount(),
goalEntity.getDeadline(),
goalEntity.getGoalComplete());
}
public static GoalEntity convertTo(GoalModel goalModel) {
return new GoalEntity(
goalModel.getGoalId(),
goalModel.getGoalTitle(),
goalModel.getGoalSubtitle(),
goalModel.getTargetAmount(),
goalModel.getDeadline(),
goalModel.getGoalComplete(),
null);
}
public static GoalModel convertFrom(GoalForm goalForm) {
return new GoalModel(
goalForm.getGoalId(),
goalForm.getGoalTitle(),
goalForm.getGoalSubtitle(),
goalForm.getTargetAmount(),
goalForm.getDeadline(),
goalForm.getGoalComplete());
}
}

View File

@@ -0,0 +1,18 @@
package com.example.demo.app.domain.model;
import java.time.LocalDate;
import lombok.AllArgsConstructor;
import lombok.Getter;
@Getter
@AllArgsConstructor
public class ProfileModel {
private Long userId;
private String userName;
private String emailAddress;
private LocalDate brithDate;
private Integer saving;
private Integer annualIncome;
private Integer monthlyBudget;
}

View File

@@ -0,0 +1,17 @@
package com.example.demo.app.domain.service;
import com.example.demo.app.domain.model.GoalModel;
public interface GoalService {
GoalModel getGoalById(Long goalId);
GoalModel getGoalByUserId(Long userId);
GoalModel createGoal(GoalModel goalModel);
GoalModel updateGoal(GoalModel goalModel);
// void deleteGoal(Long goalId);
}

View File

@@ -0,0 +1,7 @@
package com.example.demo.app.domain.service;
import com.example.demo.app.presentation.form.PasswordResetForm;
public interface PasswordResetService {
boolean resetPassword(Long userId, PasswordResetForm passwordResetForm);
}

View File

@@ -0,0 +1,7 @@
package com.example.demo.app.domain.service;
import com.example.demo.app.domain.model.ProfileModel;
public interface ProfileService {
ProfileModel findOne(Long userId);
}

View File

@@ -0,0 +1,7 @@
package com.example.demo.app.domain.service;
import com.example.demo.app.presentation.form.UserForm;
public interface UserService {
void register(UserForm userForm);
}

View File

@@ -0,0 +1,55 @@
package com.example.demo.app.domain.service.impl;
import org.springframework.stereotype.Service;
import com.example.demo.app.domain.model.GoalModel;
import com.example.demo.app.domain.service.GoalService;
import com.example.demo.app.infra.entity.GoalEntity;
import com.example.demo.app.infra.entity.UserEntity;
import com.example.demo.app.infra.repository.GoalRepository;
import com.example.demo.app.infra.repository.UserRepository;
import lombok.RequiredArgsConstructor;
@Service
@RequiredArgsConstructor
public class GoalServiceImpl implements GoalService {
private final GoalRepository goalRepository;
private final UserRepository userRepository;
@Override
public GoalModel getGoalById(Long goalId) {
GoalEntity goalEntity = goalRepository.findById(goalId).orElse(null);
return GoalModel.convertFrom(goalEntity);
}
@Override
public GoalModel getGoalByUserId(Long userId) {
UserEntity userEntity = userRepository.findById(userId).orElseThrow();
GoalEntity goalEntity = userEntity.getGoalEntity();
return GoalModel.convertFrom(goalEntity);
}
@Override
public GoalModel createGoal(GoalModel goalModel) {
GoalEntity goalEntity = GoalModel.convertTo(goalModel);
GoalEntity savedGoalEntity = goalRepository.save(goalEntity);
return GoalModel.convertFrom(savedGoalEntity);
}
@Override
public GoalModel updateGoal(GoalModel goalModel) {
GoalEntity goalEntity = GoalModel.convertTo(goalModel);
GoalEntity updatedGoalEntity = goalRepository.save(goalEntity);
return GoalModel.convertFrom(updatedGoalEntity);
}
}

View File

@@ -0,0 +1,34 @@
package com.example.demo.app.domain.service.impl;
import org.springframework.stereotype.Service;
import com.example.demo.app.domain.model.ProfileModel;
import com.example.demo.app.domain.service.ProfileService;
import com.example.demo.app.infra.entity.UserEntity;
import com.example.demo.app.infra.repository.UserRepository;
import lombok.RequiredArgsConstructor;
@Service
@RequiredArgsConstructor
public class ProfileServiceImpl implements ProfileService{
private final UserRepository userRepository;
@Override
public ProfileModel findOne(Long userId) {
UserEntity userEntity = userRepository.findById(userId).orElse(null);
if(userEntity == null) {
return null;
}
return new ProfileModel(
userEntity.getUserId(),
userEntity.getUserName(),
userEntity.getMailAddress(),
userEntity.getBirthDate(),
userEntity.getSaving(),
userEntity.getAnnualIncome(),
userEntity.getMonthlyBudget());
}
}

View File

@@ -0,0 +1,63 @@
package com.example.demo.app.domain.service.impl;
import org.springframework.stereotype.Service;
import com.example.demo.app.domain.service.UserService;
import com.example.demo.app.infra.entity.CourseEntity;
import com.example.demo.app.infra.entity.GoalEntity;
import com.example.demo.app.infra.entity.QuestionEntity;
import com.example.demo.app.infra.entity.UserEntity;
import com.example.demo.app.infra.repository.CourseRepository;
import com.example.demo.app.infra.repository.GoalRepository;
import com.example.demo.app.infra.repository.QuestionRepository;
import com.example.demo.app.infra.repository.UserRepository;
import com.example.demo.app.presentation.form.UserForm;
import lombok.RequiredArgsConstructor;
@Service
@RequiredArgsConstructor
public class UserServiceImpl implements UserService {
private final UserRepository userRepository;
private final QuestionRepository questionRepository;
private final GoalRepository goalRepository;
private final CourseRepository courseRepository;
@Override
public void register(UserForm userForm) {
UserEntity userEntity = new UserEntity();
userEntity.setUserName(userForm.getUserName());
userEntity.setMailAddress(userForm.getMailAddress());
userEntity.setPassword(userForm.getPassword());
userEntity.setSecretQuestionAnswer(userForm.getSecretAnswer());
userEntity.setBirthDate(userForm.getBirthDate());
userEntity.setSaving(userForm.getSaving());
userEntity.setBirthDate(userForm. getBirthDate());
userEntity.setSaving(userForm.getSaving());
userEntity.setAnnualIncome(userForm.getAnnualIncome());
userEntity.setMonthlyBudget(userForm.getMonthlyBudget());
QuestionEntity questionEntity =
questionRepository.findById(userForm.getSecretQuestionId()).orElse(null);
GoalEntity goalEntity =
goalRepository.findById(userForm.getGoalId()).orElse(null);
CourseEntity courseEntity =
courseRepository.findById(userForm.getCourseId()).orElse(null);
userEntity.setQuestionEntity(questionEntity);
userEntity.setGoalEntity(goalEntity);
userEntity.setCourseEntity(courseEntity);
userEntity.setDeleteFlag(0);
userRepository.save(userEntity);
}
}

View File

@@ -38,7 +38,7 @@ public class GoalEntity {
@Column(name = "deadline", nullable = false)
private LocalDate deadline;
@Column(name = "goal_complete", nullable = false)
@Column(name = "goal_complete", nullable = true)
private Integer goalComplete;
@OneToOne(mappedBy = "goalEntity")

View File

@@ -0,0 +1,12 @@
package com.example.demo.app.presentation.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
@Controller
public class ErrorController {
@GetMapping("/error")
public String showError() {
return "error";
}
}

View File

@@ -0,0 +1,81 @@
package com.example.demo.app.presentation.controller;
import jakarta.servlet.http.HttpSession;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import com.example.demo.app.domain.model.GoalModel;
import com.example.demo.app.domain.model.LoginModel;
import com.example.demo.app.domain.service.GoalService;
import com.example.demo.app.presentation.form.GoalForm;
import lombok.RequiredArgsConstructor;
@Controller
@RequiredArgsConstructor
@RequestMapping("/goal")
public class GoalController {
private final GoalService goalService;
@GetMapping("")
public String getGoal(Model model, HttpSession session) {
LoginModel loginUser = (LoginModel) session.getAttribute("loginUser");
Long userId = loginUser.getUserId();
//テスト用
// Long userId = 1L;
GoalModel goalModel = goalService.getGoalByUserId(userId);
GoalForm goalForm = GoalForm.convertFrom(goalModel);
model.addAttribute("goalForm", goalForm);
return "goal_view";
}
@GetMapping("/edit")
public String editGoal(Model model, HttpSession session) {
LoginModel loginUser = (LoginModel) session.getAttribute("loginUser");
Long userId = loginUser.getUserId();
//テスト用
// Long userId = 1L;
GoalModel goalModel = goalService.getGoalByUserId(userId);
GoalForm goalForm = GoalForm.convertFrom(goalModel);
model.addAttribute("goalForm", goalForm);
return "goal_edit";
}
@PostMapping("/update")
public String updateGoal(@ModelAttribute GoalForm goalForm, HttpSession session) {
LoginModel loginUser = (LoginModel) session.getAttribute("loginUser");
Long userId = loginUser.getUserId();
//テスト用
// Long userId = 1L;
// 本人の目標かどうかを確認してから更新する
GoalModel currentGoal = goalService.getGoalByUserId(userId);
if (!currentGoal.getGoalId().equals(goalForm.getGoalId())) {
return "redirect:/goal"; // 他人のデータを更新しようとしたら弾く
}
GoalModel goalModel = GoalModel.convertFrom(goalForm);
goalService.updateGoal(goalModel);
return "redirect:/goal";
}
}

View File

@@ -0,0 +1,32 @@
package com.example.demo.app.presentation.controller;
import jakarta.servlet.http.HttpSession;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import com.example.demo.app.domain.model.LoginModel;
import com.example.demo.app.domain.model.ProfileModel;
import com.example.demo.app.domain.service.ProfileService;
import com.example.demo.app.presentation.form.ProfileForm;
import lombok.RequiredArgsConstructor;
@Controller
@RequiredArgsConstructor
public class ProfileController {
private final ProfileService profileService;
@GetMapping("/profile")
public String profile(Model model, HttpSession session) {
LoginModel loginUser = (LoginModel) session.getAttribute("loginUser");
ProfileModel profileModel = profileService.findOne(loginUser.getUserId());
ProfileForm profileForm = ProfileForm.convertForm(profileModel);
model.addAttribute("profileForm", profileForm);
return "profile";
}
}

View File

@@ -0,0 +1,55 @@
package com.example.demo.app.presentation.controller;
import jakarta.servlet.http.HttpSession;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PostMapping;
import com.example.demo.app.presentation.form.UserForm;
import lombok.RequiredArgsConstructor;
@Controller
@RequiredArgsConstructor
public class UserController {
@GetMapping("/user/register")
public String showRegister(Model model, HttpSession session) {
UserForm userForm = (UserForm) session.getAttribute("userForm");
if(userForm == null) {
userForm = new UserForm();
}
model.addAttribute("userForm", userForm);
return "user_register";
}
@PostMapping("/user/register/confirm")
public String confirmRegister(
@ModelAttribute UserForm userForm,
HttpSession session) {
session.setAttribute("userForm", userForm);
return "user_register_confirm";
}
@PostMapping("/user/register/complete")
public String completeRegister(HttpSession session) {
UserForm userForm =
(UserForm) session.getAttribute("userForm");
// DBへの登録処理
session.removeAttribute("userForm");
return "redirect:/login";
}
}

View File

@@ -0,0 +1,42 @@
package com.example.demo.app.presentation.form;
import java.time.LocalDate;
import com.example.demo.app.domain.model.GoalModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class GoalForm {
private Long goalId;
private String goalTitle;
private String goalSubtitle;
private Integer targetAmount;
private LocalDate deadline;
private Integer goalComplete;
public static GoalForm convertFrom(GoalModel goalModel) {
return new GoalForm(
goalModel.getGoalId(),
goalModel.getGoalTitle(),
goalModel.getGoalSubtitle(),
goalModel.getTargetAmount(),
goalModel.getDeadline(),
goalModel.getGoalComplete());
}
// public static List<GoalForm> convertFrom(List<GoalModel> goalModelList) {
// return goalModelList.stream().map(GoalForm::convertFrom).toList();
// }
}

View File

@@ -0,0 +1,13 @@
package com.example.demo.app.presentation.form;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PasswordResetForm{
private String password;
private String passwordConfirm;
}

View File

@@ -0,0 +1,33 @@
package com.example.demo.app.presentation.form;
import java.time.LocalDate;
import com.example.demo.app.domain.model.ProfileModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ProfileForm {
private Long userId;
private String userName;
private String emailAddress;
private LocalDate brithDate;
private Integer saving;
private Integer annualIncome;
private Integer monthlyBudget;
public static ProfileForm convertForm(ProfileModel profileModel) {
return new ProfileForm(
profileModel.getUserId(),
profileModel.getUserName(),
profileModel.getEmailAddress(),
profileModel.getBrithDate(),
profileModel.getSaving(),
profileModel.getAnnualIncome(),
profileModel.getMonthlyBudget());
}
}

View File

@@ -0,0 +1,24 @@
package com.example.demo.app.presentation.form;
import java.time.LocalDate;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserForm {
private String userName;
private String mailAddress;
private String password;
private Long secretQuestionId;
private String SecretAnswer;
private LocalDate birthDate;
private Integer saving;
private Integer annualIncome;
private Integer monthlyBudget;
private Long goalId;
private Long courseId;
}

View File

@@ -0,0 +1,22 @@
package com.example.demo.exception;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
@ControllerAdvice
public class GlobalExceptionHandler {
@ExceptionHandler(Exception.class)
public String handleException(
Exception e,
Model model) {
model.addAttribute(
"errorMessage",
"システムエラーが発生しました。"
+ "初めからやり直してください。");
return "error";
}
}

View File

@@ -5,11 +5,12 @@
<title>分析画面</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<body class="pb-5 pt-5">
<div th:replace="~{header :: header}">
</div>
<div class="container mt-4">
<h2 class="text-center">支出分析</h2>
<table class="table text-center">
@@ -81,6 +82,11 @@
</tbody>
</table>
</div>
<div th:replace="~{footer :: footer}">
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>

View File

@@ -0,0 +1,32 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8" name="viewport" content="width=device-width, initial-scale=1">
<title>エラー</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
</head>
<body>
<div th:replace="~{header :: header}">
</div>
<div class="container text-center mt-5">
<h2 class="text-danger">
エラーが発生しました
</h2>
<p th:text="${errorMessage}"></p>
<a class="btn btn-primary" th:href="@{/login}">
ログイン画面へ
</a>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>

View File

@@ -0,0 +1,42 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8" name="viewport" content="width=device-width, initial-scale=1">
<title>フッター</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<footer th:fragment="footer" class="fixed-bottom border-top py-2" style="background-color:#E3F2FD;">
<nav data-bs-theme="light">
<div class="card-footer text-center">
<div class="row">
<div class="col border-end">
<button type="button" class="btn btn-link text-black text-decoration-none">
<a th:href="@{/transaction/create}">入力</a>
</button>
</div>
<div class="col border-end">
<button type="button" class="btn btn-link text-black text-decoration-none">
<a th:href="@{/transaction/list}">一覧</a>
</button>
</div>
<div class="col border-end">
<button type="button" class="btn btn-link text-black text-decoration-none">
<a th:href="@{/analysis}">分析</a>
</button>
</div>
<div class="col border-end">
<button type="button" class="btn btn-link text-black text-decoration-none">
<a th:href="@{/goal}">目標</a>
</button>
</div>
</div>
</div>
</nav>
</footer>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>

View File

@@ -0,0 +1,38 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>目標編集</title>
</head>
<body>
<h1>目標編集</h1>
<form th:action="@{/goal/update}" th:object="${goalForm}" method="post">
<input type="hidden" th:field="*{goalId}">
<div>
<label>目標名</label>
<input type="text" th:field="*{goalTitle}">
</div>
<div>
<label>目標説明</label>
<textarea th:field="*{goalSubtitle}"></textarea>
</div>
<div>
<label>目標金額</label>
<input type="number" th:field="*{targetAmount}">
</div>
<div>
<label>目標達成期限</label>
<input type="date" th:field="*{deadline}">
</div>
<button type="submit">更新する</button>
</form>
</body>
</html>

View File

@@ -0,0 +1,35 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>目標詳細</title>
</head>
<body>
<h1>目標詳細</h1>
<table>
<tr>
<th>目標名</th>
<td th:text="${goalForm.goalTitle}"></td>
</tr>
<tr>
<th>目標説明</th>
<td th:text="${goalForm.goalSubtitle}"></td>
</tr>
<tr>
<th>目標金額</th>
<td th:text="${goalForm.targetAmount}"></td>
</tr>
<tr>
<th>目標達成期限</th>
<td th:text="${goalForm.deadline}"></td>
</tr>
</table>
<a th:href="@{/goal/edit}">編集する</a>
</body>
</html>

View File

@@ -7,7 +7,7 @@
</head>
<body>
<header th:fragment="header">
<header th:fragment="header" class="fixed-top">
<nav class="navbar" style="background-color: #e3f2fd;" data-bs-theme="light">
<div class="container-fluid">

View File

@@ -13,9 +13,10 @@
<div th:if="${errorMessage}" th:text="${errorMessage}"></div>
<form th:action="@{/login}" th:object="${loginForm}" method="post">
<div>
<label for="emailAddress">メールアドレス</label>
<label for="mailAddress">メールアドレス</label>
<input type="email"
id="mailAddress"
th:field="*{mailAddress}"
required>
</div>
@@ -24,6 +25,7 @@
<label for="password">パスワード</label>
<input type="password"
id="password"
th:field="*{password}"
required>
</div>
@@ -34,11 +36,11 @@
</form>
<div>
<a href="@{user/register}">新規会員登録</a>
<a th:href="@{user/register}">新規会員登録</a>
</div>
<div>
<a href="@{password/authentication}">パスワードを忘れた方</a>
<a th:href="@{/authentication}">パスワードを忘れた方</a>
</div>
</main>
</body>

View File

@@ -0,0 +1,42 @@
<!DOCTYPE html>
<html lang="ja"xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>パスワード再設定</title>
</head>
<body>
<header></header>
<main>
<h1>パスワード再設定</h1>
<form th:action="@{/password_reset}" th:object="${passwordResetForm}" method="post">
<div>
<label for="password">新しいパスワード</label>
<input type="password"
id="password"
th:field="*{password}"
minlength="8"
maxlength="255"
required>
</div>
<div>
<label for="passwordConfirm">パスワード確認</label>
<input type="password"
id="passwordConfirm"
th:field="*{passwordConfirm}"
minlength="8"
maxlength="255"
required>
</div>
<button type="submit">再設定</button>
</form>
<div th:if="${errorMessage}">
<p th:text="${errorMessage}"></p>
</div>
</main>
</body>
</html>

View File

@@ -98,28 +98,18 @@
<div>
<label for="goalId">目標</label>
<select id="goalId"
<input type="number"
id="goalId"
th:field="*{goalId}"
min="0"
required>
<option value="">選択してください</option>
<option th:each="goal : ${goalList}"
th:value="${goal.goalId}"
th:text="${goal.goalTitle}">
</option>
</select>
</div>
<div>
<label for="courseId">コース</label>
<select id="courseId"
th:field="*{courseId}"
required>
<option value="">選択してください</option>
<option th:each="course : ${courseList}"
th:value="${course.courseId}"
th:text="${course.courseName}">
</option>
</select>
<label>コース</label>
<input type="hidden" th:field="*{courseId}">
<span th:text="${selectedCourseName}">未選択</span>
<button type="button"onclick="location.href='/select-course'">コース選択</button>
</div>
<div>