@props(['mode', 'user', 'administrations', 'selectedMonth'])

@if($mode === 'self') Lịch sử nhận / gửi thẻ (Tháng {{ Carbon\Carbon::parse($selectedMonth)->format('m/Y') }}) @else Lịch sử nhận / gửi @endif

@forelse($administrations as $admin_record) @php $isReceiver = $admin_record->msnv == $user->msnv && $admin_record->received > 0; @endphp @empty @endforelse
Ngày {{ $mode === 'self' ? 'Loại giao dịch' : 'Hành động' }} {{ $mode === 'self' ? 'Đối tác' : 'Đối tượng' }} Số lượng
{{ Carbon\Carbon::parse($admin_record->date)->format('d/m/Y') }} @if($isReceiver) {{ $mode === 'self' ? 'Bạn đã nhận thẻ' : 'Nhận thẻ' }} @else {{ $mode === 'self' ? 'Bạn gửi tặng thẻ' : 'Gửi thẻ' }} @endif @if($isReceiver) {{ $mode === 'self' ? 'Nhận từ: ' : 'Từ: ' }}{{ $admin_record->sender }} @else {{ $mode === 'self' ? 'Gửi cho: ' : 'Tới: ' }}{{ $admin_record->receiver }} @endif @if($isReceiver) +{{ $admin_record->received }} @else -{{ $admin_record->sent }} @endif
{{ $mode === 'self' ? 'Bạn chưa có giao dịch gửi/nhận thẻ nào trong tháng này.' : 'Không có giao dịch nào trong tháng này.' }}
@if($administrations->hasPages())
{{ $administrations->links() }}
@endif