Refactor VM resource specs resolution and enhance order payment success email with addon summary; add UpdateVmConfigJob for CPU/RAM updates

This commit is contained in:
baodev0
2026-07-17 14:00:42 +07:00
parent d9da3b5bb3
commit ad20cd5bdc
12 changed files with 458 additions and 33 deletions
@@ -26,6 +26,11 @@
.vm-box .vm-row:last-child { border-bottom: none; }
.vm-box .vm-label { color: #15803d; font-size: 13px; width: 120px; flex-shrink: 0; }
.vm-box .vm-value { font-family: 'Courier New', monospace; font-size: 14px; font-weight: 700; color: #111827; word-break: break-all; }
.addon-table { width: 100%; border-collapse: collapse; margin-top: 12px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; }
.addon-table th { padding: 8px 14px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #64748b; background: #f1f5f9; text-align: left; border-bottom: 1px solid #e2e8f0; }
.addon-table td { padding: 9px 14px; font-size: 13px; color: #374151; border-bottom: 1px solid #f1f5f9; }
.addon-table tr:last-child td { border-bottom: none; }
.addon-table .td-num { font-weight: 600; color: #111827; text-align: right; }
.amount-box { background: #fffbeb; border: 1.5px solid #fbbf24; border-radius: 8px; padding: 14px 20px; display: flex; justify-content: space-between; align-items: center; margin-top: 20px; }
.amount-box span { font-size: 13px; color: #92400e; }
.amount-box strong { font-size: 20px; font-weight: 800; color: #b45309; }
@@ -86,6 +91,28 @@
@endforeach
@endif
@if(!empty($addonsSummary))
<div class="section-label">Gói nâng cấp cấu hình (Addon)</div>
<table class="addon-table">
<thead>
<tr>
<th>Dịch vụ addon</th>
<th style="text-align:right">Số lượng</th>
<th style="text-align:right">Thành tiền</th>
</tr>
</thead>
<tbody>
@foreach($addonsSummary as $addon)
<tr>
<td>{{ $addon['name'] }}</td>
<td class="td-num">{{ $addon['qty'] }}</td>
<td class="td-num">{{ number_format($addon['subtotal'], 0, ',', '.') }} VNĐ</td>
</tr>
@endforeach
</tbody>
</table>
@endif
<div class="notice">
⚠️ Vui lòng <strong>đổi mật khẩu ngay</strong> sau khi đăng nhập lần đầu để bảo mật tài khoản.<br>
Nếu cần hỗ trợ, liên hệ: <strong>{{ $supportEmail ?? '' }}</strong> hoặc <strong>{{ $supportPhone ?? '' }}</strong>