diff --git a/src/main/java/com/example/demo/app/domain/service/impl/ProfileServiceImpl.java b/src/main/java/com/example/demo/app/domain/service/impl/ProfileServiceImpl.java index c356dc2..9832d9b 100644 --- a/src/main/java/com/example/demo/app/domain/service/impl/ProfileServiceImpl.java +++ b/src/main/java/com/example/demo/app/domain/service/impl/ProfileServiceImpl.java @@ -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); } } diff --git a/src/main/java/com/example/demo/app/presentation/controller/ProfileController.java b/src/main/java/com/example/demo/app/presentation/controller/ProfileController.java index a78c133..6c58578 100644 --- a/src/main/java/com/example/demo/app/presentation/controller/ProfileController.java +++ b/src/main/java/com/example/demo/app/presentation/controller/ProfileController.java @@ -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; diff --git a/src/main/java/com/example/demo/app/presentation/form/ProfileEditForm.java b/src/main/java/com/example/demo/app/presentation/form/ProfileEditForm.java index 78d3e81..f20762b 100644 --- a/src/main/java/com/example/demo/app/presentation/form/ProfileEditForm.java +++ b/src/main/java/com/example/demo/app/presentation/form/ProfileEditForm.java @@ -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; } diff --git a/src/main/resources/templates/profile_edit.html b/src/main/resources/templates/profile_edit.html index 7902a3a..c0598f7 100644 --- a/src/main/resources/templates/profile_edit.html +++ b/src/main/resources/templates/profile_edit.html @@ -52,13 +52,15 @@