From 65bab964321f3d24438b294d1103a59e45a7d21a Mon Sep 17 00:00:00 2001 From: s-choi Date: Fri, 25 Sep 2026 15:41:06 +0900 Subject: [PATCH] =?UTF-8?q?[HOTFIX]=20=E7=9B=AE=E6=A8=99=E3=81=8C=E3=81=AA?= =?UTF-8?q?=E3=81=84=E4=BA=BA=E3=81=AF=E7=9B=AE=E6=A8=99=E7=94=BB=E9=9D=A2?= =?UTF-8?q?=E3=81=B8=E9=81=B7=E7=A7=BB=E3=81=A7=E3=81=8D=E3=81=AA=E3=81=84?= =?UTF-8?q?=E3=83=90=E3=82=B0=E3=82=92=E4=BF=AE=E6=AD=A3=E3=81=97=E3=81=BE?= =?UTF-8?q?=E3=81=97=E3=81=9F=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/GoalController.java | 15 +++++--- src/main/resources/templates/goal_view.html | 35 ++++++++++++------- 2 files changed, 34 insertions(+), 16 deletions(-) diff --git a/src/main/java/com/example/demo/app/presentation/controller/GoalController.java b/src/main/java/com/example/demo/app/presentation/controller/GoalController.java index a29e1a1..b83f5a7 100644 --- a/src/main/java/com/example/demo/app/presentation/controller/GoalController.java +++ b/src/main/java/com/example/demo/app/presentation/controller/GoalController.java @@ -49,11 +49,13 @@ public class GoalController { Model model, HttpSession session, Long goalId) { - + LoginModel loginUser = (LoginModel) session.getAttribute("loginUser"); Long userId = loginUser.getUserId(); + goalService.updateGoalComplete(userId); + List goalModelList = goalService.getGoalByUserId(userId); List goalFormList1 = GoalForm.convertFrom(goalModelList); @@ -66,6 +68,10 @@ public class GoalController { "goalFormList", goalFormList); + model.addAttribute( + "achievementList", + new ArrayList()); + if (goalFormList.isEmpty()) { return "goal_view"; } @@ -188,7 +194,8 @@ public class GoalController { month = month.minusMonths(1); } - Collections.reverse(monthlySavingList); + Collections.reverse( + monthlySavingList); List achievementList = new ArrayList<>(); @@ -280,11 +287,11 @@ public class GoalController { goalService.delete(goalId); if (record == null) { - return "redirect:/goal"; + return "redirect:/goal"; } else { return "redirect:/goal/record"; } - + } @SessionCheck diff --git a/src/main/resources/templates/goal_view.html b/src/main/resources/templates/goal_view.html index a7b89ea..26ecdd4 100644 --- a/src/main/resources/templates/goal_view.html +++ b/src/main/resources/templates/goal_view.html @@ -3,6 +3,7 @@ + 目標詳細 @@ -11,14 +12,13 @@ -
+

目標詳細

-

@@ -30,30 +30,28 @@
-
+
-
+
- -
    @@ -114,6 +119,7 @@
    +
    +
    @@ -155,26 +162,29 @@
    + +
    + +
    -
@@ -186,6 +196,7 @@ +
- +