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',
|
||||
];
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -27,7 +28,7 @@ class HostingAccountCreatedAdminNotification extends TemplateMailable
|
||||
protected function variables(): array
|
||||
{
|
||||
$row = fn (string $label, ?string $value) => $value
|
||||
? '<div class="cred-row"><span class="cred-label">' . $label . '</span><span class="cred-value">' . e($value) . '</span></div>'
|
||||
? EmailTemplateShell::row($label, e($value))
|
||||
: '';
|
||||
|
||||
return [
|
||||
@@ -41,10 +42,10 @@ class HostingAccountCreatedAdminNotification extends TemplateMailable
|
||||
'plesk_client_id' => $this->data['plesk_client_id'] ?? 'N/A',
|
||||
'plesk_subscription_id' => $this->data['plesk_subscription_id'] ?? 'N/A',
|
||||
'ftp_username' => $this->data['ftp_username'] ?? 'N/A',
|
||||
'ftp_password_row' => $row('🔑 FTP Password', $this->data['ftp_password'] ?? null),
|
||||
'ftp_password_row' => $row('FTP Password', $this->data['ftp_password'] ?? null),
|
||||
'plesk_panel_url' => $this->data['plesk_panel_url'] ?? 'N/A',
|
||||
'plesk_login' => $this->data['plesk_login'] ?? 'N/A',
|
||||
'plesk_password_row' => $row('🔑 Password', $this->data['plesk_password'] ?? null),
|
||||
'plesk_password_row' => $row('Plesk Password', $this->data['plesk_password'] ?? null),
|
||||
'company_name' => $this->data['company_name'] ?? 'Portal Admin',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace App\Mail\Admin;
|
||||
|
||||
use App\Mail\TemplateMailable;
|
||||
use App\Support\EmailTemplateShell;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
@@ -30,14 +31,14 @@ class ManualDepositPendingNotification extends TemplateMailable
|
||||
'customer_name' => $this->data['customer_name'] ?? 'N/A',
|
||||
'customer_email' => $this->data['customer_email'] ?? 'N/A',
|
||||
'customer_phone_row' => !empty($this->data['customer_phone'])
|
||||
? '<tr><td>Số điện thoại</td><td>' . e($this->data['customer_phone']) . '</td></tr>'
|
||||
? EmailTemplateShell::row('Số điện thoại', e($this->data['customer_phone']))
|
||||
: '',
|
||||
'client_ip_row' => !empty($this->data['client_ip'])
|
||||
? '<tr><td>IP gửi yêu cầu</td><td>' . e($this->data['client_ip']) . '</td></tr>'
|
||||
? EmailTemplateShell::row('IP gửi yêu cầu', e($this->data['client_ip']))
|
||||
: '',
|
||||
'amount_formatted' => number_format((float) ($this->data['amount'] ?? 0), 0, ',', '.') . ' VNĐ',
|
||||
'proof_row' => !empty($this->data['proof_image_url'])
|
||||
? '<tr><td>Chứng từ</td><td><a href="' . e($this->data['proof_image_url']) . '">Xem chứng từ chuyển khoản</a></td></tr>'
|
||||
? EmailTemplateShell::row('Chứng từ', '<a style="color: #f16723;" href="' . e($this->data['proof_image_url']) . '" target="_blank" rel="noopener">Xem chứng từ chuyển khoản</a>')
|
||||
: '',
|
||||
'company_name' => $this->data['company_name'] ?? 'Portal Admin',
|
||||
];
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace App\Mail\Admin;
|
||||
|
||||
use App\Mail\TemplateMailable;
|
||||
use App\Support\EmailTemplateShell;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
@@ -33,7 +34,7 @@ class TrialRegistrationRequest extends TemplateMailable
|
||||
'ssd' => $this->data['ssd'] ?? '-',
|
||||
'os' => $this->data['os'] ?? '-',
|
||||
'other_row' => !empty($this->data['other'])
|
||||
? '<tr><td>Yêu cầu khác</td><td>' . e($this->data['other']) . '</td></tr>'
|
||||
? EmailTemplateShell::row('Yêu cầu khác', e($this->data['other']))
|
||||
: '',
|
||||
'company_name' => $this->data['company_name'] ?? 'Portal Admin',
|
||||
'created_at' => $this->data['created_at'] ?? now()->format('d/m/Y H:i:s'),
|
||||
|
||||
Reference in New Issue
Block a user