@extends('layouts.super-admin', ['title' => 'Business Details - Booklio Super Admin', 'pageTitle' => 'Business Details', 'active' => 'businesses']) @section('content')
@if (session('status'))
{{ session('status') }}
@endif

Tenant profile, owner details, usage, subscription, and administrative actions.

Back to businesses
@csrf Login as business owner
@if ($business->status === 'suspended')
@csrf @method('PATCH') Activate business
@else
@csrf @method('PATCH') Suspend business
@endif
{{ Str::of($business->name)->explode(' ')->map(fn ($part) => Str::substr($part, 0, 1))->take(2)->join('') }}

{{ $business->name }}

{{ $business->address ?? 'No address added' }}

{{ Str::headline($business->status) }} {{ $business->subscription?->plan?->name ?? 'No plan' }} Created {{ $business->created_at?->format('M d, Y') }}
@foreach ([['Owner', $business->owner?->name ?? '-'], ['Email', $business->owner?->email ?? $business->email ?? '-'], ['Phone', $business->phone ?? '-']] as $item)

{{ $item[0] }}

{{ $item[1] }}

@endforeach
@forelse ($subscriptionHistory as $subscription) {{ $subscription->plan?->name ?? 'No plan' }} {{ Str::headline($subscription->billing_cycle) }} {{ $subscription->starts_at?->format('M d, Y') ?? '-' }} {{ $subscription->ends_at?->format('M d, Y') ?? '-' }} {{ $subscription->status_label }} @empty No subscription history yet. @endforelse
@foreach ([['Plan', $business->subscription?->plan?->name ?? 'No plan'], ['Billing cycle', $business->subscription ? Str::headline($business->subscription->billing_cycle) : '-'], ['Renewal', $business->subscription?->renews_at?->format('M d, Y') ?? 'Not scheduled'], ['Revenue', $paidRevenue]] as $row)
{{ $row[0] }} {{ $row[1] }}
@endforeach
@foreach ($usage as $item)

{{ $item['label'] }}

{{ $item['value'] }}

@endforeach
@endsection