From d291306599b412674b1e1836e051d4b941b5e5b0 Mon Sep 17 00:00:00 2001 From: kkazuya Date: Tue, 29 Sep 2026 14:47:37 +0900 Subject: [PATCH 1/8] =?UTF-8?q?[FIX]=20=E5=8F=96=E5=BC=95=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E7=94=BB=E9=9D=A2=E3=81=AE=E3=82=AB=E3=83=86=E3=82=B4?= =?UTF-8?q?=E3=83=AA=E8=A1=A8=E7=A4=BA=E4=B8=8D=E5=82=99=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3=E3=81=97=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/TransactionController.java | 19 ++++ .../templates/transaction_update.html | 93 ++++++++++++++++--- 2 files changed, 100 insertions(+), 12 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 7a0f253..d1e79fb 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 @@ -297,6 +297,23 @@ public class TransactionController { transactionService.findMoneyRecord(transactionId), CategoryForm.convertFrom(categoryService.findByTransactionId(transactionId)).getTransactionType()); + List expenseList = new ArrayList(); + + List incomeList = new ArrayList(); + + for (CategoryForm categoryForm : categoryFormList) { + + if (categoryForm.getTransactionType() == 0) { + expenseList.add(categoryForm); + } else { + incomeList.add(categoryForm); + } + + } + + model.addAttribute(PageReturnAttributeKeyword.EXPENSE_LIST, expenseList); + model.addAttribute(PageReturnAttributeKeyword.INCOME_LIST, incomeList); + model.addAttribute(PageReturnAttributeKeyword.TRANSACTION_ID, transactionId); model.addAttribute(PageReturnAttributeKeyword.TRANSACTION_FORM, transactionForm); @@ -304,6 +321,8 @@ public class TransactionController { model.addAttribute(PageReturnAttributeKeyword.CATEGORY_FORM_LIST, categoryFormList); model.addAttribute(PageReturnAttributeKeyword.TODAY, today); + + session.setAttribute(SessionKeyword.T_TYPE, transactionForm.getTransactionType()); return TransitionTargetPageNameKeyword.TRANSACTION_UPDATE_HTML; diff --git a/src/main/resources/templates/transaction_update.html b/src/main/resources/templates/transaction_update.html index 3817ee4..d9d54e7 100644 --- a/src/main/resources/templates/transaction_update.html +++ b/src/main/resources/templates/transaction_update.html @@ -83,21 +83,36 @@ カテゴリ - + + @@ -141,6 +156,60 @@
+ + + \ No newline at end of file From a911eaabc58edf2d2c15285b66718945d73f28b5 Mon Sep 17 00:00:00 2001 From: s-choi Date: Tue, 29 Sep 2026 15:07:10 +0900 Subject: [PATCH 2/8] =?UTF-8?q?[EDIT]=20courseId=E3=81=AB=E3=82=88?= =?UTF-8?q?=E3=82=8B=E5=89=8A=E9=99=A4=E3=82=AF=E3=82=A8=E3=83=AA=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0=E3=81=97=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 --- .../demo/app/infra/repository/AllocationRepository.java | 5 +++++ .../demo/app/infra/repository/CourseOwnerRepository.java | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/src/main/java/com/example/demo/app/infra/repository/AllocationRepository.java b/src/main/java/com/example/demo/app/infra/repository/AllocationRepository.java index 28656c2..9546e16 100644 --- a/src/main/java/com/example/demo/app/infra/repository/AllocationRepository.java +++ b/src/main/java/com/example/demo/app/infra/repository/AllocationRepository.java @@ -3,6 +3,7 @@ package com.example.demo.app.infra.repository; import java.util.List; import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; import com.example.demo.app.domain.model.CourseInfoModel; @@ -28,5 +29,9 @@ public interface AllocationRepository extends JpaRepository findAllJoinedAllocation(); + + @Modifying + @Query("delete from AllocationEntity a where a.courseEntity.courseId = :courseId") + void deleteByCourseId(Long courseId); } diff --git a/src/main/java/com/example/demo/app/infra/repository/CourseOwnerRepository.java b/src/main/java/com/example/demo/app/infra/repository/CourseOwnerRepository.java index 0d387cc..0f0cee9 100644 --- a/src/main/java/com/example/demo/app/infra/repository/CourseOwnerRepository.java +++ b/src/main/java/com/example/demo/app/infra/repository/CourseOwnerRepository.java @@ -1,9 +1,15 @@ package com.example.demo.app.infra.repository; import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Modifying; +import org.springframework.data.jpa.repository.Query; import com.example.demo.app.infra.entity.CourseOwnerEntity; public interface CourseOwnerRepository extends JpaRepository{ + @Modifying + @Query("delete from CourseOwnerEntity c where c.courseEntity.courseId = :courseId") + public void deleteByCourseId(Long courseId); + } From fa0bfa7c90d62b83d539cba6f1ad7abbcf2a399e Mon Sep 17 00:00:00 2001 From: s-choi Date: Tue, 29 Sep 2026 15:07:58 +0900 Subject: [PATCH 3/8] =?UTF-8?q?[FIX]=20=E9=85=8D=E5=88=86=E3=81=BE?= =?UTF-8?q?=E3=81=A7=E5=85=A5=E5=8A=9B=E3=81=97=E3=81=A6=E3=82=82=E3=82=89?= =?UTF-8?q?=E3=81=A3=E3=81=9F=E3=81=82=E3=81=A8=E3=80=81=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E3=81=95=E3=82=8C=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3=E3=81=97=E3=81=BE=E3=81=97=E3=81=9F=E3=80=82=E3=82=B3?= =?UTF-8?q?=E3=83=BC=E3=82=B9=E5=89=8A=E9=99=A4=E6=A9=9F=E8=83=BD=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0=E3=81=97=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 --- .../app/domain/service/CourseService.java | 5 +- .../service/impl/CourseServiceImpl.java | 119 ++++++++++++++---- .../controller/CourseController.java | 63 +++++----- 3 files changed, 129 insertions(+), 58 deletions(-) diff --git a/src/main/java/com/example/demo/app/domain/service/CourseService.java b/src/main/java/com/example/demo/app/domain/service/CourseService.java index f49459c..a7cbd11 100644 --- a/src/main/java/com/example/demo/app/domain/service/CourseService.java +++ b/src/main/java/com/example/demo/app/domain/service/CourseService.java @@ -3,6 +3,7 @@ package com.example.demo.app.domain.service; import java.util.List; import com.example.demo.app.domain.model.CourseModel; +import com.example.demo.app.presentation.form.AllocationFormList; public interface CourseService { @@ -12,12 +13,14 @@ public interface CourseService { public Long findByName(String courName); - public CourseModel save(CourseModel courseModel, Long userId); + public CourseModel save(CourseModel courseModel, Long userId, AllocationFormList allocationFormList); public List findAllByUserId(Long userId); public List findAllByNull(); + public String deleteCourse(Long courseId, Long userId); + } diff --git a/src/main/java/com/example/demo/app/domain/service/impl/CourseServiceImpl.java b/src/main/java/com/example/demo/app/domain/service/impl/CourseServiceImpl.java index cdba07c..59e0f99 100644 --- a/src/main/java/com/example/demo/app/domain/service/impl/CourseServiceImpl.java +++ b/src/main/java/com/example/demo/app/domain/service/impl/CourseServiceImpl.java @@ -7,14 +7,19 @@ import jakarta.transaction.Transactional; import org.springframework.stereotype.Service; +import com.example.demo.app.domain.model.AllocationModel; import com.example.demo.app.domain.model.CourseModel; import com.example.demo.app.domain.service.CourseService; +import com.example.demo.app.infra.entity.AllocationEntity; import com.example.demo.app.infra.entity.CourseEntity; import com.example.demo.app.infra.entity.CourseOwnerEntity; import com.example.demo.app.infra.entity.UserEntity; +import com.example.demo.app.infra.repository.AllocationRepository; +import com.example.demo.app.infra.repository.CategoryRepository; import com.example.demo.app.infra.repository.CourseOwnerRepository; import com.example.demo.app.infra.repository.CourseRepository; import com.example.demo.app.infra.repository.UserRepository; +import com.example.demo.app.presentation.form.AllocationFormList; import lombok.RequiredArgsConstructor; @@ -22,53 +27,121 @@ import lombok.RequiredArgsConstructor; @RequiredArgsConstructor public class CourseServiceImpl implements CourseService { + private final AllocationRepository allocationRepository; + private final CourseRepository courseRepository; private final UserRepository userRepository; private final CourseOwnerRepository courseOwnerRepository; - - public List findAll(){ - + private final CategoryRepository categoryRepository; + + public List findAll() { + return CourseEntity.createCourseModelList(courseRepository.findAll()); } - - public List findAllByUserId(Long userId) { - + + public List findAllByUserId(Long userId) { + return CourseModel.convertFrom(courseRepository.findAllByUserId(userId)); } - + public List findAllByNull() { return CourseModel.convertFrom(courseRepository.findAllByNull()); } - + public CourseModel findById(Long courseId) { return CourseModel.convertFrom(courseRepository.findByCourseId(courseId)); } - + public Long findByName(String courseName) { return courseRepository.findByCourseName(courseName).getCourseId(); } - + @Transactional - public CourseModel save(CourseModel courseModel, Long userId) { - - List userEntityList = new ArrayList<>(); - userEntityList.add(userRepository.findById(userId).get()); - CourseEntity result = courseRepository.save( CourseModel.convertTo(courseModel)); - + public CourseModel save(CourseModel courseModel, Long userId, AllocationFormList allocationFormList) { + + List userEntityList = new ArrayList<>(); + userEntityList.add(userRepository.findById(userId).get()); + CourseEntity result = courseRepository.save(CourseModel.convertTo(courseModel)); + + List allocationModelList = new ArrayList<>(); + + allocationModelList.add(new AllocationModel(allocationFormList.getCategoryId4(), + result.getCourseId(), + allocationFormList.getAllocationRatio4())); + allocationModelList.add(new AllocationModel(allocationFormList.getCategoryId5(), + result.getCourseId(), + allocationFormList.getAllocationRatio5())); + allocationModelList.add(new AllocationModel(allocationFormList.getCategoryId6(), + result.getCourseId(), + allocationFormList.getAllocationRatio6())); + allocationModelList.add(new AllocationModel(allocationFormList.getCategoryId7(), + result.getCourseId(), + allocationFormList.getAllocationRatio7())); + allocationModelList.add(new AllocationModel(allocationFormList.getCategoryId8(), + result.getCourseId(), + allocationFormList.getAllocationRatio8())); + allocationModelList.add(new AllocationModel(allocationFormList.getCategoryId9(), + result.getCourseId(), + allocationFormList.getAllocationRatio9())); + allocationModelList.add(new AllocationModel(allocationFormList.getCategoryId10(), + result.getCourseId(), + allocationFormList.getAllocationRatio10())); + allocationModelList.add(new AllocationModel(allocationFormList.getCategoryId11(), + result.getCourseId(), + allocationFormList.getAllocationRatio11())); + + allocationModelList.stream().forEach(allocation -> { + System.out.println(allocation.getCourseId()); + }); + UserEntity user = userRepository.findById(userId).orElse(null); - + user.setCourseEntity(result); - + UserEntity userResult = userRepository.save(user); - + CourseOwnerEntity courseOwnerEntity = new CourseOwnerEntity(); courseOwnerEntity.setUserEntity(userResult); courseOwnerEntity.setCourseEntity(result); - + courseOwnerRepository.save(courseOwnerEntity); - + + List allocationEntityList = new ArrayList<>(); + + allocationModelList.forEach(allocationModel -> { + allocationEntityList.add( + AllocationModel.convertTo( + categoryRepository.findById(allocationModel.getCategoryId()).get(), + courseRepository.findById(allocationModel.getCourseId()).get(), + allocationModel.getAllocationRatio())); + + }); + + List resultList = new ArrayList<>(); + for (AllocationEntity allocationEntity : allocationEntityList) { + resultList.add(AllocationModel.convertFrom(allocationRepository.save(allocationEntity))); + } + return CourseModel.convertFrom(result); - - + + } + + @Transactional + public String deleteCourse(Long courseId, Long userId) { + + UserEntity userEntity = userRepository.findById(userId).orElse(null); + System.out.println("***********************ここでエラー1"); + if (userEntity.getCourseEntity().getCourseId() == courseId) { + return "selected"; + } + System.out.println("***********************ここでエラー2"); + allocationRepository.deleteByCourseId(courseId); + System.out.println("***********************ここでエラー3"); + courseOwnerRepository.deleteByCourseId(courseId); + System.out.println("***********************ここでエラー4"); + courseRepository.deleteById(courseId); + System.out.println("***********************ここでエラー5"); + return "ok"; + } } 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 a9b92e4..7f047ba 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 @@ -13,7 +13,6 @@ import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestParam; import com.example.demo.aop.aspect.SessionCheck; -import com.example.demo.app.domain.model.AllocationModel; import com.example.demo.app.domain.model.CourseModel; import com.example.demo.app.domain.model.LoginModel; import com.example.demo.app.domain.service.AllocationService; @@ -111,48 +110,44 @@ public class CourseController { LoginModel loginUser = (LoginModel) session.getAttribute(SessionKeyword.LOGIN_USER); - CourseForm form = CourseForm - .convertFrom(courseService.save(CourseForm.convertTo(courseForm), loginUser.getUserId())); - - session.setAttribute(PageReturnAttributeKeyword.COURSE_ID, form.getCourseId()); + model.addAttribute("courseForm", courseForm); return TransitionTargetPageNameKeyword.COURSE_CREATE_RATIO_HTML; } @SessionCheck @PostMapping(TransitionTargetPageNameKeyword.COURSE_CREATE) - public String createCoursePost(@ModelAttribute AllocationFormList allocationFormList, HttpSession session) { + public String createCoursePost(@ModelAttribute CourseForm courseForm, + @ModelAttribute AllocationFormList allocationFormList, HttpSession session) { + LoginModel loginUser = (LoginModel) session.getAttribute(SessionKeyword.LOGIN_USER); - List allocationModelList = new ArrayList<>(); - - allocationModelList.add(new AllocationModel(allocationFormList.getCategoryId4(), - (Long) session.getAttribute(PageReturnAttributeKeyword.COURSE_ID), - allocationFormList.getAllocationRatio4())); - allocationModelList.add(new AllocationModel(allocationFormList.getCategoryId5(), - (Long) session.getAttribute(PageReturnAttributeKeyword.COURSE_ID), - allocationFormList.getAllocationRatio5())); - allocationModelList.add(new AllocationModel(allocationFormList.getCategoryId6(), - (Long) session.getAttribute(PageReturnAttributeKeyword.COURSE_ID), - allocationFormList.getAllocationRatio6())); - allocationModelList.add(new AllocationModel(allocationFormList.getCategoryId7(), - (Long) session.getAttribute(PageReturnAttributeKeyword.COURSE_ID), - allocationFormList.getAllocationRatio7())); - allocationModelList.add(new AllocationModel(allocationFormList.getCategoryId8(), - (Long) session.getAttribute(PageReturnAttributeKeyword.COURSE_ID), - allocationFormList.getAllocationRatio8())); - allocationModelList.add(new AllocationModel(allocationFormList.getCategoryId9(), - (Long) session.getAttribute(PageReturnAttributeKeyword.COURSE_ID), - allocationFormList.getAllocationRatio9())); - allocationModelList.add(new AllocationModel(allocationFormList.getCategoryId10(), - (Long) session.getAttribute(PageReturnAttributeKeyword.COURSE_ID), - allocationFormList.getAllocationRatio10())); - allocationModelList.add(new AllocationModel(allocationFormList.getCategoryId11(), - (Long) session.getAttribute(PageReturnAttributeKeyword.COURSE_ID), - allocationFormList.getAllocationRatio11())); - - allocationService.save(allocationModelList); + courseService.save(CourseForm.convertTo(courseForm), loginUser.getUserId(), allocationFormList); return TransitionTargetPageNameKeyword.REDIRECT + TransitionTargetPageNameKeyword.COURSE; } + @SessionCheck + @PostMapping("/course/delete") + public String createCoursePost(@RequestParam Long courseId, HttpSession session, Model model) { + + LoginModel loginUser = (LoginModel) session.getAttribute(SessionKeyword.LOGIN_USER); + + System.out.println("**********************cousrId: " + courseId); + String condition = courseService.deleteCourse(courseId, loginUser.getUserId()); + + if (condition.equals("selected")) { + + model.addAttribute("message", "適用中のコースは選べません"); + + return TransitionTargetPageNameKeyword.REDIRECT + TransitionTargetPageNameKeyword.COURSE; + + } else if (condition.equals("ok")) { + return TransitionTargetPageNameKeyword.REDIRECT + TransitionTargetPageNameKeyword.COURSE; + } + model.addAttribute("message", "エラーが発生しました"); + + return TransitionTargetPageNameKeyword.REDIRECT + TransitionTargetPageNameKeyword.COURSE; + + } + } \ No newline at end of file From 7299ee0d060cfaafe05c29fcf59f15b7b738759c Mon Sep 17 00:00:00 2001 From: s-choi Date: Tue, 29 Sep 2026 15:08:16 +0900 Subject: [PATCH 4/8] =?UTF-8?q?[EDIT]=20=E4=BD=99=E8=A8=88=E3=81=AA?= =?UTF-8?q?=E6=A9=9F=E8=83=BD=E3=82=92=E5=89=8A=E9=99=A4=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 --- .../app/domain/service/AllocationService.java | 2 -- .../service/impl/AllocationServiceImpl.java | 22 ------------------- 2 files changed, 24 deletions(-) diff --git a/src/main/java/com/example/demo/app/domain/service/AllocationService.java b/src/main/java/com/example/demo/app/domain/service/AllocationService.java index 753a356..1f922cc 100644 --- a/src/main/java/com/example/demo/app/domain/service/AllocationService.java +++ b/src/main/java/com/example/demo/app/domain/service/AllocationService.java @@ -8,6 +8,4 @@ public interface AllocationService { public List findAll(); - public List save(List allocationModelList); - } diff --git a/src/main/java/com/example/demo/app/domain/service/impl/AllocationServiceImpl.java b/src/main/java/com/example/demo/app/domain/service/impl/AllocationServiceImpl.java index 5f18d33..d2d836c 100644 --- a/src/main/java/com/example/demo/app/domain/service/impl/AllocationServiceImpl.java +++ b/src/main/java/com/example/demo/app/domain/service/impl/AllocationServiceImpl.java @@ -1,6 +1,5 @@ package com.example.demo.app.domain.service.impl; -import java.util.ArrayList; import java.util.List; import org.springframework.stereotype.Service; @@ -26,26 +25,5 @@ public class AllocationServiceImpl implements AllocationService { return AllocationEntity.createAllocationModelList(allocationRepository.findAll()); } - public List save(List allocationModelList) { - - List allocationEntityList = new ArrayList<>(); - - allocationModelList.forEach(allocationModel -> { - allocationEntityList.add( - AllocationModel.convertTo( - categoryRepository.findById(allocationModel.getCategoryId()).get(), - courseRepository.findById(allocationModel.getCourseId()).get(), - allocationModel.getAllocationRatio())); - - }); - - List result = new ArrayList<>(); - for (AllocationEntity allocationEntity : allocationEntityList) { - result.add(AllocationModel.convertFrom(allocationRepository.save(allocationEntity))); - } - - - return result; - } } From 515c789399fd8e6ba307e4d5016dfd08ee247c14 Mon Sep 17 00:00:00 2001 From: s-choi Date: Tue, 29 Sep 2026 15:08:49 +0900 Subject: [PATCH 5/8] =?UTF-8?q?[EDIT]=20=E3=82=B3=E3=83=BC=E3=82=B9?= =?UTF-8?q?=E3=81=AE=E6=83=85=E5=A0=B1=E3=82=92=E9=85=8D=E5=88=86=E5=85=A5?= =?UTF-8?q?=E5=8A=9B=E7=94=BB=E9=9D=A2=E3=81=A7=E3=82=82=E6=B8=A1=E3=81=95?= =?UTF-8?q?=E3=82=8C=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=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 --- .../templates/course_create_ratio.html | 62 ++++++++++++------- 1 file changed, 38 insertions(+), 24 deletions(-) diff --git a/src/main/resources/templates/course_create_ratio.html b/src/main/resources/templates/course_create_ratio.html index ad7df48..2af2034 100644 --- a/src/main/resources/templates/course_create_ratio.html +++ b/src/main/resources/templates/course_create_ratio.html @@ -24,60 +24,66 @@
- +

- +

- +

- +

- +

- +

- +

- +
- +
@@ -88,32 +94,40 @@
- + + + + +
+ + +
+
- + From 65b4a9e54a5bc5c1d1480fd4b9255addf73628e4 Mon Sep 17 00:00:00 2001 From: s-choi Date: Tue, 29 Sep 2026 15:09:08 +0900 Subject: [PATCH 6/8] =?UTF-8?q?[EDIT]=20=E3=82=B3=E3=83=BC=E3=82=B9?= =?UTF-8?q?=E5=89=8A=E9=99=A4=E6=A9=9F=E8=83=BD=E3=82=92=E8=BF=BD=E5=8A=A0?= =?UTF-8?q?=E3=81=97=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 --- .../resources/templates/select_course.html | 42 ++++++++++++++++++- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/src/main/resources/templates/select_course.html b/src/main/resources/templates/select_course.html index 635e154..411964b 100644 --- a/src/main/resources/templates/select_course.html +++ b/src/main/resources/templates/select_course.html @@ -17,9 +17,8 @@ - -
+
@@ -32,6 +31,8 @@ aria-controls="'collapse' + ${course.courseId}"> +

@@ -58,6 +59,43 @@
+ + From 00c3041d953583a60439a6c61ffda957d6ea2941 Mon Sep 17 00:00:00 2001 From: n-kawahito Date: Tue, 29 Sep 2026 15:11:35 +0900 Subject: [PATCH 7/8] =?UTF-8?q?[FIX]=E5=8F=8E=E6=94=AF=E3=81=AE=E9=81=B8?= =?UTF-8?q?=E6=8A=9E=E3=81=AB=E5=90=88=E3=82=8F=E3=81=9B=E3=81=A6=E3=82=AB?= =?UTF-8?q?=E3=83=86=E3=82=B4=E3=83=AA=E3=81=8C=E5=87=BA=E3=82=8B=E3=82=88?= =?UTF-8?q?=E3=81=86=E3=81=AB=E3=81=97=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 --- .../templates/transaction_create.html | 84 ++++++++++--------- .../templates/transaction_update.html | 58 +++++++------ 2 files changed, 79 insertions(+), 63 deletions(-) diff --git a/src/main/resources/templates/transaction_create.html b/src/main/resources/templates/transaction_create.html index 53e3bd3..0c818e9 100644 --- a/src/main/resources/templates/transaction_create.html +++ b/src/main/resources/templates/transaction_create.html @@ -113,58 +113,66 @@
- + transactionType.addEventListener("change", function () { + + toggleCategory(); + + categoryId.value = ""; + + }); + + if (tType == "0") { + transactionType.value = "0"; + } else if (tType == "1") { + transactionType.value = "1"; + } + + toggleCategory(); + + diff --git a/src/main/resources/templates/transaction_update.html b/src/main/resources/templates/transaction_update.html index d9d54e7..845047c 100644 --- a/src/main/resources/templates/transaction_update.html +++ b/src/main/resources/templates/transaction_update.html @@ -156,7 +156,7 @@
- From 78d3042299483443ee5142587aa256ec1660b01d Mon Sep 17 00:00:00 2001 From: n-kawahito Date: Tue, 29 Sep 2026 15:13:56 +0900 Subject: [PATCH 8/8] =?UTF-8?q?[EDIT]=E3=83=9E=E3=83=BC=E3=82=B8=E8=B7=A1?= =?UTF-8?q?=E3=82=92=E6=B6=88=E3=81=97=E3=81=BE=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/templates/select_course.html | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/main/resources/templates/select_course.html b/src/main/resources/templates/select_course.html index 35a6f6b..e2a5b43 100644 --- a/src/main/resources/templates/select_course.html +++ b/src/main/resources/templates/select_course.html @@ -13,7 +13,6 @@

コース選択

-<<<<<<< HEAD
@@ -24,7 +23,6 @@ -======= @@ -32,7 +30,6 @@ ->>>>>>> 65b4a9e54a5bc5c1d1480fd4b9255addf73628e4