{{ strtoupper(substr($customer->name, 0, 2)) }}

{{ $customer->name }}

{{ ucfirst($customer->status) }}
{{ $customer->email }} @if($customer->company) {{ $customer->company }} @endif @if($customer->phone) {{ $customer->phone }} @endif
Edit Profile {{-- Amber rather than slate: this one does not edit a record, it changes who the current session is signed in as. --}}
@csrf
@if (session('success'))
{{ session('success') }}
@endif {{-- This page had no error outlet, so a refused action redirected back here and said nothing. Impersonation can legitimately be refused — no portal login, customer not active — and a silent refusal reads as a broken button. --}} @if ($errors->any())
{{ $errors->first() }}
@endif
Total Revenue / Spent
{{ number_format($stats['total_spent'], 2) }} BDT
Active Subscriptions
{{ $stats['active_subscriptions'] }}
Licenses Issued
{{ $stats['total_licenses'] }}
Open Support Tickets
{{ $stats['open_tickets'] }}
Linked Tenants
{{ $stats['total_tenants'] }}
{{-- Amber, not indigo, and the only tab that is. It carries the same colour as the Login as Customer button and the portal banner, so the whole impersonation story reads as one thing wherever you meet it. --}}
@forelse($customer->tenants as $tenant) @empty @endforelse
Tenant / Org Subdomain / Custom Domain Status Created Action
{{ $tenant->name }}
slug: {{ $tenant->slug }}
@if($tenant->subdomain)
{{ $tenant->subdomain }}.bindu.test
@endif @if($tenant->custom_domain)
{{ $tenant->custom_domain }}
@endif
{{ $tenant->status->label() }} {{ $tenant->created_at->format('M d, Y') }} View Tenant
No organizations linked to this customer account yet.
@forelse($subscriptions as $sub) @empty @endforelse
Product & Plan Tenant Org Effective Rate Status Period Ends Manage
{{ $sub->plan->name }}
{{ $sub->plan->product->name }}
{{-- Sold to the customer directly: there is no tenant to name, and printing the customer here would invent one. --}} @if ($sub->isTenantOwned()) {{ $sub->billingOwnerName() }} @else Customer account @endif {{ number_format($sub->getEffectivePrice(), 2) }} {{ $sub->currency }} / {{ $sub->plan->billing_interval->label() }} {{ $sub->status->label() }} {{ $sub->current_period_ends_at?->format('M d, Y') ?? 'N/A' }} Inspect
No active subscriptions found for this customer.
@forelse($invoices as $inv) @empty @endforelse
Invoice # Tenant Amount Status Due Date View
{{ $inv->invoice_number }} @if ($inv->isTenantOwned()) {{ $inv->billingOwnerName() }} @else Customer account @endif {{ number_format($inv->total, 2) }} {{ $inv->currency }} {{ $inv->status->label() }} {{ $inv->due_date->format('M d, Y') }} Open Invoice
No invoices generated for this customer.
@forelse($licenses as $lic) @empty @endforelse
License Key Product Tenant Org Activations Status Inspect
{{ $lic->license_key }} {{ $lic->product->name }} {{ $lic->tenant->name }} {{ $lic->current_activations }} / {{ $lic->max_activations }} slots {{ $lic->status->label() }} Vault Details
No software licenses issued for this customer.
@forelse($customer->supportTickets as $ticket) @empty @endforelse
Ticket # Subject Priority Status
{{ $ticket->ticket_number }} {{ $ticket->subject }}
{{ $ticket->department->value }}
{{ $ticket->priority->value }} {{ $ticket->status->label() }}
No support tickets opened.

Open Support Ticket

@csrf

Customer Activity Stream

@if($customer->activities->isNotEmpty())
@foreach($customer->activities as $act)
{{ $act->event_type }}
{{ $act->description }}
{{ $act->created_at->format('M d, Y H:i:s') }} ({{ $act->created_at->diffForHumans() }})
@endforeach
@else

No timeline events recorded yet.

@endif
{{-- Read-only, and read straight out of the admin audit log — this panel owns no table and writes nothing. Its job is to make a thing that was previously only visible to whoever queried the database visible to whoever is looking after the customer. --}}

Admin Portal Access

Every time a Super Admin entered this customer's portal, taken from the admin audit log. A session ends itself after {{ \App\Services\ImpersonationSession::WINDOW_MINUTES }} minutes.

@forelse($impersonations as $session) @empty @endforelse
Admin Entered As Started Returned Duration State
{{ $session['actor_name'] }}
@if($session['actor_email'])
{{ $session['actor_email'] }}
@endif
{{ $session['impersonated_email'] ?? 'Not recorded' }} {{ $session['started_at']->format('M d, Y H:i:s') }} {{ $session['stopped_at']?->format('M d, Y H:i:s') ?? '—' }} @if($session['end_reason'] === 'expired')
Timed out
@endif
{{ $session['duration'] ?? '—' }} @php $badge = match ($session['state']) { 'active' => 'bg-amber-500/10 text-amber-400 border border-amber-500/30', 'abandoned' => 'bg-rose-500/10 text-rose-400 border border-rose-500/30', default => 'bg-slate-800 text-slate-300 border border-slate-700', }; $label = match ($session['state']) { 'active' => 'In progress', 'abandoned' => 'Never closed', default => 'Ended', }; @endphp {{ $label }}
No admin has entered this customer's portal.