@extends('student.layouts.app') @php $isAr = app()->getLocale() === 'ar'; @endphp @section('title', $isAr ? 'سجل النقاط الكامل' : 'Full Points Log') @section('content')
{{-- Header --}}
{{ $isAr ? 'النقاط والمكافآت' : 'Points & Rewards' }} {{ $isAr ? 'سجل النقاط' : 'Points Log' }}

{{ $isAr ? 'سجل النقاط الكامل' : 'Full Points Log' }}

{{ $isAr ? 'الرصيد الحالي' : 'Balance' }}

{{ number_format($student->points_balance) }}

{{-- Transactions --}}

{{ $isAr ? 'جميع الحركات' : 'All Transactions' }}

@if($transactions->total()) {{ $transactions->firstItem() }}–{{ $transactions->lastItem() }} / {{ $transactions->total() }} @endif
@if($transactions->isEmpty())

{{ $isAr ? 'لا توجد حركات مسجلة بعد' : 'No transactions yet' }}

@else
@foreach($transactions as $tx)

{{ str_replace('_', ' ', $tx->action_key) }}

{{ optional($tx->awarded_at)->format('Y-m-d h:i A') }} · {{ optional($tx->awarded_at)->diffForHumans() }}

{{ $tx->points >= 0 ? '+' : '' }}{{ $tx->points }}
@endforeach
{{ $transactions->links() }}
@endif
@endsection