From 0162f2f679a0336e25085abe6353114de0010766 Mon Sep 17 00:00:00 2001 From: kkazuya Date: Tue, 29 Sep 2026 11:19:37 +0900 Subject: [PATCH 1/5] =?UTF-8?q?[EDIT]=20=E3=82=B3=E3=83=BC=E3=82=B9?= =?UTF-8?q?=E4=BD=9C=E6=88=90=E3=81=A7=E3=80=81=E9=85=8D=E5=88=86=E3=81=AE?= =?UTF-8?q?=E5=90=88=E8=A8=88=E3=81=8C100=EF=BC=85=E3=81=A7=E3=81=AA?= =?UTF-8?q?=E3=81=84=E3=81=A8=E7=99=BB=E9=8C=B2=E3=81=A7=E3=81=8D=E3=81=AA?= =?UTF-8?q?=E3=81=84=E3=82=88=E3=81=86=E3=81=AB=E4=BF=AE=E6=AD=A3=E3=81=97?= =?UTF-8?q?=E3=81=BE=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/CourseController.java | 9 --- .../resources/templates/course_create.html | 2 +- .../templates/course_create_ratio.html | 70 ++++++++++--------- 3 files changed, 38 insertions(+), 43 deletions(-) diff --git a/src/main/java/com/example/demo/app/presentation/controller/CourseController.java b/src/main/java/com/example/demo/app/presentation/controller/CourseController.java index 6166a96..a9b92e4 100644 --- a/src/main/java/com/example/demo/app/presentation/controller/CourseController.java +++ b/src/main/java/com/example/demo/app/presentation/controller/CourseController.java @@ -125,15 +125,6 @@ public class CourseController { List allocationModelList = new ArrayList<>(); - allocationModelList.add(new AllocationModel(allocationFormList.getCategoryId1(), - (Long) session.getAttribute(PageReturnAttributeKeyword.COURSE_ID), - allocationFormList.getAllocationRatio1())); - allocationModelList.add(new AllocationModel(allocationFormList.getCategoryId2(), - (Long) session.getAttribute(PageReturnAttributeKeyword.COURSE_ID), - allocationFormList.getAllocationRatio2())); - allocationModelList.add(new AllocationModel(allocationFormList.getCategoryId3(), - (Long) session.getAttribute(PageReturnAttributeKeyword.COURSE_ID), - allocationFormList.getAllocationRatio3())); allocationModelList.add(new AllocationModel(allocationFormList.getCategoryId4(), (Long) session.getAttribute(PageReturnAttributeKeyword.COURSE_ID), allocationFormList.getAllocationRatio4())); diff --git a/src/main/resources/templates/course_create.html b/src/main/resources/templates/course_create.html index dd2f12a..6a1257d 100644 --- a/src/main/resources/templates/course_create.html +++ b/src/main/resources/templates/course_create.html @@ -23,7 +23,7 @@
- +

diff --git a/src/main/resources/templates/course_create_ratio.html b/src/main/resources/templates/course_create_ratio.html index 0ec7ccb..ad7df48 100644 --- a/src/main/resources/templates/course_create_ratio.html +++ b/src/main/resources/templates/course_create_ratio.html @@ -22,86 +22,70 @@
-
- - -
- -
- -
- - -
- -
- -
- - -
- -
-
- +

- +

- +

- +

- +

- +

- +

- + +
+ +
+ +

- +
@@ -110,7 +94,27 @@
- + + From 18c51d3a6528f46ab406c4fc0bcb097a4363a13b Mon Sep 17 00:00:00 2001 From: kkazuya Date: Tue, 29 Sep 2026 11:22:41 +0900 Subject: [PATCH 2/5] =?UTF-8?q?[FIX]=20=E3=82=AB=E3=83=86=E3=82=B4?= =?UTF-8?q?=E3=83=AA=E3=83=BC=E7=99=BB=E9=8C=B2=E3=81=AE=E9=9A=9B=E3=80=81?= =?UTF-8?q?=E3=82=AB=E3=83=86=E3=82=B4=E3=83=AA=E3=83=BC=E5=90=8D=E3=81=A8?= =?UTF-8?q?=E5=8F=8E=E6=94=AF=E5=8C=BA=E5=88=86=E3=81=AE=E5=85=A5=E5=8A=9B?= =?UTF-8?q?=E3=82=92=E5=BF=85=E9=A0=88=E3=81=AB=E3=81=97=E3=81=BE=E3=81=97?= =?UTF-8?q?=E3=81=9F=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/templates/category_create.html | 4 ++-- src/main/resources/templates/category_update.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/resources/templates/category_create.html b/src/main/resources/templates/category_create.html index 3a42e92..e91ecd6 100644 --- a/src/main/resources/templates/category_create.html +++ b/src/main/resources/templates/category_create.html @@ -25,7 +25,7 @@
- +

@@ -33,7 +33,7 @@
- diff --git a/src/main/resources/templates/category_update.html b/src/main/resources/templates/category_update.html index f69ad72..71497e2 100644 --- a/src/main/resources/templates/category_update.html +++ b/src/main/resources/templates/category_update.html @@ -25,7 +25,7 @@
- +

@@ -33,7 +33,7 @@
- From cb5d228db4a5a10bb96d9c4079c2bee0407a1f62 Mon Sep 17 00:00:00 2001 From: kkazuya Date: Tue, 29 Sep 2026 12:40:17 +0900 Subject: [PATCH 3/5] =?UTF-8?q?[EDIT]=20=E5=8F=8E=E6=94=AF=E5=8C=BA?= =?UTF-8?q?=E5=88=86=E3=81=AE=E5=80=A4=E3=81=AB=E3=81=A4=E3=81=84=E3=81=A6?= =?UTF-8?q?=E3=80=81=E6=94=AF=E5=87=BA=E3=81=8C0=E3=80=81=E5=8F=8E?= =?UTF-8?q?=E5=85=A5=E3=81=8C1=E3=81=AB=E3=81=AA=E3=81=A3=E3=81=A6?= =?UTF-8?q?=E3=81=84=E3=81=AA=E3=81=8B=E3=81=A3=E3=81=9F=E7=AE=87=E6=89=80?= =?UTF-8?q?=E3=82=92=E4=BF=AE=E6=AD=A3=E3=81=97=E3=81=BE=E3=81=97=E3=81=9F?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/templates/fixed_cost_create.html | 10 +++++----- src/main/resources/templates/transaction_create.html | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/main/resources/templates/fixed_cost_create.html b/src/main/resources/templates/fixed_cost_create.html index c6397e9..0c478d1 100644 --- a/src/main/resources/templates/fixed_cost_create.html +++ b/src/main/resources/templates/fixed_cost_create.html @@ -40,8 +40,8 @@
@@ -70,7 +70,7 @@
-
@@ -94,7 +94,7 @@ transactionType.addEventListener("change", function () { - if (this.value === "1") { + if (this.value === "0") { for (let i = 0; i < expenseList.length; i++) { expenseList[i].style.display = ""; @@ -104,7 +104,7 @@ incomeList[i].style.display = "none"; } - } else if (this.value === "2") { + } else if (this.value === "1") { for (let i = 0; i < expenseList.length; i++) { expenseList[i].style.display = "none"; diff --git a/src/main/resources/templates/transaction_create.html b/src/main/resources/templates/transaction_create.html index 760047b..8f06bd9 100644 --- a/src/main/resources/templates/transaction_create.html +++ b/src/main/resources/templates/transaction_create.html @@ -45,11 +45,11 @@ 選択してください - - @@ -124,15 +124,15 @@ const tType = '[[${session.tType}]]'; if (tType == "0") { - transactionType.value = 1; + transactionType.value = 0; } else { - transactionType.value = 2; + transactionType.value = 1; } transactionType.addEventListener("change", function () { - if (this.value === "1") { + if (this.value === "0") { for (let i = 0; i < expenseList.length; i++) { expenseList[i].style.display = ""; @@ -142,7 +142,7 @@ incomeList[i].style.display = "none"; } - } else if (this.value === "2") { + } else if (this.value === "1") { for (let i = 0; i < expenseList.length; i++) { expenseList[i].style.display = "none"; From fb031e5255fd649b029933282ffb57b0c3d53d43 Mon Sep 17 00:00:00 2001 From: kkazuya Date: Tue, 29 Sep 2026 12:42:23 +0900 Subject: [PATCH 4/5] =?UTF-8?q?[EDIT]=20=E7=9B=AE=E6=A8=99=E5=90=8D?= =?UTF-8?q?=E3=81=A8=E7=9B=AE=E6=A8=99=E8=AA=AC=E6=98=8E=E5=85=A5=E5=8A=9B?= =?UTF-8?q?=E6=AC=84=E3=81=AErequired=E3=82=92=E5=A4=96=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 --- src/main/resources/templates/goal_create.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/resources/templates/goal_create.html b/src/main/resources/templates/goal_create.html index 2057470..d3d8de2 100644 --- a/src/main/resources/templates/goal_create.html +++ b/src/main/resources/templates/goal_create.html @@ -26,12 +26,12 @@
- +
- +
From 104fa5e3191b87865df5da9287f4ec7fcc3d6d01 Mon Sep 17 00:00:00 2001 From: kkazuya Date: Tue, 29 Sep 2026 12:44:56 +0900 Subject: [PATCH 5/5] =?UTF-8?q?[EDIT]=20SessionKeyWord=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0=E3=81=97=E3=81=BE=E3=81=97=E3=81=9F=E3=80=82=E3=82=B3?= =?UTF-8?q?=E3=83=B3=E3=83=88=E3=83=AD=E3=83=BC=E3=83=A9=E5=81=B4=E3=81=A7?= =?UTF-8?q?=E3=81=9D=E3=82=8C=E3=82=92=E5=8F=82=E7=85=A7=E3=81=99=E3=82=8B?= =?UTF-8?q?=E3=82=88=E3=81=86=E4=BF=AE=E6=AD=A3=E3=81=97=E3=81=BE=E3=81=97?= =?UTF-8?q?=E3=81=9F=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/TransactionController.java | 4 ++-- .../presentation/controller/UserController.java | 15 ++++++--------- .../controller/pageproperty/SessionKeyword.java | 6 ++++++ 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/example/demo/app/presentation/controller/TransactionController.java b/src/main/java/com/example/demo/app/presentation/controller/TransactionController.java index b81c0ff..7a0f253 100644 --- a/src/main/java/com/example/demo/app/presentation/controller/TransactionController.java +++ b/src/main/java/com/example/demo/app/presentation/controller/TransactionController.java @@ -238,8 +238,8 @@ public class TransactionController { model.addAttribute(PageReturnAttributeKeyword.TRANSACTION_FORM, transactionForm); - session.setAttribute("tType", String.valueOf(transactionForm.getTransactionType())); - + session.setAttribute(SessionKeyword.T_TYPE, String.valueOf(transactionForm.getTransactionType())); + model.addAttribute(PageReturnAttributeKeyword.CATEGORY_FORM_LIST, categoryFormList); model.addAttribute(PageReturnAttributeKeyword.TODAY, today.format(DateTimeFormatter.ISO_LOCAL_DATE)); diff --git a/src/main/java/com/example/demo/app/presentation/controller/UserController.java b/src/main/java/com/example/demo/app/presentation/controller/UserController.java index 2c3eb8e..d09f9ae 100644 --- a/src/main/java/com/example/demo/app/presentation/controller/UserController.java +++ b/src/main/java/com/example/demo/app/presentation/controller/UserController.java @@ -16,6 +16,7 @@ import com.example.demo.app.domain.service.QuestionService; import com.example.demo.app.domain.service.UserService; import com.example.demo.app.infra.entity.QuestionEntity; import com.example.demo.app.presentation.controller.pageproperty.PageReturnAttributeKeyword; +import com.example.demo.app.presentation.controller.pageproperty.SessionKeyword; import com.example.demo.app.presentation.controller.pageproperty.TransitionTargetPageNameKeyword; import com.example.demo.app.presentation.form.UserForm; @@ -58,7 +59,7 @@ public class UserController { model.addAttribute(PageReturnAttributeKeyword.SELECTED_COURSE_NAME, courseService.findById(courseId).getCourseName()); } - session.setAttribute(PageReturnAttributeKeyword.SELECTED_COURSE_NAME, courseService.findById(courseId).getCourseName()); + session.setAttribute(SessionKeyword.SELECTED_COURSE_NAME, courseService.findById(courseId).getCourseName()); model.addAttribute(PageReturnAttributeKeyword.COURSE_ID, courseId); model.addAttribute(PageReturnAttributeKeyword.USER_FORM, userForm); @@ -70,11 +71,9 @@ public class UserController { String selectedCourseName, Model model, HttpSession session) { - model.addAttribute(PageReturnAttributeKeyword.SELECTED_COURSE_NAME, (String) session.getAttribute("selectedCourseName")); + model.addAttribute(PageReturnAttributeKeyword.SELECTED_COURSE_NAME, (String) session.getAttribute(SessionKeyword.SELECTED_COURSE_NAME)); - session.setAttribute("questionId", userForm.getSecretQuestionId()); - - System.out.println("return questionId: ****************************:" + userForm.getSecretQuestionId()); + session.setAttribute(SessionKeyword.QUESTION_ID, userForm.getSecretQuestionId()); return TransitionTargetPageNameKeyword.USER_RESISTER_CONFIRM_HTML; @@ -86,11 +85,9 @@ public class UserController { Model model, HttpSession session) { - Long courseId = courseService.findByName((String) session.getAttribute(PageReturnAttributeKeyword.SELECTED_COURSE_NAME)); + Long courseId = courseService.findByName((String) session.getAttribute(SessionKeyword.SELECTED_COURSE_NAME)); - Long questionId = (Long) session.getAttribute("questionId"); - - System.out.println("confirm questionId: ****************************:" + questionId); + Long questionId = (Long) session.getAttribute(SessionKeyword.QUESTION_ID); userForm.setSecretQuestionId(questionId); diff --git a/src/main/java/com/example/demo/app/presentation/controller/pageproperty/SessionKeyword.java b/src/main/java/com/example/demo/app/presentation/controller/pageproperty/SessionKeyword.java index b9ee3cc..ca9f1dd 100644 --- a/src/main/java/com/example/demo/app/presentation/controller/pageproperty/SessionKeyword.java +++ b/src/main/java/com/example/demo/app/presentation/controller/pageproperty/SessionKeyword.java @@ -3,4 +3,10 @@ package com.example.demo.app.presentation.controller.pageproperty; public class SessionKeyword { // SESSION情報として格納したいログイン者の情報 public static final String LOGIN_USER = "loginUser"; + + public static final String SELECTED_COURSE_NAME = "selectedCourseName"; + + public static final String QUESTION_ID = "questionId"; + + public static final String T_TYPE = "tType"; }