@extends('central.super.layout') @section('title', __('super.subscriptions.show_title')) @section('content') @php $tenant = $subscription->tenant; $tenantDisplayName = $tenant->company_name ?? ($tenant->domains->first()->domain ?? $tenant->id); $tenantEmail = $tenant->admin_email ?? null; $tenantDomain = $tenant->domains->first()->domain ?? null; $colors = ['purple', 'blue', 'green', 'amber', 'rose']; $color = $colors[crc32($subscription->tenant_id) % count($colors)]; $initial = strtoupper(mb_substr($tenantDisplayName, 0, 2)); $badgeClass = match($subscription->status) { 'active' => 'active', 'trial' => 'trial', 'pending' => 'pending', 'cancelled' => 'cancelled', 'suspended' => 'suspended', 'expired' => 'expired', 'failed' => 'failed', default => 'secondary', }; @endphp
{{ __('super.status.' . $subscription->status) }} @if($subscription->plan) · {{ $subscription->plan->name }} @endif @if($subscription->created_at) · {{ __('super.subscriptions.show_created') }} {{ $subscription->created_at->format('M d, Y') }} @endif
{{ __('super.subscriptions.show_no_payments_desc') }}
{{ $tenantDisplayName }}
@if($tenantDomain){{ $tenantDomain }}
@endif @if($tenantEmail){{ $tenantEmail }}
@endif{{ $subscription->plan->name }}
{{ $currencySymbol }}{{ number_format($subscription->plan->price, 2) }}/{{ __('super.plans.mo') }} · {{ $currencySymbol }}{{ number_format($subscription->plan->yearly_price, 2) }}/{{ __('super.plans.yr') }}
@if($subscription->plan->is_private) {{ __('super.plans.private') }} @endif