From 94d20dfdc1d89597c751121a9413aa265b11308e Mon Sep 17 00:00:00 2001 From: isaacclad Date: Sun, 26 Jul 2026 16:42:44 +0000 Subject: [PATCH] events: drop wallet balance from the overview MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The balance is still on Payments & payouts, which is where someone goes when they actually care about it — the overview is for events, not billing. Removes the BillingClient call behind it as well. Leaving that in place would have kept an external billing API request on every overview load to render nothing, and it was the controller's only use of the client, so the dependency goes too. --- .../Controllers/Events/OverviewController.php | 19 +------------------ resources/views/events/dashboard.blade.php | 4 ---- 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/app/Http/Controllers/Events/OverviewController.php b/app/Http/Controllers/Events/OverviewController.php index a796cda..6e91ef0 100644 --- a/app/Http/Controllers/Events/OverviewController.php +++ b/app/Http/Controllers/Events/OverviewController.php @@ -5,20 +5,14 @@ namespace App\Http\Controllers\Events; use App\Http\Controllers\Controller; use App\Models\QrCode; use App\Models\QrEventRegistration; -use App\Services\Billing\BillingClient; use App\Services\Events\SubscriptionService; use App\Support\Qr\QrTypeCatalog; use Illuminate\Http\Request; -use Illuminate\Support\Facades\Log; use Illuminate\View\View; -use Throwable; class OverviewController extends Controller { - public function __construct( - private BillingClient $billing, - private SubscriptionService $subscriptions, - ) {} + public function __construct(private SubscriptionService $subscriptions) {} public function index(Request $request): View { @@ -69,16 +63,6 @@ class OverviewController extends Controller ->whereIn('type', QrTypeCatalog::programmeTypes()) ->count(); - $balanceMinor = 0; - try { - $balanceMinor = $this->billing->balanceMinor($account->public_id); - } catch (Throwable $e) { - Log::warning('Events dashboard could not load wallet balance', [ - 'user' => $account->public_id, - 'error' => $e->getMessage(), - ]); - } - return view('events.dashboard', [ 'upcomingCount' => $upcomingCount, 'ticketsSold' => $ticketsSold, @@ -86,7 +70,6 @@ class OverviewController extends Controller 'checkInRate' => $checkInRate, 'recentEvents' => $recentEvents, 'programmeCount' => $programmeCount, - 'balanceMinor' => $balanceMinor, 'hasPaidPlan' => $this->subscriptions->hasPaidPlan($account), ]); } diff --git a/resources/views/events/dashboard.blade.php b/resources/views/events/dashboard.blade.php index 0acbc04..c7dcb22 100644 --- a/resources/views/events/dashboard.blade.php +++ b/resources/views/events/dashboard.blade.php @@ -74,10 +74,6 @@ Payments & payouts -
-

Wallet balance

-

{{ $fmt($balanceMinor) }}

-