2 Commits

5 changed files with 14 additions and 7 deletions

View File

@@ -58,6 +58,7 @@ public class ProfileServiceImpl implements ProfileService{
userEntity.setSaving(profileEditForm.getSaving()); userEntity.setSaving(profileEditForm.getSaving());
userEntity.setAnnualIncome(profileEditForm.getAnnualIncome()); userEntity.setAnnualIncome(profileEditForm.getAnnualIncome());
userEntity.setMonthlyBudget(profileEditForm.getMonthlyBudget()); userEntity.setMonthlyBudget(profileEditForm.getMonthlyBudget());
userEntity.setBirthDate(profileEditForm.getBirthDate());
userRepository.save(userEntity); userRepository.save(userEntity);
} }
} }

View File

@@ -56,7 +56,8 @@ public class ProfileController {
profileModel.getMailAddress(), profileModel.getMailAddress(),
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

@@ -1,5 +1,7 @@
package com.example.demo.app.presentation.form; package com.example.demo.app.presentation.form;
import java.time.LocalDate;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
@@ -13,4 +15,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

@@ -52,13 +52,15 @@
<div class="mb-3"> <div class="mb-3">
<label class="form-label"> <label class="form-label">
パスワード 生年月日
</label> </label>
<input type="password" <input type="date"
class="form-control" class="form-control"
value="********" id="birthDate"
disabled> name="birthDate"
th:value="*{birthDate}"
required>
</div> </div>
<div class="mb-3"> <div class="mb-3">
@@ -105,7 +107,7 @@
<div class="d-grid"> <div class="d-grid">
<button type="submit" <button type="submit"
class="btn btn-primary"> class="btn btn-primary">
確認 確定
</button> </button>
</div> </div>

View File

@@ -8,7 +8,7 @@
<title>コース選択</title> <title>コース選択</title>
</head> </head>
<body> <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>