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.setAnnualIncome(profileEditForm.getAnnualIncome());
userEntity.setMonthlyBudget(profileEditForm.getMonthlyBudget());
userEntity.setBirthDate(profileEditForm.getBirthDate());
userRepository.save(userEntity);
}
}

View File

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

View File

@@ -1,5 +1,7 @@
package com.example.demo.app.presentation.form;
import java.time.LocalDate;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@@ -13,4 +15,5 @@ public class ProfileEditForm {
private Integer saving;
private Integer annualIncome;
private Integer monthlyBudget;
private LocalDate birthDate;
}

View File

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

View File

@@ -8,7 +8,7 @@
<title>コース選択</title>
</head>
<body>
<body style="padding-bottom: 120px">
<div th:replace="~{header :: header}"></div>
<h1 class="page-title">コース選択</h1>