events: drop wallet balance from the overview
Deploy Ladill Events / deploy (push) Successful in 57s
Deploy Ladill Events / deploy (push) Successful in 57s
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.
This commit is contained in:
@@ -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),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -74,10 +74,6 @@
|
||||
<span class="font-medium text-slate-700">Payments & payouts</span>
|
||||
<span class="text-slate-400">→</span>
|
||||
</a>
|
||||
<div class="rounded-xl border border-indigo-100 bg-indigo-50/60 px-4 py-3">
|
||||
<p class="text-xs font-medium uppercase tracking-wide text-indigo-600">Wallet balance</p>
|
||||
<p class="mt-1 text-lg font-semibold text-slate-900">{{ $fmt($balanceMinor) }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user