@extends('dashboard.app') @section('page_title', 'Admin Pricing') @section('page_subtitle', 'Manage plan pricing and rollout changes.') @section('dashboard_content') @if (session('status'))
{{ session('status') }}
@endif
@foreach ([ ['label' => 'Plans', 'value' => number_format(($plans ?? collect())->count()), 'note' => 'Active tiers'], ['label' => 'Pending changes', 'value' => number_format(($changes ?? collect())->count()), 'note' => 'Latest snapshots'], ['label' => 'Currency', 'value' => optional(($plans ?? collect())->first())->currency ?? 'IDR', 'note' => 'Default'], ] as $card)
{{ $card['label'] }}
{{ $card['value'] }}
{{ $card['note'] }}
@endforeach
@csrf @forelse ($plans ?? [] as $plan)
{{ $plan->code }}
{{ $plan->status }}
PayPal Plan IDs
Sandbox: {{ $plan->meta['paypal']['sandbox']['plan']['id'] ?? '—' }}
Live: {{ $plan->meta['paypal']['live']['plan']['id'] ?? '—' }}
Last sync: {{ $plan->meta['paypal']['live']['plan']['synced_at'] ?? $plan->meta['paypal']['sandbox']['plan']['synced_at'] ?? '—' }}
@empty
No pricing plans yet. Use reset to defaults to create base plans.
@endforelse
@csrf
@csrf
Change log
Recent pricing updates
@csrf
@forelse ($changes ?? [] as $change)
Pricing change #{{ $change->id }}
{{ $change->created_at?->toDateString() }} · {{ $change->admin_ref ?? 'system' }}
Published
@empty
No pricing changes recorded yet.
@endforelse
@endsection