Hide fulfilled pending-setup orders from the customer hosting list.
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:
isaacclad
2026-07-13 17:10:49 +00:00
co-authored by Cursor
parent bc199ccb43
commit b7f320ca30
5 changed files with 200 additions and 7 deletions
@@ -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();