[ADD]目標を管理するため機能の追加

This commit is contained in:
2026-09-18 10:05:15 +09:00
parent 0bec7b3b3b
commit 3833689759
7 changed files with 299 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>目標編集</title>
</head>
<body>
<h1>目標編集</h1>
<form th:action="@{/goal/update}" th:object="${goalForm}" method="post">
<input type="hidden" th:field="*{goalId}">
<div>
<label>目標名</label>
<input type="text" th:field="*{goalTitle}">
</div>
<div>
<label>目標補足説明</label>
<textarea th:field="*{goalSubtitle}"></textarea>
</div>
<div>
<label>目標金額</label>
<input type="number" th:field="*{targetAmount}">
</div>
<div>
<label>目標達成期限</label>
<input type="date" th:field="*{deadline}">
</div>
<button type="submit">更新する</button>
</form>
</body>
</html>

View File

@@ -0,0 +1,33 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>目標詳細</title>
</head>
<body>
<h1>目標詳細</h1>
<table>
<tr>
<th>目標名</th>
<td th:text="${goalForm.goalTitle}"></td>
</tr>
<tr>
<th>目標補足説明</th>
<td th:text="${goalForm.goalSubtitle}"></td>
</tr>
<tr>
<th>目標金額</th>
<td th:text="${goalForm.targetAmount}"></td>
</tr>
<tr>
<th>目標達成期限</th>
<td th:text="${goalForm.deadline}"></td>
</tr>
</table>
<a th:href="@{/goal/{goalId}/edit(goalId=${goalForm.goalId})}">編集する</a>
</body>
</html>