@extends('layouts.admin') @section('title', 'Points History — ' . $user->full_name) @section('page-title', 'Points History') @section('content')
{{ $user->full_name }} / Points History

{{ $user->full_name }}

{{ $user->membership_number }} · Current balance: {{ number_format($user->points_balance) }} pts

{{-- Desktop header --}}
@forelse($transactions as $tx) {{-- Desktop row --}} {{-- Mobile row --}}

{{ $tx->description }}

{{ $tx->created_at->format('d M Y · h:i A') }}

@if($tx->visit_date)

Visit: {{ \Carbon\Carbon::parse($tx->visit_date)->format('d M Y') }}

@endif

{{ $tx->isCredit() ? '+' : '−' }}{{ number_format($tx->amount) }}

Bal: {{ number_format($tx->balance_after) }}

@empty
No transactions recorded yet.
@endforelse
@if($transactions->hasPages())
{{ $transactions->links() }}
@endif
@endsection