feature: form edit

This commit is contained in:
antv
2026-07-10 08:16:20 +07:00
parent 326e1f1028
commit a1ad7e738b
14 changed files with 509 additions and 165 deletions
@@ -50,17 +50,7 @@
@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 }}
MSNV: {{ $admin_record->senderUser->msnv }} {{ $admin_record->senderUser->mail }}
</div>
@else
{{ $mode === 'self' ? 'Nhận từ: ' : 'Từ: ' }}<span class="text-[#3462f7]">{{ $admin_record->sender }}</span>
@@ -69,17 +59,7 @@
@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 }}
MSNV: {{ $admin_record->receiverUser->msnv }} {{ $admin_record->receiverUser->mail }}
</div>
@else
{{ $mode === 'self' ? 'Gửi cho: ' : 'Tới: ' }}<span class="text-[#3462f7]">{{ $admin_record->receiver }}</span>
@@ -97,7 +77,7 @@
@empty
<tr>
<td colspan="4" class="px-6 py-12 text-center text-text-light font-medium text-base">
{{ $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.' }}
Chưa dữ liệu
</td>
</tr>
@endforelse