Hide fulfilled pending-setup orders from the customer hosting list.
Deploy Ladill Hosting / deploy (push) Successful in 45s
Deploy Ladill Hosting / deploy (push) Successful in 45s
Sales Centre left Active CustomerHostingOrder rows with pending-setup.local alongside real HostingAccounts, so customers saw two hostings. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -54,11 +54,13 @@ class HostingProductController extends Controller
|
||||
{
|
||||
$user = $request->user();
|
||||
|
||||
// New Hosting Orders
|
||||
// In-flight orders only — Active accounts belong under Hosting Accounts
|
||||
// (legacy Sales Centre left Active pending-setup.local orders that duplicated accounts).
|
||||
$orders = CustomerHostingOrder::query()
|
||||
->forUser($user->id)
|
||||
->inFlight()
|
||||
->whereHas('product', fn ($q) => $q->ofType($type))
|
||||
->with(['product', 'domain', 'hostingAccount', 'hostingNode'])
|
||||
->with(['product', 'domain', 'hostingAccount.sites', 'hostingNode'])
|
||||
->latest()
|
||||
->get();
|
||||
|
||||
@@ -139,11 +141,12 @@ class HostingProductController extends Controller
|
||||
$user = $request->user();
|
||||
$serverOrders = app(ServerOrderService::class);
|
||||
|
||||
// New Hosting Orders
|
||||
// In-flight orders only — Active accounts belong under Hosting Accounts
|
||||
$orders = CustomerHostingOrder::query()
|
||||
->forUser($user->id)
|
||||
->inFlight()
|
||||
->whereHas('product', fn ($q) => $q->ofType($type))
|
||||
->with(['product', 'vpsInstance'])
|
||||
->with(['product', 'vpsInstance', 'hostingAccount.sites'])
|
||||
->latest()
|
||||
->get();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user