Compare commits
14 Commits
f319fcb9f8
...
k-oshita
| Author | SHA1 | Date | |
|---|---|---|---|
| 6b207018db | |||
|
|
c470cc1970 | ||
|
|
edadbf86ec | ||
| 546a2927eb | |||
|
|
129d74a4df | ||
|
|
d3b76fb2cd | ||
|
|
67cc89d2a8 | ||
| 31b5e54023 | |||
| 1d34a2189d | |||
|
|
bbee55f58f | ||
| c484d86c59 | |||
| 4ef6079004 | |||
| cbfd8d34b4 | |||
| 2a563d335c |
@@ -133,6 +133,8 @@ public class CourseServiceImpl implements CourseService {
|
|||||||
System.out.println("***********************ここでエラー1");
|
System.out.println("***********************ここでエラー1");
|
||||||
if (userEntity.getCourseEntity().getCourseId() == courseId) {
|
if (userEntity.getCourseEntity().getCourseId() == courseId) {
|
||||||
return "selected";
|
return "selected";
|
||||||
|
} else if (courseId <= 6) {
|
||||||
|
return "original";
|
||||||
}
|
}
|
||||||
System.out.println("***********************ここでエラー2");
|
System.out.println("***********************ここでエラー2");
|
||||||
allocationRepository.deleteByCourseId(courseId);
|
allocationRepository.deleteByCourseId(courseId);
|
||||||
|
|||||||
@@ -141,6 +141,10 @@ public class CourseController {
|
|||||||
|
|
||||||
return TransitionTargetPageNameKeyword.REDIRECT + TransitionTargetPageNameKeyword.COURSE;
|
return TransitionTargetPageNameKeyword.REDIRECT + TransitionTargetPageNameKeyword.COURSE;
|
||||||
|
|
||||||
|
} else if (condition.equals("original")) {
|
||||||
|
model.addAttribute("message", "既存のデータは削除できません");
|
||||||
|
|
||||||
|
return TransitionTargetPageNameKeyword.REDIRECT + TransitionTargetPageNameKeyword.COURSE;
|
||||||
} else if (condition.equals("ok")) {
|
} else if (condition.equals("ok")) {
|
||||||
return TransitionTargetPageNameKeyword.REDIRECT + TransitionTargetPageNameKeyword.COURSE;
|
return TransitionTargetPageNameKeyword.REDIRECT + TransitionTargetPageNameKeyword.COURSE;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -275,7 +275,9 @@ public class GoalController {
|
|||||||
|
|
||||||
int currentAmount = goalService.getCurrentAmount(userId);
|
int currentAmount = goalService.getCurrentAmount(userId);
|
||||||
|
|
||||||
model.addAttribute(PageReturnAttributeKeyword.CURRENT_AMOUNT, currentAmount);
|
System.out.println("************************currentAmount : " + currentAmount);
|
||||||
|
|
||||||
|
session.setAttribute(PageReturnAttributeKeyword.CURRENT_AMOUNT, currentAmount);
|
||||||
|
|
||||||
return TransitionTargetPageNameKeyword.GOAL_CREATE_HTML;
|
return TransitionTargetPageNameKeyword.GOAL_CREATE_HTML;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -429,7 +429,7 @@ public class TransactionController {
|
|||||||
|
|
||||||
UserForm userForm = UserForm.convertFrom(userService.findByUserId(loginUser.getUserId()));
|
UserForm userForm = UserForm.convertFrom(userService.findByUserId(loginUser.getUserId()));
|
||||||
|
|
||||||
List<GoalForm> resultList = goalForm.stream().filter(goal -> goal.getGoalComplete() == 0)
|
List<GoalForm> resultList = goalForm.stream().filter(goal -> goal.getGoalComplete() == 0 && goal.getDeadline().isAfter(today) )
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
if (!resultList.isEmpty()) {
|
if (!resultList.isEmpty()) {
|
||||||
|
|||||||
@@ -214,6 +214,10 @@ td:hover {
|
|||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.goal {
|
||||||
|
min-width: 300px;
|
||||||
|
}
|
||||||
|
|
||||||
/* =======================
|
/* =======================
|
||||||
ボタン
|
ボタン
|
||||||
======================= */
|
======================= */
|
||||||
|
|||||||
@@ -37,7 +37,9 @@
|
|||||||
<div>
|
<div>
|
||||||
<label>目標金額</label>
|
<label>目標金額</label>
|
||||||
<input type="number" th:field="*{targetAmount}" required min="1">
|
<input type="number" th:field="*{targetAmount}" required min="1">
|
||||||
<span th:text="|所持金:${currentAmount}円|"></span>
|
<br>
|
||||||
|
<span th:text="|所持金:${session.currentAmount}円|"></span>
|
||||||
|
<input type="hidden" name="currentAmount" th:value="${currentAmount}">
|
||||||
<span th:if="${message != null}">
|
<span th:if="${message != null}">
|
||||||
<span th:text="${message}" style="color: red;"></span>
|
<span th:text="${message}" style="color: red;"></span>
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -128,27 +128,32 @@
|
|||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th>目標名</th>
|
<th>目標名</th>
|
||||||
<td th:text="${goalForm.goalTitle}"></td>
|
<td th:text="${goalForm.goalTitle}"
|
||||||
|
class="goal"></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th>目標説明</th >
|
<th>目標説明</th >
|
||||||
<td th:text="${goalForm.goalSubtitle}"></td>
|
<td th:text="${goalForm.goalSubtitle}"
|
||||||
|
class="goal"></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th>目標金額</th>
|
<th>目標金額</th>
|
||||||
<td th:text="${goalForm.targetAmount}"></td>
|
<td th:text="${goalForm.targetAmount}"
|
||||||
|
class="goal"></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th>目標達成期限</th>
|
<th>目標達成期限</th>
|
||||||
<td th:text="${goalForm.deadline}"></td>
|
<td th:text="${goalForm.deadline}"
|
||||||
|
class="goal"></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th>達成率</th>
|
<th>達成率</th>
|
||||||
<td th:text="${goalForm.achievementRate} + '%'"></td>
|
<td th:text="${goalForm.achievementRate} + '%'"
|
||||||
|
class="goal"></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -22,12 +22,6 @@
|
|||||||
</form>
|
</form>
|
||||||
</th:block>
|
</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>
|
</th:block>
|
||||||
<form th:action="${mode == 'regist'} ? @{/user/register/return}: @{/change}" id="totalForm" method="post">
|
<form th:action="${mode == 'regist'} ? @{/user/register/return}: @{/change}" id="totalForm" method="post">
|
||||||
<button type="submit" class="btn btn-primary w-100">確定</button>
|
<button type="submit" class="btn btn-primary w-100">確定</button>
|
||||||
@@ -42,7 +36,8 @@
|
|||||||
aria-controls="'collapse' + ${course.courseId}">
|
aria-controls="'collapse' + ${course.courseId}">
|
||||||
<span th:text="${course.courseName}"></span>
|
<span th:text="${course.courseName}"></span>
|
||||||
</button>
|
</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>
|
th:attr="data-course-id=${course.courseId}" onclick="deleteCourse(this)">削除</button></p>
|
||||||
</h2>
|
</h2>
|
||||||
<div th:id="'collapse' + ${course.courseId}" class="accordion-collapse collapse"
|
<div th:id="'collapse' + ${course.courseId}" class="accordion-collapse collapse"
|
||||||
|
|||||||
@@ -122,6 +122,16 @@
|
|||||||
|
|
||||||
const tType = '[[${session.tType}]]';
|
const tType = '[[${session.tType}]]';
|
||||||
|
|
||||||
|
console.log("tType: " + tType);
|
||||||
|
|
||||||
|
if (tType.includes("0")) {
|
||||||
|
console.log("okokokokokokokkkokokokoko");
|
||||||
|
transactionType.value = "0";
|
||||||
|
} else if (tType.includes("1")) {
|
||||||
|
transactionType.value = "1";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function toggleCategory() {
|
function toggleCategory() {
|
||||||
|
|
||||||
if (transactionType.value === "0") {
|
if (transactionType.value === "0") {
|
||||||
@@ -164,12 +174,6 @@
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (tType == "0") {
|
|
||||||
transactionType.value = "0";
|
|
||||||
} else if (tType == "1") {
|
|
||||||
transactionType.value = "1";
|
|
||||||
}
|
|
||||||
|
|
||||||
toggleCategory();
|
toggleCategory();
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user