@if (session('status') === 'subscription-cancelled')
{{ __('Your subscription has been cancelled. You keep premium access until the end of your current period.') }}
@endif
@php
$isYearly = str_ends_with($user->subscription_plan ?? '', 'yearly');
$planAmounts = [
'monthly' => '9.00',
'yearly' => '70.00',
'pro_monthly' => '15.00',
'pro_yearly' => '117.00',
];
$nextAmount = $planAmounts[$user->subscription_plan] ?? null;
@endphp
{{-- Member number — always visible --}}
{{ __('Member number') }}
{{ sprintf('ND-%05d', $user->id) }}
{{-- Status row — tier badge + running/cancelled state --}}
{{ __('Status') }}
@if ($user->isOrg())
🏢
@if ($user->subscription_status === 'cancelled')
{{ __('Cancelled as of :date', ['date' => $user->subscription_ends_at?->format('d/m/Y') ?? '?']) }}
@elseif ($user->subscription_status === 'trial')
{{ __('Organisation') }} — {{ __('Trial') }}
@elseif ($user->subscription_status)
{{ __('Organisation') }} — {{ __('Running') }}
@else
{{ __('Organisation') }}
@endif
@elseif ($user->is_pro)
🏅
@if ($user->subscription_status === 'cancelled')
{{ __('Cancelled as of :date', ['date' => $user->subscription_ends_at?->format('d/m/Y') ?? '?']) }}
@else
{{ __('PRO') }} — {{ __('Running') }}
@endif
@elseif ($user->is_premium)
💎
@if ($user->subscription_status === 'cancelled')
{{ __('Cancelled as of :date', ['date' => $user->subscription_ends_at?->format('d/m/Y') ?? '?']) }}
@else
{{ __('Premium') }} — {{ __('Running') }}
@endif
@else
{{ __('Free account') }}
@endif
@if ($user->is_premium)
{{-- Billing interval --}}
{{ __('Billing') }}
@if ($user->subscription_plan)
{{ $isYearly ? __('Yearly') : __('Monthly') }}
@else
—
@endif
{{-- Next payment date + amount (or access-until for cancelled) --}}
{{ $user->subscription_status === 'cancelled' ? __('Access until') : __('Date of next payment') }}
{{ $user->subscription_ends_at?->format('d/m/Y') ?? '—' }}
@if ($user->subscription_status !== 'cancelled' && $nextAmount)
— €{{ $nextAmount }}
@endif
{{-- Subscription start date --}}
{{ __('Subscribed on') }}
{{ $user->subscription_started_at?->format('d/m/Y') ?? '—' }}
{{-- Payment reference --}}
{{ __('Payment reference') }}
{{ $user->subscription_payment_ref ?? '—' }}
@endif
{{-- Actions --}}
@if ($user->is_premium && $user->subscription_status !== 'cancelled' && $switchPlan)
@php
$isUpgrade = str_ends_with($switchPlan['key'], 'yearly');
$isPro = str_starts_with($switchPlan['key'], 'pro');
$monthlyCost = $isPro ? '15.00' : '9.00';
$yearlyCost = $isPro ? '117.00' : '70.00';
$saving = number_format((float)$monthlyCost * 12 - (float)$yearlyCost, 2);
$switchLabel = $isUpgrade
? __('Switch to Yearly') . ' — €' . $yearlyCost . __('/year') . ' (' . __('save') . ' €' . $saving . ')'
: __('Switch to Monthly') . ' — €' . $monthlyCost . __('/month');
$switchConfirm = $isUpgrade
? __('Switch to yearly billing? Your new yearly cycle starts after your current period ends.')
: __('Switch to monthly billing? Your new monthly cycle starts after your current period ends.');
@endphp
@endif
@if ($user->is_premium && $user->subscription_status !== 'cancelled')
@elseif ($user->is_premium && $user->subscription_status === 'cancelled')
{{ $user->isOrg() ? '🏢' : '💎' }} {{ __('Resubscribe') }}
@elseif ($user->isOrg())
🏢 {{ __('Subscribe to ORG') }}
@elseif ($user->isIndividualPro())
🏅 {{ __('Subscribe to PRO') }}
@else
💎 {{ __('Upgrade to Premium') }}
@endif
@php
$user = auth()->user();
$backUrl = $user->isOrg() && $user->orgProfile?->slug
? route('org.show', $user->orgProfile)
: ($user->isIndividualPro() && $user->proProfile
? route('pro.show', $user->proProfile)
: ($user->profile ? route('profiles.show', $user->profile) : null));
@endphp
@if($backUrl)
← {{ __('Back to profile') }}
@endif