@props(['mode', 'user', 'administrations', 'selectedMonth'])
| 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)
@if($admin_record->senderUser)
{{ $mode === 'self' ? 'Nhận từ: ' : 'Từ: ' }}{{ $admin_record->senderUser->name }}
{{ $admin_record->senderUser->mail }} •
@php
$deptVal = $admin_record->senderUser->departments;
if (is_numeric($deptVal)) {
$idx = ((int)$deptVal) - 1;
$deptName = config('constants.DEPARTMENTS')[$idx] ?? 'Team';
} else {
$deptName = $deptVal ?? 'Team';
}
@endphp
{{ $deptName }}
@else
{{ $mode === 'self' ? 'Nhận từ: ' : 'Từ: ' }}{{ $admin_record->sender }}
@endif
@else
@if($admin_record->receiverUser)
{{ $mode === 'self' ? 'Gửi cho: ' : 'Tới: ' }}{{ $admin_record->receiverUser->name }}
{{ $admin_record->receiverUser->mail }} •
@php
$deptVal = $admin_record->receiverUser->departments;
if (is_numeric($deptVal)) {
$idx = ((int)$deptVal) - 1;
$deptName = config('constants.DEPARTMENTS')[$idx] ?? 'Team';
} else {
$deptName = $deptVal ?? 'Team';
}
@endphp
{{ $deptName }}
@else
{{ $mode === 'self' ? 'Gửi cho: ' : 'Tới: ' }}{{ $admin_record->receiver }}
@endif
@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.' }} | |||