13 Commits

Author SHA1 Message Date
a10a4053cf [FIX]不要なコメントを排除しました 2026-09-30 11:13:34 +09:00
s-choi
a811b0d261 [HOTFIX] なぜか収支入力画面でホームボタンを押下すると例外が発生する問題をコメント化しました。 2026-09-30 11:05:22 +09:00
s-choi
9d5dd5b9b2 [STYLE] 英語を日本語に変えました。 2026-09-30 10:09:04 +09:00
s-choi
378c169c1f [STYLE] 改行を整えました。 2026-09-30 09:42:00 +09:00
s-choi
e67912a259 [DELETE] 余計なファイルを削除しました。 2026-09-30 09:41:39 +09:00
s-choi
c470cc1970 Merge branch 'n-kawahito' of https://gitea.it-college.co.jp/2026_09_5H_Spring_KIZAKI/Monegement into s-choi 2026-09-29 16:08:24 +09:00
s-choi
edadbf86ec [FIX] 既存のデータは削除できないようにしました。 2026-09-29 16:08:10 +09:00
546a2927eb [FIX]目標がすぐ改行される問題を解消しました 2026-09-29 16:01:27 +09:00
s-choi
129d74a4df Merge branch 'n-kawahito' of https://gitea.it-college.co.jp/2026_09_5H_Spring_KIZAKI/Monegement into s-choi 2026-09-29 15:59:41 +09:00
31b5e54023 [FIX]ボタン表示ミスを修正しました 2026-09-29 15:31:23 +09:00
1d34a2189d Merge branch 's-choi' of https://gitea.it-college.co.jp/2026_09_5H_Spring_KIZAKI/Monegement into n-kawahito 2026-09-29 15:25:45 +09:00
kkazuya
f319fcb9f8 [EDIT] 固定費登録の収支区分とカテゴリーを入力必須にしました 2026-09-29 15:22:15 +09:00
78d3042299 [EDIT]マージ跡を消しました 2026-09-29 15:13:56 +09:00
13 changed files with 30 additions and 123 deletions

View File

@@ -61,7 +61,7 @@ public class GlobalExceptionHandler {
e.printStackTrace();
System.out.println("session invalidated exception");
session.invalidate();
// session.invalidate();
return TransitionTargetPageNameKeyword.ERROR_HTML;
}
}

View File

@@ -130,17 +130,14 @@ public class CourseServiceImpl implements CourseService {
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";
} else if (courseId <= 6) {
return "original";
}
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";
}

View File

@@ -132,7 +132,7 @@ public class CourseController {
LoginModel loginUser = (LoginModel) session.getAttribute(SessionKeyword.LOGIN_USER);
System.out.println("**********************cousrId: " + courseId);
// System.out.println("**********************cousrId: " + courseId);
String condition = courseService.deleteCourse(courseId, loginUser.getUserId());
if (condition.equals("selected")) {
@@ -141,6 +141,10 @@ public class CourseController {
return TransitionTargetPageNameKeyword.REDIRECT + TransitionTargetPageNameKeyword.COURSE;
} else if (condition.equals("original")) {
model.addAttribute("message", "既存のデータは削除できません");
return TransitionTargetPageNameKeyword.REDIRECT + TransitionTargetPageNameKeyword.COURSE;
} else if (condition.equals("ok")) {
return TransitionTargetPageNameKeyword.REDIRECT + TransitionTargetPageNameKeyword.COURSE;
}

View File

@@ -275,7 +275,7 @@ public class GoalController {
int currentAmount = goalService.getCurrentAmount(userId);
System.out.println("************************currentAmount : " + currentAmount);
// System.out.println("************************currentAmount : " + currentAmount);
session.setAttribute(PageReturnAttributeKeyword.CURRENT_AMOUNT, currentAmount);

View File

@@ -1,5 +0,0 @@
package com.example.demo.utility;
public class Constant {
}

View File

@@ -1,5 +0,0 @@
package com.example.demo.utility;
public class TestController1 {
}

View File

@@ -214,6 +214,10 @@ td:hover {
vertical-align: middle;
}
.goal {
min-width: 300px;
}
/* =======================
ボタン
======================= */

View File

@@ -1,15 +0,0 @@
.transaction-item {
display: flex;
align-items: center;
justify-content: space-between;
}
.transaction-buttons {
display: flex;
gap: 10px;
margin-right: 20px;
}
.transaction-buttons form {
margin: 0;
}

View File

@@ -37,7 +37,7 @@
<div class="mb-3">
<label class="form-label" for="transactionType">収入・支出</label>
<select class="form-select" id="transactionType">
<select class="form-select" id="transactionType" required>
<option value="">選択してください</option>
<option value="0">支出</option>
@@ -51,7 +51,7 @@
<div class="mb-3">
<label class="form-label" for="categoryId">カテゴリ</label>
<select class="form-select" id="categoryId" th:field="*{categoryId}">
<select class="form-select" id="categoryId" th:field="*{categoryId}" required>
<option value="">選択してください</option>
<option class="expenseListClass" th:each="category : ${expenseList}"

View File

@@ -54,143 +54,102 @@
const myChart =
new Chart(myCt, {
type: 'bar',
data: {
labels: labels,
datasets: [
{
label: '達成率',
data: achievementRates,
backgroundColor:
'rgba(54, 162, 235, 0.5)',
borderColor:
'rgba(54, 162, 235, 1)',
borderWidth: 1
}
]
},
options: {
responsive: true,
maintainAspectRatio: false,
scales: {
y: {
beginAtZero: true,
max: 100,
ticks: {
callback: function (value) {
return value + '%';
}
}
}
}
}
});
</script>
<ul>
<li th:each="goalForm : ${goalFormList}">
<div class="d-flex justify-content-between">
<form th:action="@{/goal}" method="get" class="w-100">
<div class="table-responsive">
<table class="table mb-0">
<input type="radio" name="goalId" th:value="${goalForm.goalId}"
th:checked="${graphGoal != null and graphGoal.goalId == goalForm.goalId}"
onchange="this.form.submit()">
<tr>
<th>目標名</th>
<td th:text="${goalForm.goalTitle}"></td>
<td th:text="${goalForm.goalTitle}"
class="goal"></td>
</tr>
<tr>
<th>目標説明</th>
<td th:text="${goalForm.goalSubtitle}"></td>
<th>目標説明</th >
<td th:text="${goalForm.goalSubtitle}"
class="goal"></td>
</tr>
<tr>
<th>目標金額</th>
<td th:text="${goalForm.targetAmount}"></td>
<td th:text="${goalForm.targetAmount}"
class="goal"></td>
</tr>
<tr>
<th>目標達成期限</th>
<td th:text="${goalForm.deadline}"></td>
<td th:text="${goalForm.deadline}"
class="goal"></td>
</tr>
<tr>
<th>達成率</th>
<td th:text="${goalForm.achievementRate} + '%'"></td>
<td th:text="${goalForm.achievementRate} + '%'"
class="goal"></td>
</tr>
</table>
</div>
</form>
</div>
<div class="d-flex justify-content-end gap-2 mt-3">
<form th:action="@{/goal/edit}" method="get">
<input type="hidden" name="goalId" th:value="${goalForm.goalId}">
<button type="submit" class="btn btn-sm btn-primary">
編集
</button>
</form>
<form th:action="@{/goal/delete}" method="post">
<input type="hidden" name="goalId" th:value="${goalForm.goalId}">
<button type="submit" class="btn btn-sm btn-danger">
削除
</button>
</form>
</div>
</li>
</ul>
</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">
@@ -200,7 +159,6 @@
</form>
<form th:action="@{/goal/record}" method="get">
<button type="submit" class="btn btn-sm btn-primary w-100">
履歴
</button>
@@ -208,7 +166,6 @@
</form>
</div>
<div th:replace="~{footer :: footer}"></div>
</body>

View File

@@ -6,7 +6,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Calendar</title>
<title>カレンダー</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
@@ -55,51 +55,35 @@
<tbody>
<tr th:each="week : ${#numbers.sequence(0, 5)}">
<td th:each="weekDay : ${#numbers.sequence(0, 6)}">
<a th:if="${week * 7 + weekDay - firstDayOfWeek + 1 >= 1
and week * 7 + weekDay - firstDayOfWeek + 1 <= lastDay}" th:href="@{/transaction/detail(
todayDates=${T(java.time.LocalDate).of(year, month, week * 7 + weekDay - firstDayOfWeek + 1)}
)}" class="a-footer">
<div
th:if="${week * 7 + weekDay - firstDayOfWeek + 1 >= 1 and week * 7 + weekDay - firstDayOfWeek + 1 <= lastDay}">
<div class="date" th:text="${week * 7 + weekDay - firstDayOfWeek + 1}">
</div>
<div th:each="income : ${incomeList}"
th:if="${income.date.dayOfMonth == week * 7 + weekDay - firstDayOfWeek + 1}"
class="income" th:text="|収入 +${income.amount}円|">
</div>
<div th:each="expense : ${expenseList}"
th:if="${expense.date.dayOfMonth == week * 7 + weekDay - firstDayOfWeek + 1}"
class="expense" th:text="|支出 -${expense.amount}円|">
</div>
</div>
</a>
</td>
</tr>
</tbody>
</table>
<div class="card shadow-sm mb-3">
<div class="card-body">
<div class="d-flex justify-content-between mb-2">
<span>収入</span>
<span th:text="'¥' + ${totalIncome}"></span>
@@ -124,25 +108,19 @@
<span>目標資金</span>
<span th:text="'¥' + ${targetAmount}"></span>
</div>
<div class="d-flex justify-content-between mb-2">
<span>現在高</span>
<span th:text="'¥' + ${currentAmount}"></span>
</div>
<div class="d-flex justify-content-between">
<span>貯金額</span>
<span th:text="'¥' + ${saving}"></span>
</div>
</div>
</div>
<div class="card shadow-sm">
<div class="card-body">
<div class="d-flex justify-content-between mb-2">
<span>達成率</span>
<span th:text="${achievementRate} + '%'"

View File

@@ -13,7 +13,6 @@
<div th:replace="~{header :: header}"></div>
<h1 class="page-title">コース選択</h1>
<<<<<<< HEAD
<div class="d-grid gap-2 mt-4">
<th:block th:if="${mode == 'change'}">
<form th:action="@{/course/create}" method="get">
@@ -23,16 +22,8 @@
</form>
</th:block>
<form th:action="${mode == 'regist'} ? @{/user/register/return}: @{/change}" method="post">
=======
<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}" id="totalForm" method="post">
>>>>>>> 65b4a9e54a5bc5c1d1480fd4b9255addf73628e4
<button type="submit" class="btn btn-primary w-100">確定</button>
<div class="accordion" id="accordionExample">
@@ -45,7 +36,8 @@
aria-controls="'collapse' + ${course.courseId}">
<span th:text="${course.courseName}"></span>
</button>
<p style="width: 120px;"><button type="button" class="btn btn-danger w-100"
<p th:if="${course.courseId > 6}" style="width: 120px;"><button type="button" class="btn btn-danger w-100"
th:attr="data-course-id=${course.courseId}" onclick="deleteCourse(this)">削除</button></p>
</h2>
<div th:id="'collapse' + ${course.courseId}" class="accordion-collapse collapse"