update
This commit is contained in:
@@ -5,6 +5,7 @@ declare(strict_types=1);
|
||||
namespace App\Mail\Admin;
|
||||
|
||||
use App\Mail\TemplateMailable;
|
||||
use App\Support\EmailTemplateShell;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
@@ -26,11 +27,11 @@ class AdminOrderNotification extends TemplateMailable
|
||||
|
||||
protected function variables(): array
|
||||
{
|
||||
$vmFields = ['ip' => '🌐 IP Address', 'username' => '👤 Username', 'password' => '🔑 Password'];
|
||||
$vmFields = ['ip' => 'IP Address', 'username' => 'Username', 'password' => 'Password'];
|
||||
$vmRows = '';
|
||||
foreach ($vmFields as $field => $label) {
|
||||
if (!empty($this->data[$field])) {
|
||||
$vmRows .= '<div class="vm-row"><span class="vm-label">' . $label . '</span><span class="vm-value">' . e($this->data[$field]) . '</span></div>';
|
||||
$vmRows .= EmailTemplateShell::row($label, e($this->data[$field]));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,14 +41,14 @@ class AdminOrderNotification extends TemplateMailable
|
||||
'customer_name' => $this->data['customer_name'] ?? 'N/A',
|
||||
'customer_email' => $this->data['customer_email'] ?? 'N/A',
|
||||
'client_ip_row' => !empty($this->data['client_ip'])
|
||||
? '<tr><td>IP đặt hàng</td><td>' . e($this->data['client_ip']) . '</td></tr>'
|
||||
? EmailTemplateShell::row('IP đặt hàng', e($this->data['client_ip']))
|
||||
: '',
|
||||
'product_name' => $this->data['product_name'] ?? 'N/A',
|
||||
'product_type' => $this->data['product_type'] ?? 'N/A',
|
||||
'billing_cycle' => $this->data['billing_cycle'] ?? 'N/A',
|
||||
'total_formatted' => number_format((float) ($this->data['total'] ?? 0), 0, ',', '.') . ' VNĐ',
|
||||
'vm_block' => $vmRows
|
||||
? '<div class="section-label">Thông tin dịch vụ Cloud VPS</div><div class="vm-box">' . $vmRows . '</div>'
|
||||
? EmailTemplateShell::heading('Thông tin dịch vụ Cloud VPS') . EmailTemplateShell::infoTable([], $vmRows)
|
||||
: '',
|
||||
'company_name' => $this->data['company_name'] ?? 'Portal Admin',
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user