@php /** @var \App\Domain\Core\Models\Tenant $tenant */ /** @var ?\App\Domain\Saas\Models\Subscription $subscription */ /** @var \Illuminate\Contracts\Pagination\LengthAwarePaginator $invoices */ /** @var \Illuminate\Support\Collection $activity */ /** @var \Illuminate\Support\Collection $plans */ $badgeClasses = match ($tenant->status->value) { 'active' => 'bg-emerald-100 text-emerald-800 dark:bg-emerald-900 dark:text-emerald-200', 'trial' => 'bg-amber-100 text-amber-800 dark:bg-amber-900 dark:text-amber-200', 'expired', 'suspended' => 'bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200', }; @endphp

{{ $tenant->name }} {{ $tenant->status->label() }}

{{ __('Back to tenants') }}
@if (session('status'))
{{ session('status') }}
@endif @if (session('error'))
{{ session('error') }}
@endif

{{ __('Subscription') }}

@if ($subscription)
{{ __('Plan') }}
{{ $subscription->plan->name }} ({{ number_format($subscription->plan->price, 2) }} / {{ strtolower($subscription->plan->billing_period->label()) }})
{{ __('Domain') }}
{{ $tenant->domain }}
@if ($subscription->trial_ends_at)
{{ __('Trial Ends') }}
{{ $subscription->trial_ends_at->format('Y-m-d H:i') }}
@endif @if ($subscription->current_period_start && $subscription->current_period_end)
{{ __('Current Period') }}
{{ $subscription->current_period_start->format('Y-m-d') }} → {{ $subscription->current_period_end->format('Y-m-d') }}
@endif
@csrf @method('PUT')
{{ __('Change') }}
@csrf {{ __('Generate Next Invoice') }}
@else

{{ __('No subscription on record for this tenant.') }}

@endif

{{ __('Account Actions') }}

@if ($tenant->status->value === 'suspended')
@csrf {{ __('Reactivate') }}
@else
@csrf {{ __('Suspend') }} @endif

{{ __('Invoices') }}

@forelse ($invoices as $invoice) @empty @endforelse
{{ __('Number') }} {{ __('Period') }} {{ __('Amount') }} {{ __('Status') }} {{ __('Actions') }}
{{ $invoice->invoice_number }} {{ $invoice->period_start->format('Y-m-d') }} → {{ $invoice->period_end->format('Y-m-d') }} {{ number_format($invoice->amount, 2) }} {{ $invoice->status->label() }} {{ __('View') }}
{{ __('No invoices yet.') }}
{{ $invoices->links() }}

{{ __('Billing Activity') }}

    @forelse ($activity as $entry)
  • {{ $entry->description }} {{ $entry->created_at?->diffForHumans() }}
    {{ $entry->causer?->name ?? __('System') }}
  • @empty
  • {{ __('No billing activity recorded yet.') }}
  • @endforelse