{{-- The super admin dashboard. Laid out to the reference the product owner supplied: a greeting, four KPI cards each ending in a link to the screen that can act on them, a growth chart beside a status ring, and two recent-activity tables side by side. Every number is counted from BCP's own tables by DashboardController. There is no seeded figure, no placeholder series and no sample row. Where a table has nothing in it, it says so and offers the screen that would fill it, rather than showing an example of what it might have looked like. Two things in the reference are deliberately absent, and both for the same reason — the feature behind them does not exist: * a notifications tray with a count on it. A bell showing "3" when nothing has produced three of anything is an invented number in the most trusted spot on the page. The bell here links to Security & Alerts, which is real, and carries no badge. * a global search over tenants, domains, invoices and tickets. There is no such endpoint. The search that IS wired up — the menu filter — is in the top bar and does what its placeholder says. The charts are inline SVG drawn from the same counts. No charting library was added to plot six integers. --}} @php $greeting = match (true) { now()->hour < 12 => 'Good morning,', now()->hour < 17 => 'Good afternoon,', default => 'Good evening,', }; $subscriptionTotal = array_sum($subscriptions); $activeSubscriptions = $subscriptions['active'] ?? 0; $suspendedSubscriptions = $subscriptions['suspended'] ?? 0; $tenantSlices = [ ['label' => 'Active', 'count' => $tenants['active'], 'colour' => '#10b981'], ['label' => 'Suspended', 'count' => $tenants['suspended'], 'colour' => '#f43f5e'], ['label' => 'Pending', 'count' => $tenants['pending'], 'colour' => '#f59e0b'], ['label' => 'Archived', 'count' => $tenants['archived'], 'colour' => '#64748b'], ]; $kpis = [ [ 'label' => 'Total Tenants', 'value' => $tenants['total'], 'note' => 'Active: '.$tenants['active'].' | Suspended: '.$tenants['suspended'], 'link' => 'View all tenants', 'href' => route('admin.tenants.index'), 'card' => 'bg-brand-50 border-brand-100', 'tile' => 'bg-brand-100 text-brand-700', 'icon' => 'M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4', ], [ 'label' => 'Active Subscriptions', 'value' => $activeSubscriptions, 'note' => $suspendedSubscriptions.' suspended', 'link' => 'View subscriptions', 'href' => route('admin.subscriptions.index'), 'card' => 'bg-emerald-50 border-emerald-100', 'tile' => 'bg-emerald-100 text-emerald-700', 'icon' => 'M20 7l-8-4-8 4m16 0l-8 4m8-4v10l-8 4m0-10L4 7m8 4v10M4 7v10l8 4', ], [ 'label' => 'Total Users', 'value' => $staffCount, 'note' => 'Admin, staff & portal logins', 'link' => 'View users', 'href' => route('admin.staff.index'), 'card' => 'bg-sky-50 border-sky-100', 'tile' => 'bg-sky-100 text-sky-700', 'icon' => 'M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z', ], [ 'label' => 'Open Support Tickets', 'value' => $support['open'] + $support['in_progress'], 'note' => $support['waiting_customer'].' awaiting the customer', 'link' => 'View support', 'href' => route('admin.support.dashboard'), 'card' => 'bg-orange-50 border-orange-100', 'tile' => 'bg-orange-100 text-orange-700', 'icon' => 'M18 10a8 8 0 10-16 0v5a2 2 0 002 2h1a1 1 0 001-1v-4a1 1 0 00-1-1H4m14 0h-1a1 1 0 00-1 1v4a1 1 0 001 1h1a2 2 0 002-2v-5z', ], ]; @endphp
{{-- ── Greeting ───────────────────────────────────────────────── --}}

{{ $greeting }}

Welcome to BCP Control

Manage your Bindu ecosystem, tenants, subscriptions and support operations from one place.

Add Organization
{{-- ── KPI row ────────────────────────────────────────────────── --}}
@foreach ($kpis as $kpi)

{{ $kpi['label'] }}

{{ number_format($kpi['value']) }}

{{ $kpi['note'] }}

{{ $kpi['link'] }}
@endforeach
{{-- ── Growth chart + status ring ─────────────────────────────── --}}

Tenant Growth

{{-- Labelled for what it is. BCP keeps no history of status changes, so a line comparing active against suspended over past months would be drawn from figures nobody recorded. --}}

Tenants added per month (last 6 months)

Last 6 months
@php $counts = array_column($growth, 'count'); $peak = max(1, max($counts)); //A round ceiling, so the gridlines land on whole tenants. $ceiling = (int) max(2, ceil($peak)); $stepX = 700 / max(1, count($growth) - 1); $points = []; foreach (array_values($growth) as $i => $row) { $points[] = [ 'x' => round(50 + $i * $stepX, 1), 'y' => round(180 - ($row['count'] / $ceiling) * 150, 1), 'row' => $row, ]; } $line = implode(' ', array_map(fn ($p) => $p['x'].','.$p['y'], $points)); $area = '50,180 '.$line.' '.end($points)['x'].',180'; @endphp
{{-- Gridlines and the value at each one. --}} @for ($i = 0; $i <= 4; $i++) @php $y = 180 - $i * 37.5; @endphp {{ round($ceiling / 4 * $i) }} @endfor @foreach ($points as $p) {{ $p['row']['short'] }} {{ substr($p['row']['label'], -4) }} {{ $p['row']['label'] }}: {{ $p['row']['count'] }} {{ Str::plural('tenant', $p['row']['count']) }} @endforeach
Tenants added {{ $subscriptionTotal }} {{ Str::plural('subscription', $subscriptionTotal) }} on record

Tenants by Status

View Details →
@if ($tenants['total'] === 0)

No tenants yet

The ring fills in as organizations are added.

@else @php $circumference = 2 * M_PI * 52; $offset = 0; @endphp
@foreach ($tenantSlices as $slice) @if ($slice['count'] > 0) @php $length = $slice['count'] / $tenants['total'] * $circumference; @endphp @php $offset += $length; @endphp @endif @endforeach {{ $tenants['total'] }} Total Tenants
    @foreach ($tenantSlices as $slice)
  • {{ $slice['label'] }} {{ $slice['count'] }} {{ round($slice['count'] / $tenants['total'] * 100) }}%
  • @endforeach
@endif
{{-- ── Billing, per currency ──────────────────────────────────── --}}

Billing

Paid invoices are totalled per currency. Currencies are never added together.

Reconciliation →

Overdue invoices

{{ number_format($billing['overdue']) }}

Awaiting payment

{{ number_format($billing['pending']) }}

@forelse ($billing['paid_by_currency'] as $row)

{{ $row->currency }} settled

{{ number_format((float) $row->total, 2) }}

across {{ $row->invoices }} {{ Str::plural('invoice', $row->invoices) }}

@empty

No invoice has been paid yet

Settled totals appear here once a payment is recorded.

@endforelse
{{-- ── Recent activity ────────────────────────────────────────── --}} {{-- Split three to two rather than evenly: the tenants table carries five columns and an avatar, the tickets table four columns and none, so an even split made the first scroll sideways inside its own card while the second sat half empty. --}}

Recent Tenants

View All →
@forelse ($recentTenants as $tenant) @php $status = $tenant->status instanceof \BackedEnum ? $tenant->status->value : (string) $tenant->status; $badge = match ($status) { 'active' => 'bg-emerald-50 text-emerald-700 border-emerald-200', 'suspended' => 'bg-rose-50 text-rose-700 border-rose-200', 'pending' => 'bg-amber-50 text-amber-700 border-amber-200', default => 'bg-slate-800 text-slate-400 border-slate-700', }; @endphp {{-- The same two fields the tenant directory shows, in the same order of preference, so the two screens never disagree about where a tenant lives. --}} @empty @endforelse
Organization Domain Status Created Actions
{{ $tenant->name }} {{ $tenant->slug }}
{{ $tenant->custom_domain ?: ($tenant->subdomain ? $tenant->subdomain.'.bindu.test' : '—') }} {{ $status }} {{ $tenant->created_at?->format('M d, Y') ?? '—' }}

No tenants have been created yet

Add Organization

Recent Support Tickets

View All →
@forelse ($recentTickets as $ticket) @php $ticketStatus = $ticket->status instanceof \BackedEnum ? $ticket->status->value : (string) $ticket->status; @endphp @empty @endforelse
# Subject Brand Status
{{ $ticket->ticket_number }} {{ $ticket->subject }} {{ $ticket->brand?->name ?? '—' }} {{ str_replace('_', ' ', $ticketStatus) }}

No support tickets yet

Support tickets will appear here when customers create them.

View Support Desk
{{-- ── Footer line ────────────────────────────────────────────── --}}
© {{ now()->year }} BCP Control. All rights reserved. Bindu Ecosystem Plane