Compare commits
1 Commits
k-oshita
...
k-kobayash
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
640240db92 |
@@ -133,8 +133,6 @@ public class CourseServiceImpl implements CourseService {
|
||||
System.out.println("***********************ここでエラー1");
|
||||
if (userEntity.getCourseEntity().getCourseId() == courseId) {
|
||||
return "selected";
|
||||
} else if (courseId <= 6) {
|
||||
return "original";
|
||||
}
|
||||
System.out.println("***********************ここでエラー2");
|
||||
allocationRepository.deleteByCourseId(courseId);
|
||||
|
||||
@@ -141,10 +141,6 @@ 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;
|
||||
}
|
||||
|
||||
@@ -275,9 +275,7 @@ public class GoalController {
|
||||
|
||||
int currentAmount = goalService.getCurrentAmount(userId);
|
||||
|
||||
System.out.println("************************currentAmount : " + currentAmount);
|
||||
|
||||
session.setAttribute(PageReturnAttributeKeyword.CURRENT_AMOUNT, currentAmount);
|
||||
model.addAttribute(PageReturnAttributeKeyword.CURRENT_AMOUNT, currentAmount);
|
||||
|
||||
return TransitionTargetPageNameKeyword.GOAL_CREATE_HTML;
|
||||
}
|
||||
|
||||
@@ -214,10 +214,6 @@ td:hover {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.goal {
|
||||
min-width: 300px;
|
||||
}
|
||||
|
||||
/* =======================
|
||||
ボタン
|
||||
======================= */
|
||||
|
||||
@@ -37,9 +37,7 @@
|
||||
<div>
|
||||
<label>目標金額</label>
|
||||
<input type="number" th:field="*{targetAmount}" required min="1">
|
||||
<br>
|
||||
<span th:text="|所持金:${session.currentAmount}円|"></span>
|
||||
<input type="hidden" name="currentAmount" th:value="${currentAmount}">
|
||||
<span th:text="|所持金:${currentAmount}円|"></span>
|
||||
<span th:if="${message != null}">
|
||||
<span th:text="${message}" style="color: red;"></span>
|
||||
</span>
|
||||
|
||||
@@ -128,32 +128,27 @@
|
||||
|
||||
<tr>
|
||||
<th>目標名</th>
|
||||
<td th:text="${goalForm.goalTitle}"
|
||||
class="goal"></td>
|
||||
<td th:text="${goalForm.goalTitle}"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>目標説明</th>
|
||||
<td th:text="${goalForm.goalSubtitle}"
|
||||
class="goal"></td>
|
||||
<td th:text="${goalForm.goalSubtitle}"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>目標金額</th>
|
||||
<td th:text="${goalForm.targetAmount}"
|
||||
class="goal"></td>
|
||||
<td th:text="${goalForm.targetAmount}"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>目標達成期限</th>
|
||||
<td th:text="${goalForm.deadline}"
|
||||
class="goal"></td>
|
||||
<td th:text="${goalForm.deadline}"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>達成率</th>
|
||||
<td th:text="${goalForm.achievementRate} + '%'"
|
||||
class="goal"></td>
|
||||
<td th:text="${goalForm.achievementRate} + '%'"></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
@@ -22,6 +22,12 @@
|
||||
</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">
|
||||
<button type="submit" class="btn btn-primary w-100">確定</button>
|
||||
@@ -36,8 +42,7 @@
|
||||
aria-controls="'collapse' + ${course.courseId}">
|
||||
<span th:text="${course.courseName}"></span>
|
||||
</button>
|
||||
|
||||
<p th:if="${course.courseId > 6}" style="width: 120px;"><button type="button" class="btn btn-danger w-100"
|
||||
<p 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"
|
||||
|
||||
@@ -122,16 +122,6 @@
|
||||
|
||||
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() {
|
||||
|
||||
if (transactionType.value === "0") {
|
||||
@@ -174,6 +164,12 @@
|
||||
|
||||
});
|
||||
|
||||
if (tType == "0") {
|
||||
transactionType.value = "0";
|
||||
} else if (tType == "1") {
|
||||
transactionType.value = "1";
|
||||
}
|
||||
|
||||
toggleCategory();
|
||||
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user