From cd61e1d242c66f39a9ce1f0c7dc3d8f4d1f09a33 Mon Sep 17 00:00:00 2001 From: baodev0 Date: Sat, 25 Jul 2026 09:35:26 +0700 Subject: [PATCH] feat: Update maintenance messages and localize billing labels in InvoiceItem and OrderItem models --- .../Api/Admin/Domain/InetDomainController.php | 10 +++++----- app/Models/InvoiceItem.php | 16 ++++++++-------- app/Models/OrderItem.php | 16 ++++++++-------- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/app/Http/Controllers/Api/Admin/Domain/InetDomainController.php b/app/Http/Controllers/Api/Admin/Domain/InetDomainController.php index 582a052..3f8fbb2 100644 --- a/app/Http/Controllers/Api/Admin/Domain/InetDomainController.php +++ b/app/Http/Controllers/Api/Admin/Domain/InetDomainController.php @@ -53,7 +53,7 @@ class InetDomainController extends Controller if (! $apiKey) { return response()->json([ 'error' => true, - 'message' => 'Chưa cấu hình API key iNET (api_inet).', + 'message' => 'Chức năng đang bảo trì! Vui lòng thử lại sau.', ], 400); } @@ -88,7 +88,7 @@ class InetDomainController extends Controller if (! $apiKey) { return response()->json([ 'error' => true, - 'message' => 'Chưa cấu hình API key iNET (api_inet).', + 'message' => 'Chức năng đang bảo trì! Vui lòng thử lại sau.', ], 400); } @@ -130,7 +130,7 @@ class InetDomainController extends Controller if (! $apiKey) { return response()->json([ 'error' => true, - 'message' => 'Chưa cấu hình API key iNET (api_inet).', + 'message' => 'Chức năng đang bảo trì! Vui lòng thử lại sau.', ], 400); } @@ -176,7 +176,7 @@ class InetDomainController extends Controller if (! $apiKey) { return response()->json([ 'error' => true, - 'message' => 'Chưa cấu hình API key iNET (api_inet).', + 'message' => 'Chức năng đang bảo trì! Vui lòng thử lại sau.', ], 400); } @@ -231,7 +231,7 @@ class InetDomainController extends Controller if (! $apiKey) { return response()->json([ 'error' => true, - 'message' => 'Chưa cấu hình API key iNET (api_inet).', + 'message' => 'Chức năng đang bảo trì! Vui lòng thử lại sau.', ], 400); } diff --git a/app/Models/InvoiceItem.php b/app/Models/InvoiceItem.php index f1dd0e9..ef8c95c 100644 --- a/app/Models/InvoiceItem.php +++ b/app/Models/InvoiceItem.php @@ -34,14 +34,14 @@ class InvoiceItem extends Model public function getBillingLabelAttribute(): string { return match ((int) $this->months) { - 0 => 'One Time', - 1 => 'Monthly', - 3 => 'Quarterly', - 6 => 'Semi-Annually', - 12 => 'Annually', - 24 => '2 Years', - 36 => '3 Years', - default => $this->months . ' Months', + 0 => 'Một lần', + 1 => 'Hàng tháng', + 3 => 'Hàng quý', + 6 => 'Nửa năm', + 12 => 'Hàng năm', + 24 => '2 năm', + 36 => '3 năm', + default => $this->months . ' tháng', }; } diff --git a/app/Models/OrderItem.php b/app/Models/OrderItem.php index 72f4b5c..fd2fc33 100644 --- a/app/Models/OrderItem.php +++ b/app/Models/OrderItem.php @@ -64,14 +64,14 @@ class OrderItem extends Model public function getBillingLabelAttribute(): string { return match ((int) $this->months) { - 0 => 'One Time', - 1 => 'Monthly', - 3 => 'Quarterly', - 6 => 'Semi-Annually', - 12 => 'Annually', - 24 => '2 Years', - 36 => '3 Years', - default => $this->months . ' Months', + 0 => 'Một lần', + 1 => 'Hàng tháng', + 3 => 'Hàng quý', + 6 => 'Nửa năm', + 12 => 'Hàng năm', + 24 => '2 năm', + 36 => '3 năm', + default => $this->months . ' tháng', }; } }