feat(admin): IP pool allocation, billing exports, service attachments
- IP pool: sheet import (xlsx/csv) matched by address, bulk allocate/revoke with notification email (ip_allocated/ip_revoked), ip_pool_logs history. - Orders/invoices: Excel export on branded template (BrandedReportWriter), shared billing filters, order item service info in list responses. - Web design quote Excel export; activity log export. - Service attachments with copy-to-invoice; deployment invoice attachments. - Customer email attachments stored on disk and attached by path. - Admin password change endpoint; user.fullname backfill migration; orders.user_id backfill from logs. - Disable deploy workflow until CI/CD is set up. - Ignore stored customer email and service attachment uploads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
ea5697cb81
commit
46aa138eec
@@ -4,6 +4,7 @@ namespace App\Http\Controllers\Api\Admin\WebDesign;
|
||||
|
||||
use App\Enums\WebDesign\WebDesignPlatform;
|
||||
use App\Enums\WebDesign\WebDesignQuoteStatus;
|
||||
use App\Exports\WebDesignQuoteSpreadsheet;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\WebDesignQuote;
|
||||
use App\Services\WebDesignQuotePdfService;
|
||||
@@ -11,6 +12,7 @@ use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Illuminate\Validation\Rule;
|
||||
use Symfony\Component\HttpFoundation\BinaryFileResponse;
|
||||
|
||||
class WebDesignQuoteController extends Controller
|
||||
{
|
||||
@@ -18,7 +20,7 @@ class WebDesignQuoteController extends Controller
|
||||
{
|
||||
$perPage = min((int) $request->get('per_page', 15), 100);
|
||||
|
||||
$query = WebDesignQuote::with('creator:id,firstname,lastname')
|
||||
$query = WebDesignQuote::with('creator:id,fullname')
|
||||
->when($request->get('filter'), fn($q, $f) =>
|
||||
$q->where(fn($sub) => $sub
|
||||
->where('quote_number', 'like', "%{$f}%")
|
||||
@@ -47,7 +49,7 @@ class WebDesignQuoteController extends Controller
|
||||
|
||||
public function show(int $id): JsonResponse
|
||||
{
|
||||
$quote = WebDesignQuote::with('creator:id,firstname,lastname')->find($id);
|
||||
$quote = WebDesignQuote::with('creator:id,fullname')->find($id);
|
||||
|
||||
if (!$quote) {
|
||||
return response()->json(['error' => true, 'message' => 'Không tìm thấy báo giá.'], 404);
|
||||
@@ -92,7 +94,7 @@ class WebDesignQuoteController extends Controller
|
||||
return response()->json([
|
||||
'error' => false,
|
||||
'message' => 'Cập nhật báo giá thành công.',
|
||||
'data' => $quote->fresh('creator:id,firstname,lastname'),
|
||||
'data' => $quote->fresh('creator:id,fullname'),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -149,6 +151,17 @@ class WebDesignQuoteController extends Controller
|
||||
]);
|
||||
}
|
||||
|
||||
public function downloadXlsx(int $id, WebDesignQuoteSpreadsheet $spreadsheet): BinaryFileResponse|JsonResponse
|
||||
{
|
||||
$quote = WebDesignQuote::find($id);
|
||||
|
||||
if (!$quote) {
|
||||
return response()->json(['error' => true, 'message' => 'Không tìm thấy báo giá.'], 404);
|
||||
}
|
||||
|
||||
return $spreadsheet->download($quote);
|
||||
}
|
||||
|
||||
/**
|
||||
* Danh sách cấu hình nền tảng cho form báo giá (label, frontend, custom admin, phí bản quyền).
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user