{{-- Plan Summary Panel --}}
@if($plan->is_active) {{ __('Active') }} @else {{ __('Inactive') }} @endif @if($plan->is_popular) {{ __('Popular') }} @endif {{ $plan->slug }}

{{ __('Created') }} {{ $plan->created_at->format('M j, Y') }} · {{ __('Sort order:') }} {{ $plan->sort_order }} · {{ number_format($plan->active_subscriptions_count) }} {{ __('active subscriber(s)') }}

{{-- Flash Messages --}} @if(session('error'))
{{ session('error') }}
@endif @if(session('success'))
{{ session('success') }}
@endif {{-- Plan Details --}}
{{-- Pricing & Info --}}

{{ __('Pricing & Info') }}

{{ __('Monthly Price') }} @if($plan->isFree()) {{ __('Free') }} @else @currency($plan->monthly_price) @endif
{{ __('Yearly Price') }} @if($plan->isFree()) {{ __('Free') }} @else @currency($plan->yearly_price) @endif
@if(!$plan->isFree())
{{ __('Yearly Savings') }} @php $savings = ($plan->monthly_price * 12) - $plan->yearly_price; @endphp @if($savings > 0) @currency($savings) {{ __('saved/yr') }} ({{ round(($savings / ($plan->monthly_price * 12)) * 100) }}% {{ __('off') }}) @else {{ __('No savings') }} @endif
@endif
{{ __('Status') }} @if($plan->is_active) {{ __('Active') }} @else {{ __('Inactive') }} @endif
{{ __('Popular Badge') }} @if($plan->is_popular) {{ __('Yes') }} @else {{ __('No') }} @endif
{{ __('Sort Order') }} {{ $plan->sort_order }}
@if($plan->stripe_monthly_price_id || $plan->stripe_yearly_price_id)
{{ __('Stripe Price IDs') }}
@if($plan->stripe_monthly_price_id)
{{ __('Monthly:') }} {{ $plan->stripe_monthly_price_id }}
@endif @if($plan->stripe_yearly_price_id)
{{ __('Yearly:') }} {{ $plan->stripe_yearly_price_id }}
@endif
@endif
{{-- Description & Subscribers Summary --}}
{{-- Description --}}

{{ __('Description') }}

@if($plan->description)

{{ $plan->description }}

@else

{{ __('No description provided.') }}

@endif
{{-- Subscribers Summary --}}

{{ __('Subscribers') }}

{{ number_format($plan->active_subscriptions_count) }}

{{ __('Active subscriptions') }}

{{-- Feature Limits --}}

{{ __('Feature Limits') }}

{{ __('Configured feature keys and their limits for this plan.') }}

@forelse($plan->planFeatures as $feature) @empty @endforelse
{{ __('Feature Key') }} {{ __('Status') }} {{ __('Limit') }}
{{ $feature->feature_key }} @if($feature->enabled) {{ __('Enabled') }} @else {{ __('Disabled') }} @endif @if($feature->enabled && $feature->limit !== null) {{ number_format($feature->limit) }} @elseif($feature->enabled) {{ __('Unlimited') }} @else -- @endif

{{ __('No feature limits configured for this plan.') }}

{{-- Recent Subscribers --}}

{{ __('Recent Subscribers') }}

{{ __('Latest active subscriptions on this plan (up to 10).') }}

@forelse($plan->subscriptions as $sub) @php $owner = $sub->workspace?->members?->firstWhere('pivot.role', 'owner'); @endphp @empty @endforelse
{{ __('Workspace') }} {{ __('Owner') }} {{ __('Billing Cycle') }} {{ __('Status') }} {{ __('Subscribed') }}
{{ strtoupper(substr($sub->workspace->name ?? '??', 0, 2)) }}
{{ $sub->workspace->name ?? __('Deleted workspace') }}
@if($owner)

{{ $owner->name }}

{{ $owner->email }}

@else -- @endif
{{ ucfirst($sub->billing_cycle ?? 'monthly') }} {{ __('Active') }} {{ $sub->created_at->format('M j, Y') }}

{{ __('No active subscribers on this plan.') }}

{{-- Actions --}}
{{ __('Back to Plans') }}
{{ __('Edit Plan') }}
@csrf @method('DELETE')