Compare commits
2 Commits
bbee55f58f
...
d3b76fb2cd
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d3b76fb2cd | ||
|
|
67cc89d2a8 |
@@ -275,7 +275,9 @@ public class GoalController {
|
||||
|
||||
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;
|
||||
}
|
||||
@@ -292,7 +294,7 @@ public class GoalController {
|
||||
model.addAttribute(PageReturnAttributeKeyword.MESSAGE, "現在所持金より高い金額を設定してください。");
|
||||
return TransitionTargetPageNameKeyword.GOAL_CREATE_HTML;
|
||||
}
|
||||
|
||||
|
||||
return TransitionTargetPageNameKeyword.REDIRECT + TransitionTargetPageNameKeyword.GOAL;
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,9 @@
|
||||
<div>
|
||||
<label>目標金額</label>
|
||||
<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:text="${message}" style="color: red;"></span>
|
||||
</span>
|
||||
|
||||
@@ -122,6 +122,16 @@
|
||||
|
||||
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") {
|
||||
@@ -164,12 +174,6 @@
|
||||
|
||||
});
|
||||
|
||||
if (tType == "0") {
|
||||
transactionType.value = "0";
|
||||
} else if (tType == "1") {
|
||||
transactionType.value = "1";
|
||||
}
|
||||
|
||||
toggleCategory();
|
||||
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user