feat: add domain registration form and email notifications
- Create a new Blade view for domain registration (`registrant-tochuc.blade.php`) to capture organization and manager details. - Implement email templates for new domain orders for both admin (`domain-order-new.blade.php`) and customers (`domain-order-received.blade.php`). - Add CSV exports for client and domain data. - Introduce tests for customer mass assignment, password reset, login throttling, and permission gating. - Ensure service renewals use current pricing and validate ownership for virtual machines. - Validate mass assignment behavior in service model.
This commit is contained in:
@@ -4,12 +4,14 @@ namespace App\Http\Controllers\Api\Client\Service;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Resources\Api\Service\VpsServiceCollection;
|
||||
use App\Http\Resources\Api\Service\Order\InvoiceSummaryResource;
|
||||
use App\Http\Resources\Api\Client\Service\ServiceClientDetailResource;
|
||||
use App\Http\Services\vCenter;
|
||||
use App\Models\Order;
|
||||
use App\Models\Service;
|
||||
use App\Repositories\Api\ServiceClient\ServiceClientRepository;
|
||||
use App\Services\ActivityLogger;
|
||||
use App\Services\Api\Order\OrderQueryService;
|
||||
use App\Services\Api\ServiceClient\ServiceClientService;
|
||||
use App\Services\VirtualMachine\Rebuild\VmRebuildService;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
@@ -66,6 +68,23 @@ class ServiceController extends Controller
|
||||
->response();
|
||||
}
|
||||
|
||||
public function overview(Request $request, OrderQueryService $orderQueryService): JsonResponse
|
||||
{
|
||||
$customerId = (int) $request->user()->id;
|
||||
|
||||
$services = $this->serviceClientService->getActiveServices($customerId, null, 5);
|
||||
$invoices = $orderQueryService->getCustomerInvoices($customerId)->take(5);
|
||||
|
||||
return response()->json([
|
||||
'error' => false,
|
||||
'message' => 'Lấy dữ liệu thành công',
|
||||
'data' => [
|
||||
'services' => (new VpsServiceCollection($services))->collection,
|
||||
'invoices' => InvoiceSummaryResource::collection($invoices),
|
||||
],
|
||||
]);
|
||||
}
|
||||
|
||||
public function indexWebDesign(Request $request): JsonResponse
|
||||
{
|
||||
$perPage = min((int) $request->get('per_page', 15), 100);
|
||||
|
||||
Reference in New Issue
Block a user