[ADD]プロフィールの作成

This commit is contained in:
2026-09-18 14:22:50 +09:00
parent 9259a53bad
commit dfcc49ad94
4 changed files with 79 additions and 16 deletions

View File

@@ -10,8 +10,8 @@ import lombok.Getter;
public class ProfileModel { public class ProfileModel {
private Long userId; private Long userId;
private String userName; private String userName;
private String emailAddress; private String mailAddress;
private LocalDate brithDate; private LocalDate birthDate;
private Integer saving; private Integer saving;
private Integer annualIncome; private Integer annualIncome;
private Integer monthlyBudget; private Integer monthlyBudget;

View File

@@ -14,8 +14,8 @@ import lombok.NoArgsConstructor;
public class ProfileForm { public class ProfileForm {
private Long userId; private Long userId;
private String userName; private String userName;
private String emailAddress; private String mailAddress;
private LocalDate brithDate; private LocalDate birthDate;
private Integer saving; private Integer saving;
private Integer annualIncome; private Integer annualIncome;
private Integer monthlyBudget; private Integer monthlyBudget;
@@ -24,8 +24,8 @@ public class ProfileForm {
return new ProfileForm( return new ProfileForm(
profileModel.getUserId(), profileModel.getUserId(),
profileModel.getUserName(), profileModel.getUserName(),
profileModel.getEmailAddress(), profileModel.getMailAddress(),
profileModel.getBrithDate(), profileModel.getBirthDate(),
profileModel.getSaving(), profileModel.getSaving(),
profileModel.getAnnualIncome(), profileModel.getAnnualIncome(),
profileModel.getMonthlyBudget()); profileModel.getMonthlyBudget());

View File

@@ -0,0 +1,63 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>プロフィール</title>
</head>
<body>
<header></header>
<main>
<div>
<p>氏名</p>
<p th:text="${profileForm.userName}"></p>
</div>
<div>
<p>メールアドレス</p>
<p th:text="${profileForm.mailAddress}"></p>
</div>
<div>
<p>生年月日</p>
<p th:text="${profileForm.birthDate}"></p>
</div>
<div>
<p>パスワード</p>
<form th:action="@{/password/reset}" method="get">
<button type="submit">パスワード再設定</button>
</form>
</div>
<div>
<p>貯蓄金</p>
<p th:text="${profileForm.saving}"></p>
</div>
<div>
<p>年収</p>
<p th:text="${profileForm.annualIncome}"></p>
</div>
<div>
<p>月別使用可能額</p>
<p th:text="${profileForm.monthlyBudget}"></p>
</div>
<div>
<form th:action="@{/profile/edit}" method="get">
<button type="submit">編集</button>
</form>
</div>
<form th:action="@{/login}" method="post">
<button type="submit">ログアウト</button>
</form>
<form th:action="@{/aaa}" method="post">
<button type="submit">脱退</button>
</form>
</main>
</body>
</html>

View File

@@ -12,17 +12,17 @@
<div> <div>
<p>氏名</p> <p>氏名</p>
<p th:text="${session.userForm.userName}" readonly></p> <p th:text="${user.userName}"></p>
</div> </div>
<div> <div>
<p>メールアドレス</p> <p>メールアドレス</p>
<p th:text="${session.userForm.mailAddress}" readonly></p> <p th:text="${user.mailAddress}"></p>
</div> </div>
<div> <div>
<p>生年月日</p> <p>生年月日</p>
<p th:text="${session.userForm.barthDate}" readonly></p> <p th:text="${user.birthDate}"></p>
</div> </div>
<div> <div>
@@ -32,37 +32,37 @@
<div> <div>
<p>秘密の質問</p> <p>秘密の質問</p>
<p th:text="${session.userForm.secretQuestionId}" readonly></p> <p th:text="${user.secretQuestionId}"></p>
</div> </div>
<div> <div>
<p>秘密の質問の回答</p> <p>秘密の質問の回答</p>
<p th:text="${session.userForm.secretAnswer}" readonly></p> <p th:text="${user.secretAnswer}"></p>
</div> </div>
<div> <div>
<p>貯蓄金</p> <p>貯蓄金</p>
<p th:text="${session.userForm.saving}" readonly></p> <p th:text="${user.saving}"></p>
</div> </div>
<div> <div>
<p>年収</p> <p>年収</p>
<p th:text="${session.userForm.annualIncome}" readonly></p> <p th:text="${user.annualIncome}"></p>
</div> </div>
<div> <div>
<p>月別使用可能額</p> <p>月別使用可能額</p>
<p th:text="${session.userForm.monthlyBudget}" readonly></p> <p th:text="${user.monthlyBudget}"></p>
</div> </div>
<div> <div>
<p>目標</p> <p>目標</p>
<p th:text="${session.userForm.goalId}" readonly></p> <p th:text="${user.goalId}"></p>
</div> </div>
<div> <div>
<p>コース</p> <p>コース</p>
<p th:text="${session.userForm.courseId}" readonly></p> <p th:text="${user.courseId}"></p>
</div> </div>
<div> <div>