11 Commits

Author SHA1 Message Date
acd7534fdb Merge branch 's-choi' of https://gitea.it-college.co.jp/2026_09_5H_Spring_KIZAKI/Monegement into s-morimto
# Conflicts:
#	src/main/resources/templates/transaction_detail.html
2026-09-28 16:38:26 +09:00
ee5ec5009d Merge branch 's-choi' of https://gitea.it-college.co.jp/2026_09_5H_Spring_KIZAKI/Monegement into s-morimto 2026-09-28 15:28:53 +09:00
7604e9ee76 Merge branch 's-choi' of https://gitea.it-college.co.jp/2026_09_5H_Spring_KIZAKI/Monegement into s-morimto 2026-09-28 14:22:22 +09:00
26fa2365e8 Merge branch 's-choi' of https://gitea.it-college.co.jp/2026_09_5H_Spring_KIZAKI/Monegement into s-morimto
# Conflicts:
#	src/main/resources/templates/select_course.html
2026-09-28 09:43:26 +09:00
5adb527d7a Merge branch 's-choi' of https://gitea.it-college.co.jp/2026_09_5H_Spring_KIZAKI/Monegement into s-morimto 2026-09-25 14:23:20 +09:00
e54e0133f7 Merge branch 's-choi' of https://gitea.it-college.co.jp/2026_09_5H_Spring_KIZAKI/Monegement into s-morimto 2026-09-25 14:03:37 +09:00
c3dae348bf no message 2026-09-25 13:38:58 +09:00
ea1e18ad93 Merge branch 'k-kobayashi' of https://gitea.it-college.co.jp/2026_09_5H_Spring_KIZAKI/Monegement into s-morimto 2026-09-25 13:35:56 +09:00
bb3b8965b2 Merge branch 's-choi' of https://gitea.it-college.co.jp/2026_09_5H_Spring_KIZAKI/Monegement into s-morimto
# Conflicts:
#	src/main/resources/templates/menu.html
#	src/main/resources/templates/select_course.html
#	src/main/resources/templates/transaction_detail.html
2026-09-25 13:28:04 +09:00
3b239d07bd Merge branch 'k-kobayashi' of https://gitea.it-college.co.jp/2026_09_5H_Spring_KIZAKI/Monegement into s-morimto 2026-09-25 13:17:12 +09:00
0c54a42b97 Merge branch 'k-oshita' of https://gitea.it-college.co.jp/2026_09_5H_Spring_KIZAKI/Monegement into s-morimto
# Conflicts:
#	src/main/resources/templates/menu.html
#	src/main/resources/templates/transaction_detail.html
2026-09-25 13:14:52 +09:00
38 changed files with 211 additions and 239 deletions

View File

@@ -10,7 +10,6 @@ import org.aspectj.lang.annotation.Pointcut;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.example.demo.app.presentation.controller.pageproperty.SessionKeyword;
import com.example.demo.exception.NoSessionException;
@@ -33,7 +32,7 @@ public class SessionCheckAspect {
public void checkSession() {
HttpSession session = request.getSession(false);
if (session == null || session.getAttribute(SessionKeyword.LOGIN_USER) == null) {
if (session == null || session.getAttribute("loginUser") == null) {
throw new NoSessionException("不正なログインです");
}

View File

@@ -12,8 +12,6 @@ import org.springframework.web.HttpRequestMethodNotSupportedException;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import com.example.demo.app.presentation.controller.pageproperty.PageReturnAttributeKeyword;
import com.example.demo.app.presentation.controller.pageproperty.TransitionTargetPageNameKeyword;
import com.example.demo.exception.NoSessionException;
@ControllerAdvice
@@ -32,18 +30,18 @@ public class GlobalExceptionHandler {
LOGGER.log(Level.SEVERE, SEVERE_ERROR_MESSAGE_ILLEGAL_TRANSITION, e);
model.addAttribute(
PageReturnAttributeKeyword.ERROR_MESSAGE,
"errorMessage",
"システムエラーが発生しました。"
+ "初めからやり直してください。");
return TransitionTargetPageNameKeyword.REDIRECT + TransitionTargetPageNameKeyword.LOGIN;
return "redirect:/login";
}
@ExceptionHandler(HttpRequestMethodNotSupportedException.class)
public String handleBadRequestException(Model model, Exception e, HttpSession session) {
model.addAttribute(PageReturnAttributeKeyword.ERROR, SEVERE_ERROR_MESSAGE_BAD_REQUEST);
model.addAttribute(PageReturnAttributeKeyword.STATUS, HttpStatus.BAD_REQUEST.value());
model.addAttribute("error", SEVERE_ERROR_MESSAGE_BAD_REQUEST);
model.addAttribute("status", HttpStatus.BAD_REQUEST.value());
e.printStackTrace();
@@ -52,16 +50,20 @@ public class GlobalExceptionHandler {
System.out.println("session invalidated");
session.invalidate();
return TransitionTargetPageNameKeyword.ERROR_HTML;
return "error";
}
@ExceptionHandler(Exception.class)
public String AllException(Model model, Exception e, HttpSession session) {
model.addAttribute("error", SEVERE_ERROR_MESSAGE_BAD_REQUEST);
e.printStackTrace();
System.out.println("session invalidated exception");
session.invalidate();
return TransitionTargetPageNameKeyword.ERROR_HTML;
LOGGER.log(Level.SEVERE, SEVERE_ERROR_MESSAGE_ILLEGAL_TRANSITION, e);
System.out.println("session invalidated");
session.invalidate();
return "error";
}
}

View File

@@ -57,7 +57,7 @@ public class GoalModel {
goalModel.getTargetAmount(),
goalModel.getDeadline(),
0,
userEntity);
userEntity, 0);
}
public static GoalModel convertFrom(GoalForm goalForm) {

View File

@@ -25,8 +25,6 @@ public class LoginServiceImpl implements LoginService {
if (userEntity == null) {
return null;
} else if (userEntity.getDeleteFlag() == 1) {
return null;
}
boolean isValidPassword = false;

View File

@@ -53,13 +53,13 @@ public class UserServiceImpl implements UserService {
userEntity.setQuestionEntity(questionEntity);
userEntity.setCourseEntity(courseEntity);
userEntity.setDeleteFlag(0);
goalEntity.setUserEntity(userRepository.save(userEntity));
goalRepository.save(goalEntity);
userRepository.save(userEntity);
}
@Override

View File

@@ -29,7 +29,7 @@ public class CategoryEntity {
@Column(name = "category_id")
private Long categoryId;
@Column(name = "category_name", nullable = false, length = 50)
@Column(name = "category_name", nullable = false)
private String categoryName;
@Column(name = "transaction_type", nullable = false)

View File

@@ -27,7 +27,7 @@ public class CourseEntity {
@Column(name = "course_id")
private Long courseId;
@Column(name = "course_name", nullable = false, length = 50)
@Column(name = "course_name", nullable = false)
private String courseName;

View File

@@ -34,7 +34,7 @@ public class FixedCostEntity {
@JoinColumn(name = "category_id")
private CategoryEntity categoryEntity;
@Column(name = "fixed_cost_name", nullable = false, length = 50)
@Column(name = "fixed_cost_name", nullable = false)
private String fixedCostName;
@Column(name = "amount", nullable = false)

View File

@@ -29,10 +29,10 @@ public class GoalEntity {
private Long goalId;
@Column(name = "goal_title", nullable = true)
private String goalTitle = "名前を設定してください";
private String goalTitle;
@Column(name = "goal_subtitle", nullable = true)
private String goalSubtitle = "説明を書いてください";
private String goalSubtitle;
@Column(name = "target_amount", nullable = true)
private Integer targetAmount;
@@ -46,5 +46,7 @@ public class GoalEntity {
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "user_id")
private UserEntity userEntity;
private Integer deleteFlag;
}

View File

@@ -1,5 +0,0 @@
package com.example.demo.app.infra.entity;
public class TestController6 {
}

View File

@@ -30,7 +30,7 @@ public class UserEntity {
@Column(name = "user_id")
private Long userId;
@Column(name = "user_name", nullable = false, length = 100)
@Column(name = "user_name", nullable = false)
private String userName;
@Column(name = "mail_address", nullable = false)
@@ -39,7 +39,7 @@ public class UserEntity {
@Column(name = "password", nullable = false)
private String password;
@Column(name = "secret_answer", nullable = false, length = 100)
@Column(name = "secret_answer", nullable = false)
private String secretQuestionAnswer;
@Column(name = "birth_date", nullable = false)

View File

@@ -125,6 +125,15 @@ public class CourseController {
List<AllocationModel> 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()));

View File

@@ -11,5 +11,4 @@ public class ErrorController {
public String showError() {
return TransitionTargetPageNameKeyword.ERROR_HTML;
}
}

View File

@@ -275,7 +275,7 @@ public class GoalController {
int currentAmount = goalService.getCurrentAmount(userId);
model.addAttribute(PageReturnAttributeKeyword.CURRENT_AMOUNT, currentAmount);
model.addAttribute("currentAmount", currentAmount);
return TransitionTargetPageNameKeyword.GOAL_CREATE_HTML;
}

View File

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

View File

@@ -238,8 +238,8 @@ public class TransactionController {
model.addAttribute(PageReturnAttributeKeyword.TRANSACTION_FORM, transactionForm);
session.setAttribute(SessionKeyword.T_TYPE, String.valueOf(transactionForm.getTransactionType()));
session.setAttribute("tType", String.valueOf(transactionForm.getTransactionType()));
model.addAttribute(PageReturnAttributeKeyword.CATEGORY_FORM_LIST, categoryFormList);
model.addAttribute(PageReturnAttributeKeyword.TODAY, today.format(DateTimeFormatter.ISO_LOCAL_DATE));

View File

@@ -16,7 +16,6 @@ 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;
@@ -59,7 +58,7 @@ public class UserController {
model.addAttribute(PageReturnAttributeKeyword.SELECTED_COURSE_NAME, courseService.findById(courseId).getCourseName());
}
session.setAttribute(SessionKeyword.SELECTED_COURSE_NAME, courseService.findById(courseId).getCourseName());
session.setAttribute(PageReturnAttributeKeyword.SELECTED_COURSE_NAME, courseService.findById(courseId).getCourseName());
model.addAttribute(PageReturnAttributeKeyword.COURSE_ID, courseId);
model.addAttribute(PageReturnAttributeKeyword.USER_FORM, userForm);
@@ -71,9 +70,11 @@ public class UserController {
String selectedCourseName, Model model,
HttpSession session) {
model.addAttribute(PageReturnAttributeKeyword.SELECTED_COURSE_NAME, (String) session.getAttribute(SessionKeyword.SELECTED_COURSE_NAME));
model.addAttribute(PageReturnAttributeKeyword.SELECTED_COURSE_NAME, (String) session.getAttribute("selectedCourseName"));
session.setAttribute(SessionKeyword.QUESTION_ID, userForm.getSecretQuestionId());
session.setAttribute("questionId", userForm.getSecretQuestionId());
System.out.println("return questionId: ****************************:" + userForm.getSecretQuestionId());
return TransitionTargetPageNameKeyword.USER_RESISTER_CONFIRM_HTML;
@@ -85,9 +86,11 @@ public class UserController {
Model model,
HttpSession session) {
Long courseId = courseService.findByName((String) session.getAttribute(SessionKeyword.SELECTED_COURSE_NAME));
Long courseId = courseService.findByName((String) session.getAttribute(PageReturnAttributeKeyword.SELECTED_COURSE_NAME));
Long questionId = (Long) session.getAttribute(SessionKeyword.QUESTION_ID);
Long questionId = (Long) session.getAttribute("questionId");
System.out.println("confirm questionId: ****************************:" + questionId);
userForm.setSecretQuestionId(questionId);

View File

@@ -4,8 +4,7 @@ public class PageReturnAttributeKeyword {
public static final String ERROR_MESSAGE = "errorMessage";
public static final String MESSAGE = "message";
public static final String ERROR = "error";
public static final String STATUS = "status";
public static final String QUESTION_LIST = "questionList";
public static final String USER_FORM = "userForm";

View File

@@ -3,10 +3,4 @@ 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";
}

View File

@@ -16,4 +16,5 @@ public class ProfileEditForm {
private Integer saving;
private Integer annualIncome;
private Integer monthlyBudget;
private LocalDate birthDate;
}

View File

@@ -35,7 +35,7 @@
<table class="table text-center">
<thead>
<tr>
<th scope="col"></th>
<th scope="col">カテゴリ別</th>
<th scope="col">支出</th>
<th scope="col">前月比</th>
</tr>

View File

@@ -25,7 +25,7 @@
<div class="mb-3">
<label class="form-label" for="categoryName">カテゴリ名</label>
<input class="form-control" type="text" id="categoryName" th:field="*{categoryName}" required>
<input class="form-control" type="text" id="categoryName" th:field="*{categoryName}">
</div>
<br>
@@ -33,7 +33,7 @@
<div class="mb-3">
<label class="form-label" for="transactionType">収入・支出</label>
<select class="form-select" id="transactionType" th:field="*{transactionType}" required>
<select class="form-select" id="transactionType" th:field="*{transactionType}">
<option value="">選択してください</option>
<option value="0">支出</option>

View File

@@ -9,13 +9,13 @@
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body style="padding-top:80px; padding-bottom:80px;">
<body class="pb-5 pt-5">
<div th:replace="~{header :: header}"></div>
<div class="main-container">
<div>
<ul class="list-unstyled p-0 m-0">
<ul>
<li class="card shadow-sm mb-3" th:each="categoryForm : ${categoryFormList}">
<div class="card-body">
<div class="d-flex justify-content-between">
@@ -49,29 +49,19 @@
</div>
<hr>
<hr>
</div>
</li>
</ul>
</div>
<div class="d-grid mt-4">
<form th:action="@{/category/create}" method="get">
<input type="hidden"
name="today"
id="today"
th:value="${today}">
<button class="btn btn-success w-100" type="submit">
新規登録
</button>
</form>
</div>
</div>
<form th:action="@{/category/create}" method="get">
<input type="hidden" name="today" id="today" th:value="${today}">
<button type="submit">新規登録</button>
</form>
<div th:replace="~{footer :: footer}"></div>
</body>

View File

@@ -25,7 +25,7 @@
<div class="mb-3">
<label class="form-label" for="categoryName">カテゴリ名</label>
<input class="form-control" type="text" id="categoryName" th:field="*{categoryName}" required>
<input class="form-control" type="text" id="categoryName" th:field="*{categoryName}">
</div>
<br>
@@ -33,7 +33,7 @@
<div class="mb-3">
<label class="form-label" for="transactionType">収入・支出</label>
<select class="form-select" id="transactionType" th:field="*{transactionType}" required>
<select class="form-select" id="transactionType" th:field="*{transactionType}">
<option value="">選択してください</option>
<option value="0">支出</option>
@@ -47,7 +47,7 @@
<input type="hidden" name="categoryId" th:value="${categoryId}">
<div class="d-grid">
<button type="submit" class="btn btn-primary">更新</button>
<button type="submit" class="btn btn-primary">登録</button>
</div>
</form>
</div>

View File

@@ -23,7 +23,7 @@
<div class="mb-3">
<label class="form-label" for="courseName">コース名</label>
<input class="form-control" type="text" id="courseName" th:field="*{courseName}" required>
<input class="form-control" type="text" id="courseName" th:field="*{courseName}">
</div>
<br>

View File

@@ -22,70 +22,86 @@
<form th:action="@{/course/create}" th:object="${allocationFormList}" method="post">
<div class="mb-3">
<label class="form-label" for="allocationRatio1">給与</label>
<input class="form-control" type="number" id="allocationRatio1" th:field="*{allocationRatio1}">
</div>
<br>
<div class="mb-3">
<label class="form-label" for="allocationRatio2">賞与</label>
<input class="form-control" type="number" id="allocationRatio2" th:field="*{allocationRatio2}">
</div>
<br>
<div class="mb-3">
<label class="form-label" for="allocationRatio3">その他</label>
<input class="form-control" type="number" id="allocationRatio3" th:field="*{allocationRatio3}">
</div>
<br>
<div class="mb-3">
<label class="form-label" for="allocationRatio4">固定費</label>
<input class="form-control" type="number" min="0" max="100" onchange="inputChange()" id="allocationRatio4" th:field="*{allocationRatio4}" required>
<input class="form-control" type="number" id="allocationRatio4" th:field="*{allocationRatio4}">
</div>
<br>
<div class="mb-3">
<label class="form-label" for="allocationRatio5">食費</label>
<input class="form-control" type="number" min="0" max="100" onchange="inputChange()" id="allocationRatio5" th:field="*{allocationRatio5}" required>
<input class="form-control" type="number" id="allocationRatio5" th:field="*{allocationRatio5}">
</div>
<br>
<div class="mb-3">
<label class="form-label" for="allocationRatio6">交通費</label>
<input class="form-control" type="number" min="0" max="100" onchange="inputChange()" id="allocationRatio6" th:field="*{allocationRatio6}" required>
<input class="form-control" type="number" id="allocationRatio6" th:field="*{allocationRatio6}">
</div>
<br>
<div class="mb-3">
<label class="form-label" for="allocationRatio7">日用品費</label>
<input class="form-control" type="number" min="0" max="100" onchange="inputChange()" id="allocationRatio7" th:field="*{allocationRatio7}" required>
<input class="form-control" type="number" id="allocationRatio7" th:field="*{allocationRatio7}">
</div>
<br>
<div class="mb-3">
<label class="form-label" for="allocationRatio8">被服/美容費</label>
<input class="form-control" type="number" min="0" max="100" onchange="inputChange()" id="allocationRatio8" th:field="*{allocationRatio8}" required>
<input class="form-control" type="number" id="allocationRatio8" th:field="*{allocationRatio8}">
</div>
<br>
<div class="mb-3">
<label class="form-label" for="allocationRatio9">医療費</label>
<input class="form-control" type="number" min="0" max="100" onchange="inputChange()" id="allocationRatio9" th:field="*{allocationRatio9}" required>
<input class="form-control" type="number" id="allocationRatio9" th:field="*{allocationRatio9}">
</div>
<br>
<div class="mb-3">
<label class="form-label" for="allocationRatio10">趣味/娯楽費</label>
<input class="form-control" type="number" min="0" max="100" onchange="inputChange()" id="allocationRatio10"
th:field="*{allocationRatio10}" required>
<input class="form-control" type="number" id="allocationRatio10"
th:field="*{allocationRatio10}">
</div>
<br>
<div class="mb-3">
<label class="form-label" for="allocationRatio11">その他</label>
<input class="form-control" type="number" min="0" max="100" onchange="inputChange()" id="allocationRatio11"
th:field="*{allocationRatio11}" required>
</div>
<div class="mb-3">
<label class="form-label" for="allocationRatioTotal">合計(%)</label>
<input class="form-control" type="number" value="0" id="allocationRatioTotal" readonly>
<input class="form-control" type="number" id="allocationRatio11"
th:field="*{allocationRatio11}">
</div>
<br>
<div class="d-grid">
<button type="submit" class="btn btn-primary" id="submit" disabled="true">登録</button>
<button type="submit" class="btn btn-primary">登録</button>
</div>
</form>
@@ -94,27 +110,7 @@
</div>
<div th:replace="~{footer :: footer}"></div>
<script>
function inputChange(){
let total=0;
for(let i=4; i<=11; i++){
total += Number(document.getElementById(`allocationRatio${i}`).value || 0);
if(total == 100){
document.getElementById('submit').disabled = false;
}else{
document.getElementById('submit').disabled = true;
}
}
document.getElementById("allocationRatioTotal").value = total;
}
</script>
</body>

View File

@@ -10,7 +10,7 @@
<link rel="stylesheet" th:href="@{/css/style.css}">
</head>
<body style="padding-top:80px; padding-bottom:80px;">
<body class="pb-5 pt-5">
<div th:replace="~{header :: header}"></div>
<div class="main-container">
@@ -19,7 +19,7 @@
<h2 class="page-title" th:text="${today}"></h2>
<div>
<ul class="list-unstyled p-0 m-0">
<ul>
<li th:each="fixedCostForm : ${fixedCostFormList}" class="card shadow-sm mb-3">
<div class="card-body">
@@ -52,29 +52,21 @@
</div>
<hr>
<hr>
</div>
</li>
</ul>
</div>
<div class="d-grid mt-4">
<form th:action="@{/category/create}" method="get">
<input type="hidden"
name="today"
id="today"
th:value="${today}">
<button class="btn btn-success w-100" type="submit">
新規登録
</button>
</form>
</div>
</ul>
</div>
<form th:action="@{/fixed-cost/create}" method="get">
<input type="hidden" name="today" id="today" th:value="${today}">
<button type="submit">新規登録</button>
</form>
<div th:replace="~{footer :: footer}"></div>
</body>

View File

@@ -40,8 +40,8 @@
<select class="form-select" id="transactionType">
<option value="">選択してください</option>
<option value="0">支出</option>
<option value="1">収入</option>
<option value="1">支出</option>
<option value="2">収入</option>
</select>
</div>
@@ -70,7 +70,7 @@
<div class="mb-3">
<label class="form-label" for="amount">金額</label>
<input class="form-control" type="number" id="amount" th:field="*{amount}" min="1" placeholder="金額を入力してください"
<input class="form-control" type="number" id="amount" th:field="*{amount}" min="0" placeholder="金額を入力してください"
required>
</div>
@@ -94,7 +94,7 @@
transactionType.addEventListener("change", function () {
if (this.value === "0") {
if (this.value === "1") {
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 === "1") {
} else if (this.value === "2") {
for (let i = 0; i < expenseList.length; i++) {
expenseList[i].style.display = "none";

View File

@@ -26,12 +26,12 @@
<div>
<label>目標名</label>
<input type="text" th:field="*{goalTitle}">
<input type="text" th:field="*{goalTitle}" required>
</div>
<div>
<label>目標説明</label>
<textarea th:field="*{goalSubtitle}"></textarea>
<textarea th:field="*{goalSubtitle}" required></textarea>
</div>
<div>
@@ -51,12 +51,9 @@
<button type="submit" class="btn btn-sm btn-primary w-100">登録</button>
</form>
</div>
</div>
</div>
<div th:replace="~{footer :: footer}"></div>
<div th:replace="~{footer :: footer}"></div>
</body>

View File

@@ -8,7 +8,7 @@
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body style="padding-top:80px; padding-bottom:80px;">
<body class="pb-5 pt-5">
<div th:replace="~{header :: header}"></div>
@@ -74,16 +74,16 @@
</ul>
</div>
<div class="d-grid mt-4">
<form th:action="@{/goal}" method="get">
<button class="btn btn-success w-100" type="submit">
戻る
</button>
</form>
</div>
</div>
<div class="d-grid mt-4">
<form th:action="@{/goal}" method="get">
<button class="btn btn-success w-100" type="submit">
戻る
</button>
</form>
</div>
</div>
<div th:replace="~{footer :: footer}"></div>

View File

@@ -189,8 +189,6 @@
</div>
<div class="d-grid gap-2 mt-4">
<form th:action="@{/goal/create}" method="get">
<button type="submit" class="btn btn-success w-100">
@@ -206,8 +204,6 @@
</button>
</form>
</div>
<div th:replace="~{footer :: footer}"></div>

View File

@@ -138,6 +138,8 @@
</div>
</div>
<div class="card shadow-sm">

View File

@@ -101,15 +101,15 @@
max="10000000"
required>
</div>
<div class="d-grid">
<button type="submit"
class="btn btn-primary">
編集
</button>
</div>
</div>
<div class="d-grid">
<button type="submit"
class="btn btn-primary">
確定
</button>
</div>
</form>

View File

@@ -5,23 +5,21 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" th:href="@{/css/style.css}">
<title>コース選択</title>
</head>
<body style="padding-bottom: 120px; padding-top: 60px;">
<body style="padding-bottom: 120px">
<div th:replace="~{header :: header}"></div>
<h1 class="page-title">コース選択</h1>
<div class="d-grid gap-2 mt-4">
<th:block th:if="${mode == 'change'}">
<form th:action="@{/course/create}" method="get">
<button class="btn btn-success w-100" type="submit">
新規登録
</button>
</form>
</th:block>
<th:block th:if="${mode == 'change'}">
<form th:action="@{/course/create}" method="get">
<button type="submit">新規登録</button>
</form>
</th:block>
<form th:action="${mode == 'regist'} ? @{/user/register/return}: @{/change}" method="post">
<button type="submit" class="btn btn-primary w-100">確定</button>
@@ -56,7 +54,6 @@
</div>
</div>
</form>
</div>
<th:block th:if="${mode=='change'}">
<div th:replace="~{footer :: footer}"></div>

View File

@@ -45,11 +45,11 @@
選択してください
</option>
<option value="0">
<option value="1">
支出
</option>
<option value="1">
<option value="2">
収入
</option>
@@ -124,15 +124,15 @@
const tType = '[[${session.tType}]]';
if (tType == "0") {
transactionType.value = 0;
} else {
transactionType.value = 1;
} else {
transactionType.value = 2;
}
transactionType.addEventListener("change", function () {
if (this.value === "0") {
if (this.value === "1") {
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 === "1") {
} else if (this.value === "2") {
for (let i = 0; i < expenseList.length; i++) {
expenseList[i].style.display = "none";

View File

@@ -1,153 +1,153 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8" name="viewport" content="width=device-width, initial-scale=1" http-equiv="Content-Type">
<title>収支詳細</title>
<link rel="stylesheet" th:href="@{/css/transaction_detail.css}">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" th:href="@{/css/style.css}">
</head>
<body style="padding-top:80px; padding-bottom:80px;">
<div th:replace="~{header :: header}"></div>
<div class="main-container">
<h2 class="page-title"
th:text="${today}">
</h2>
<div th:each="transactionForm : ${transactionFormList}"
class="card shadow-sm mb-3">
<div class="card-body">
<div class="d-flex justify-content-between">
<span class="fw-bold"
th:text="${transactionForm.categoryName}">
</span>
<span th:text="'¥' + ${transactionForm.amount}">
</span>
</div>
<div class="d-flex justify-content-end gap-2 mt-3">
<form th:action="@{/transaction/update}"
method="get">
<input type="hidden"
name="today"
th:value="${today}">
<input type="hidden"
name="transactionId"
th:value="${transactionForm.transactionId}">
<button class="btn btn-sm btn-primary"
type="submit">
編集
</button>
</form>
<form th:action="@{/transaction/delete}"
method="post">
<input type="hidden"
name="today"
th:value="${today}">
<input type="hidden"
name="transactionId"
th:value="${transactionForm.transactionId}">
<button class="btn btn-sm btn-danger"
type="submit">
削除
</button>
</form>
</div>
</div>
</div>
<div class="d-grid mt-4">
<form th:action="@{/transaction/create}"
method="get">
<input type="hidden"
name="today"
id="today"
th:value="${today}">
<button class="btn btn-success w-100"
type="submit">
新規登録
</button>
</form>
</div>
<div class="d-grid mt-4">
<form th:action="@{/fixed-cost/list}" method="get">
<input type="hidden"
name="today"
id="today"
th:value="${today}">
<button class="btn btn-dark w-100"
type="submit">
固定費一覧
</button>
</form>
</div>
<div class="d-grid mt-4">
<form th:action="@{/category/list}"
method="get">
<input type="hidden"
name="today"
id="today"
th:value="${today}">
<button class="btn btn-dark w-100"
type="submit">
カテゴリ一覧
</button>
</form>
</div>
</div>
<div th:replace="~{footer :: footer}"></div>
</body>
</html>

View File

@@ -80,7 +80,7 @@
</div>
<div class="mb-3">
<label for="goalId" class="form-label">目標貯金額</label>
<label for="goalId" class="form-label">目標</label>
<input type="number" id="goalId" class="form-control" th:field="*{goalId}" min="0" required>
</div>