update
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
@php
|
||||
$fieldMap = [
|
||||
'product_name' => 'Tên dịch vụ',
|
||||
'product_billing' => 'Chu kỳ thanh toán',
|
||||
'product_price' => 'Giá dịch vụ',
|
||||
'service_due_exp' => 'Ngày hết hạn',
|
||||
];
|
||||
$iconMap = [
|
||||
'product_billing' => 'buy-date.png',
|
||||
'service_due_exp' => 'due-date.png',
|
||||
];
|
||||
$rows = collect($fields ?? array_keys($fieldMap))->filter(fn($key) => isset($fieldMap[$key]))->values();
|
||||
@endphp
|
||||
<p style="color: #f16723;"><strong>THÔNG TIN DỊCH VỤ</strong></p>
|
||||
|
||||
<table cellpadding="0" cellspacing="0" border="0" style="width: 100%; table-layout: fixed; border: 1px solid #e8e8e8; border-right: 0;">
|
||||
<tbody>
|
||||
@foreach($rows as $i => $key)
|
||||
<tr @if($i % 2 === 1) bgcolor="#FFF1E6" @endif>
|
||||
<td style="padding: 7px 11px; border-right: 1px solid #e8e8e8; width: 200px;">
|
||||
@if(isset($iconMap[$key]))
|
||||
<img src="{{ asset('images/emails/' . $iconMap[$key]) }}" alt="" width="16" height="17" style="vertical-align: text-bottom; margin-right: 4px;">
|
||||
@endif
|
||||
{{ $fieldMap[$key] }}:
|
||||
</td>
|
||||
<td style="padding: 7px 11px; border-right: 1px solid #e8e8e8;">
|
||||
<strong>{{ $key === 'product_price' ? ($data[$key] ?? '0') . ' VNĐ' : ($data[$key] ?? '—') }}</strong>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
Reference in New Issue
Block a user