feat: harden admin auth and ticket workflows
- add rotating admin refresh tokens and password gates\n- expand ticket galleries, exports, and client resources\n- improve IP allocation auditing and dashboard data\n- enforce encrypted client access tokens on public routes
This commit is contained in:
@@ -153,7 +153,7 @@ class CreateHostingJobs implements ShouldQueue
|
||||
$data = [
|
||||
'company_name' => json_decode($setting->value)->company,
|
||||
'company_logo' => json_decode($setting->value)->logo,
|
||||
'client_name' => $product->Customer->firstname . " " . $product->Customer->lastname,
|
||||
'client_name' => (string) $product->Customer->fullname,
|
||||
'product_name' => $product->GetInvoiceItem()->GetItemProduct()->name,
|
||||
'product_billing' => Helper::BillingCycle($product->GetInvoiceItem()->billing),
|
||||
'product_price' => number_format($product->GetInvoiceItem()->amount,0,',','.'),
|
||||
|
||||
@@ -57,7 +57,7 @@ class ExpiryMail implements ShouldQueue
|
||||
$data = [
|
||||
'company_name' => json_decode($setting->value)->company,
|
||||
'company_logo' => json_decode($setting->value)->logo,
|
||||
'client_name' => $product->Customer->firstname . " " . $product->Customer->lastname,
|
||||
'client_name' => (string) $product->Customer->fullname,
|
||||
'product_name' => $product->GetInvoiceItem()->GetItemProduct()->name,
|
||||
'service_due_exp' => Carbon::parse($product->next_due_date)->format('d/m/Y'),
|
||||
'service_remaining' => (int) Carbon::now()->diffInDays(Carbon::parse($product->next_due_date), false) + 1
|
||||
|
||||
@@ -38,10 +38,10 @@ class TicketJobs implements ShouldQueue
|
||||
|
||||
// Gửi thông báo Telegram khi tạo ticket mới
|
||||
$message = "🆕 Ticket mới được tạo!\n";
|
||||
$message .= "👤 Khách: {$this->customer->firstname} {$this->customer->lastname} ({$this->customer->email})\n";
|
||||
$message .= "👤 Khách: {$this->customer->fullname} ({$this->customer->email})\n";
|
||||
$message .= "🎫 Số ticket: #{$this->ticket->ticket_num}\n";
|
||||
$message .= "📄 Tiêu đề: {$this->ticket->subject}\n";
|
||||
$message .= "🏢 Phòng ban: {$this->ticket->room}\n";
|
||||
$message .= "🏢 Phòng ban: {$this->ticket->roomLabel()}\n";
|
||||
$message .= "📝 Nội dung: " . $cleanDescription;
|
||||
|
||||
// Kiểm tra độ dài message (Telegram giới hạn 4096 ký tự)
|
||||
|
||||
@@ -261,7 +261,7 @@ class AssignIpToGuestJob implements ShouldQueue
|
||||
"🖥️ VM ID: <code>{$this->vmId}</code>\n" .
|
||||
"📦 Sản phẩm: " . ($product?->name ?? 'N/A') . "\n" .
|
||||
"🧾 Đơn hàng: #" . ($order?->order_num ?? 'N/A') . "\n" .
|
||||
"👤 Khách hàng: " . ($customer ? trim($customer->firstname . ' ' . $customer->lastname) : 'N/A') . "\n" .
|
||||
"👤 Khách hàng: " . ($customer?->fullname ?: 'N/A') . "\n" .
|
||||
"📧 Email: " . ($customer?->email ?? 'N/A') . "\n" .
|
||||
"🔁 Số lần thử: {$maxAttempts}\n" .
|
||||
"⚡ Trạng thái: VM đã bị đánh dấu inactive\n" .
|
||||
|
||||
@@ -237,7 +237,7 @@ class UpdateVmConfigJob implements ShouldQueue
|
||||
"━━━━━━━━━━━━━━━━━━━━\n" .
|
||||
"🖥️ VM ID: <code>{$this->vmId}</code>\n" .
|
||||
"📦 Server: <code>" . ($vm?->name ?? 'N/A') . "</code>\n" .
|
||||
"👤 Khách hàng: " . ($customer ? trim($customer->firstname . ' ' . $customer->lastname) : 'N/A') . "\n" .
|
||||
"👤 Khách hàng: " . ($customer?->fullname ?: 'N/A') . "\n" .
|
||||
"📧 Email: " . ($customer?->email ?? 'N/A') . "\n" .
|
||||
"❌ Lỗi: <code>" . htmlspecialchars($e->getMessage()) . "</code>\n" .
|
||||
"⚡ Trạng thái: VM đã bị đánh dấu inactive\n" .
|
||||
|
||||
Reference in New Issue
Block a user