feat: nhắc gia hạn QR theo dịch vụ, failover server hosting, CCCD admin, log cấp phát dịch vụ
- Mail campaign: mẫu nhắc gia hạn thanh toán QR, chọn dịch vụ + chu kỳ từng dòng (renewal_services) - Hosting: nhiều server Plesk cho một gói (service_plan_servers), chuyển server khi server chết - Admin xem/sửa giấy tờ định danh khách, tuỳ chọn gia hạn cho khách, nhật ký cấp phát dịch vụ - Đánh dấu mẫu email dịch vụ là non-marketing Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
047c23beff
commit
55a834a2f8
@@ -13,14 +13,14 @@ class ServicePlanController extends Controller
|
||||
{
|
||||
public function index(): JsonResponse
|
||||
{
|
||||
$plans = ServicePlan::with('plesk', 'dnsServer')->orderBy('sort_order')->orderBy('title')->get();
|
||||
$plans = ServicePlan::with('plesk', 'servers')->orderBy('sort_order')->orderBy('title')->get();
|
||||
|
||||
return response()->json(['error' => false, 'data' => $plans]);
|
||||
}
|
||||
|
||||
public function show(int $id): JsonResponse
|
||||
{
|
||||
$plan = ServicePlan::with('plesk', 'dnsServer')->find($id);
|
||||
$plan = ServicePlan::with('plesk', 'servers')->find($id);
|
||||
|
||||
if (!$plan) {
|
||||
return response()->json(['error' => true, 'message' => 'Không tìm thấy gói hosting.'], 404);
|
||||
@@ -33,12 +33,13 @@ class ServicePlanController extends Controller
|
||||
{
|
||||
$plan = ServicePlan::create($request->planAttributes());
|
||||
|
||||
$plan->syncServers($request->serverIds());
|
||||
$this->savePlesk($plan, $request->validated());
|
||||
|
||||
return response()->json([
|
||||
'error' => false,
|
||||
'message' => 'Tạo gói hosting thành công.',
|
||||
'data' => $plan->load('plesk', 'dnsServer'),
|
||||
'data' => $plan->load('plesk', 'servers'),
|
||||
], 201);
|
||||
}
|
||||
|
||||
@@ -52,12 +53,13 @@ class ServicePlanController extends Controller
|
||||
|
||||
$plan->update($request->planAttributes());
|
||||
|
||||
$plan->syncServers($request->serverIds());
|
||||
$this->savePlesk($plan, $request->validated());
|
||||
|
||||
return response()->json([
|
||||
'error' => false,
|
||||
'message' => 'Cập nhật gói hosting thành công.',
|
||||
'data' => $plan->fresh(['plesk', 'dnsServer']),
|
||||
'data' => $plan->fresh(['plesk', 'servers']),
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user