@extends('layouts.super-admin', ['title' => 'Payments - Booklio Super Admin', 'pageTitle' => 'Payments / Transactions', 'active' => 'payments'])
@section('content')
@foreach ($kpis as $kpi)
@include('super-admin.partials.kpi', $kpi)
@endforeach
@forelse ($payments as $payment)
@php
$statusValue = $payment->status instanceof \App\Enums\PaymentStatus ? $payment->status->value : $payment->status;
$statusLabel = $payment->status instanceof \App\Enums\PaymentStatus ? $payment->status->label() : \Illuminate\Support\Str::headline((string) $payment->status);
$statusVariant = match ($statusValue) {
'paid' => 'success',
'pending' => 'warning',
'failed', 'cancelled' => 'danger',
default => 'muted',
};
@endphp
{{ $payment->plan?->name ?? 'No plan' }}
|
{{ \Illuminate\Support\Str::headline($payment->payment_method ?? 'manual') }} |
{{ $payment->transaction_id ?? 'Pending' }} |
{{ $statusLabel }} |
{{ ($payment->paid_at ?? $payment->created_at)?->format('M d, Y') ?? '-' }} |
Receipt |
@empty
| No payments found for the selected filters. |
@endforelse
@endsection