diff --git a/app/resources/views/dashboard/user/billing.blade.php b/app/resources/views/dashboard/user/billing.blade.php index 94c5add..2968543 100644 --- a/app/resources/views/dashboard/user/billing.blade.php +++ b/app/resources/views/dashboard/user/billing.blade.php @@ -11,12 +11,23 @@ $hasSub = $subscription !== null; $orders = $orders ?? collect(); $payments = $payments ?? collect(); + $formatPlan = function (?string $code): string { + $value = (string) ($code ?? ''); + return match ($value) { + 'personal_monthly' => 'Personal Monthly', + 'personal_annual' => 'Personal Annual', + 'personal_lifetime' => 'Personal Lifetime', + 'free' => 'Free', + '' => 'Free', + default => \Illuminate\Support\Str::of($value)->replace('_', ' ')->title(), + }; + }; @endphp
Plan
-
{{ $hasSub ? ucfirst($subscription->plan ?? 'Personal') : 'Free' }}
+
{{ $hasSub ? $formatPlan($subscription->plan ?? 'Personal') : 'Free' }}
{{ $hasSub ? ucfirst($subscription->status ?? 'active') : 'No subscription' }}
@@ -93,7 +104,7 @@ @endphp {{ $payment->provider ?? '—' }} - {{ $payment->plan_code ?? '—' }} + {{ $formatPlan($payment->plan_code) }} {{ $payment->currency ?? 'USD' }} {{ number_format((float) ($payment->amount ?? 0), 2) }} {{ $status }} diff --git a/app/resources/views/dashboard/user/keywords.blade.php b/app/resources/views/dashboard/user/keywords.blade.php index 749f361..5f2db5a 100644 --- a/app/resources/views/dashboard/user/keywords.blade.php +++ b/app/resources/views/dashboard/user/keywords.blade.php @@ -133,10 +133,10 @@