feat: display sender/receiver name, email, department in transaction history
This commit is contained in:
@@ -47,9 +47,43 @@
|
||||
</td>
|
||||
<td class="px-6 py-3.5 whitespace-nowrap font-bold text-[#1a2b49]">
|
||||
@if($isReceiver)
|
||||
{{ $mode === 'self' ? 'Nhận từ: ' : 'Từ: ' }}<span class="text-[#3462f7]">{{ $admin_record->sender }}</span>
|
||||
@if($admin_record->senderUser)
|
||||
{{ $mode === 'self' ? 'Nhận từ: ' : 'Từ: ' }}<span class="text-[#3462f7]">{{ $admin_record->senderUser->name }}</span>
|
||||
<div class="text-[11px] text-gray-400 font-medium mt-1.5 leading-none">
|
||||
{{ $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 }}
|
||||
</div>
|
||||
@else
|
||||
{{ $mode === 'self' ? 'Nhận từ: ' : 'Từ: ' }}<span class="text-[#3462f7]">{{ $admin_record->sender }}</span>
|
||||
@endif
|
||||
@else
|
||||
{{ $mode === 'self' ? 'Gửi cho: ' : 'Tới: ' }}<span class="text-[#3462f7]">{{ $admin_record->receiver }}</span>
|
||||
@if($admin_record->receiverUser)
|
||||
{{ $mode === 'self' ? 'Gửi cho: ' : 'Tới: ' }}<span class="text-[#3462f7]">{{ $admin_record->receiverUser->name }}</span>
|
||||
<div class="text-[11px] text-gray-400 font-medium mt-1.5 leading-none">
|
||||
{{ $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 }}
|
||||
</div>
|
||||
@else
|
||||
{{ $mode === 'self' ? 'Gửi cho: ' : 'Tới: ' }}<span class="text-[#3462f7]">{{ $admin_record->receiver }}</span>
|
||||
@endif
|
||||
@endif
|
||||
</td>
|
||||
<td class="px-6 py-3.5 whitespace-nowrap font-extrabold text-base">
|
||||
|
||||
Reference in New Issue
Block a user