[EDIT]分析値の+-表記と色分けについて記述しました
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
<table class="table text-center">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">カテゴリ別</th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col">支出</th>
|
||||
<th scope="col">前月比</th>
|
||||
</tr>
|
||||
@@ -20,8 +20,17 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">総支出</th>
|
||||
<td th:text="'¥' + ${analysisForm.currentMonthTotalAmount}">0</td>
|
||||
<td th:text="'¥' + ${analysisForm.totalDifferenceAmount}">0</td>
|
||||
<td th:text="'¥' + ${analysisForm.currentMonthTotalAmount}">
|
||||
0
|
||||
</td>
|
||||
<td th:text="${analysisForm.totalDifferenceAmount >= 0}
|
||||
? '+' + ${analysisForm.totalDifferenceAmount}
|
||||
: '-' + ${analysisForm.totalDifferenceAmount}"
|
||||
th:class="${analysisForm.totalDifferenceAmount >= 0}
|
||||
? 'color-danger;'
|
||||
: 'color-primary;'">
|
||||
0
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -44,7 +53,7 @@
|
||||
<tr th:each="category : ${analysisForm.categoryAnalysisFormList}">
|
||||
|
||||
<th scope="row"
|
||||
th;text="${category.categoryName}">
|
||||
th:text="${category.categoryName}">
|
||||
食費
|
||||
</th>
|
||||
|
||||
@@ -53,10 +62,20 @@
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<span th:text="'¥' + ${category.monthDifferenceAmount}">
|
||||
<span th:text="${category.monthDifferenceAmount >= 0}
|
||||
? '+' + ${category.monthDifferenceAmount}
|
||||
: '-' + ${category.monthDifferenceAmount}"
|
||||
th:class="${category.monthDifferenceAmount >= 0}
|
||||
? 'color-danger;'
|
||||
: 'color-primary;'">
|
||||
</span>
|
||||
<br>
|
||||
<span th:text="'¥' + ${category.courseDifferenceAmount}">
|
||||
<span th:text="${category.courseDifferenceAmount >= 0}
|
||||
? '+' + ${category.courseDifferenceAmount}
|
||||
: '-' + ${category.courseDifferenceAmount}"
|
||||
th:class="${category.courseDifferenceAmount >= 0}
|
||||
? 'color-danger;'
|
||||
: 'color-primary;'">
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user