Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
216 changes: 0 additions & 216 deletions src/main/java/com/project/mock/init/MockDataInit.java

This file was deleted.

27 changes: 18 additions & 9 deletions src/main/resources/templates/email.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ <h2 class="text-lg font-semibold text-gray-800 mb-2">청구 정보</h2>
<div class="space-y-1">
<p><span class="font-medium text-gray-600">청구 날짜:</span> <span th:text="${variables.billing_date}">2023년 11월 15일</span></p>
<p><span class="font-medium text-gray-600">납기일:</span> <span th:text="${variables.due_date}">2023년 11월 30일</span></p>
<p><span class="font-medium text-gray-600">결제 방법:</span> <span th:text="${variables.payment_method}">신용카드 (KB국민카드)</span></p>
</div>
</div>
</div>
Expand Down Expand Up @@ -92,16 +91,26 @@ <h2 class="text-lg font-semibold text-gray-800 mb-4">요금 상세 내역</h2>
</tr>
</thead>
<tbody class="divide-y divide-gray-200">
<th:block th:each="entry : ${groupedItems}">
<tr class="bill-detail-row" th:each="item, stat : ${entry.value}">
<td th:if="${stat.first}"
th:rowspan="${entry.value.size()}"
th:text="${entry.key}"
class="px-4 py-3 whitespace-nowrap text-sm font-medium text-gray-900 bg-white align-top border-r border-gray-100">
요금제
</td>

<tr class="bill-detail-row" th:each="item : ${variables.items}">
<td class="px-4 py-3 whitespace-nowrap text-sm font-medium text-gray-900" th:text="${item.name}">기본 요금</td>
<td class="px-4 py-3 text-sm text-gray-500" th:text="${item.detail}">프리미엄 5G 100GB</td>

<td class="px-4 py-3 text-sm text-right"
th:classappend="${item.style_class != null ? item.style_class : 'text-gray-900'}"
th:text="${item.amount}">65,000원</td>
</tr>
<td class="px-4 py-3 text-sm text-gray-500" th:text="${item.detail}">
5G 스탠다드
</td>

<td class="px-4 py-3 text-sm text-right"
th:classappend="${item.styleClass != null ? item.styleClass : 'text-gray-900'}"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Thymeleaf의 Elvis 연산자(?:)를 사용하면 코드를 더 간결하게 만들 수 있습니다. A != null ? A : B 형태의 삼항 연산자를 A ?: B로 바꿀 수 있습니다.

Suggested change
th:classappend="${item.styleClass != null ? item.styleClass : 'text-gray-900'}"
th:classappend="${item.styleClass ?: 'text-gray-900'}"

th:text="${item.amount}">
3,300원
</td>
</tr>
</th:block>
</tbody>
</table>
</div>
Expand Down
Loading