- IP pool: sheet import (xlsx/csv) matched by address, bulk allocate/revoke with notification email (ip_allocated/ip_revoked), ip_pool_logs history. - Orders/invoices: Excel export on branded template (BrandedReportWriter), shared billing filters, order item service info in list responses. - Web design quote Excel export; activity log export. - Service attachments with copy-to-invoice; deployment invoice attachments. - Customer email attachments stored on disk and attached by path. - Admin password change endpoint; user.fullname backfill migration; orders.user_id backfill from logs. - Disable deploy workflow until CI/CD is set up. - Ignore stored customer email and service attachment uploads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
63 lines
4.4 KiB
PHP
63 lines
4.4 KiB
PHP
<?php
|
|
|
|
namespace Database\Seeders\EmailTemplates;
|
|
|
|
use App\Support\EmailTemplateShell as T;
|
|
|
|
final class IpTemplates
|
|
{
|
|
public const SERIF = "font-family: 'Times New Roman', Times, serif;";
|
|
|
|
public const ORANGE = '#f26522';
|
|
|
|
/**
|
|
* @return array<int, array{scenario: string, name: string, subject: string, body: string}>
|
|
*/
|
|
public static function all(): array
|
|
{
|
|
return [
|
|
[
|
|
'scenario' => 'ip_allocated',
|
|
'name' => 'Cấp phát địa chỉ IP',
|
|
'subject' => 'Thông báo cấp phát {{ip_count}} địa chỉ IP',
|
|
'body' => '<div style="' . self::SERIF . ' color: #2b2b2b; font-size: 16px; line-height: 1.85;">'
|
|
. '<div style="text-align: center;">'
|
|
. '<div style="font-size: 21px; font-weight: bold; letter-spacing: 1px; color: #2b2b2b;">THÔNG BÁO CẤP PHÁT TÀI NGUYÊN IP</div>'
|
|
. '<table style="margin: 10px auto 0;" role="presentation" cellspacing="0" cellpadding="0" align="center"><tbody><tr><td style="width: 60px; height: 2px; background: ' . self::ORANGE . '; font-size: 0; line-height: 0;"> </td></tr></tbody></table>'
|
|
. '<div style="font-size: 13px; color: #888888; margin-top: 10px; font-style: italic;">TP. Hồ Chí Minh, {{issued_on}}</div>'
|
|
. '</div>'
|
|
. '<p style="margin: 26px 0 14px;">Kính gửi Quý Khách hàng <b>{{client_name}}</b>,</p>'
|
|
. '<p style="margin: 0 0 20px;">Thế Giới Số trân trọng gửi thông tin cấp phát tài nguyên IP phục vụ triển khai dịch vụ.</p>'
|
|
. '<table style="margin: 0 0 10px;" role="presentation" width="100%" cellspacing="0" cellpadding="0"><tbody><tr>'
|
|
. '<td style="' . self::SERIF . ' font-size: 15px; font-weight: bold; color: #2b2b2b;"><span style="display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: ' . self::ORANGE . '; margin-right: 8px;"></span>Thông tin IP</td>'
|
|
. '<td align="right"><span style="background: #fde6d6; color: #c2410c; font-size: 12px; font-weight: bold; padding: 4px 12px; border-radius: 999px; font-family: Arial, sans-serif;">● Đã cấp phát</span></td>'
|
|
. '</tr></tbody></table>'
|
|
. '{{ip_table}}'
|
|
. '<div style="margin-top: 24px;">'
|
|
. '<div style="margin-bottom: 6px;">Thế Giới Số xin chân thành cảm ơn Quý Khách hàng đã tin tưởng lựa chọn dịch vụ của chúng tôi.</div>'
|
|
. '<div style="margin-bottom: 6px;">Trong quá trình sử dụng, nếu cần hỗ trợ kỹ thuật, Quý Khách hàng vui lòng liên hệ Thế Giới Số qua các kênh hỗ trợ bên dưới.</div>'
|
|
. '<div>Chúc Quý Khách hàng sử dụng dịch vụ hiệu quả và thành công.</div>'
|
|
. '</div>'
|
|
. '{{note_block}}'
|
|
. '<table style="margin: 22px 0 8px;" role="presentation" width="100%" cellspacing="0" cellpadding="0"><tbody><tr><td> </td>'
|
|
. '<td style="' . self::SERIF . ' font-size: 15px; line-height: 1.7; color: #2b2b2b;" width="300" align="center">'
|
|
. '<div>Trân trọng,</div><div style="font-weight: bold; margin-top: 4px;">BỘ PHẬN KỸ THUẬT</div><div style="color: #d9480f; font-weight: bold;">THẾ GIỚI SỐ</div>'
|
|
. '</td></tr></tbody></table>'
|
|
. '</div>',
|
|
],
|
|
[
|
|
'scenario' => 'ip_revoked',
|
|
'name' => 'Thu hồi địa chỉ IP',
|
|
'subject' => 'Thông báo thu hồi {{ip_count}} địa chỉ IP',
|
|
'body' => T::title('Thông báo thu hồi địa chỉ IP')
|
|
. T::greeting('{{client_name}}')
|
|
. T::paragraph('<strong>{{app_name}}</strong> xin thông báo sẽ thu hồi <strong>{{ip_count}}</strong> địa chỉ IP dưới đây kể từ ngày <strong>{{revoked_at}}</strong>. Quý khách vui lòng ngừng sử dụng các địa chỉ IP này để tránh gián đoạn dịch vụ.')
|
|
. T::heading('Danh sách địa chỉ IP')
|
|
. T::infoTable([], '{{ip_rows}}')
|
|
. '{{note_block}}'
|
|
. T::supportLine(),
|
|
],
|
|
];
|
|
}
|
|
}
|