feat: Update maintenance messages and localize billing labels in InvoiceItem and OrderItem models

This commit is contained in:
baodev0
2026-07-25 09:35:26 +07:00
parent 2eac92ad5f
commit cd61e1d242
3 changed files with 21 additions and 21 deletions
@@ -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);
}
+8 -8
View File
@@ -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',
};
}
+8 -8
View File
@@ -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',
};
}
}