@props(['mode', 'user' => null, 'administrations' => null, 'selectedMonth' => null, 'addCards' => null, 'admins' => null]) @if($mode === 'self' && $user)

My Page

Thẻ hiện có: {{ $user->card }}
@endif
@if($mode === 'create')
@else @endif
@if(in_array($mode, ['edit', 'delete', 'self']) && $user && $administrations)
@if($mode === 'edit' && isset($addCards))

Lịch sử cấp phát thẻ

@forelse($addCards as $addCard) @php $isCurrentMonth = Carbon\Carbon::parse($addCard->date)->format('Y-m') === Carbon\Carbon::now()->format('Y-m'); @endphp @empty @endforelse
Ngày cấp Người cấp (Admin) Số lượng thẻ Hành động
{{ Carbon\Carbon::parse($addCard->date)->format('d/m/Y') }} @if($addCard->sellerUser) {{ $addCard->sellerUser->name }} (MSNV: {{ $addCard->seller }}) @else MSNV: {{ $addCard->seller }} @endif +{{ $addCard->num_card }} @if($isCurrentMonth) @else Tháng trước @endif
Chưa có lịch sử cấp phát thẻ nào.
@endif
@endif
@if($mode === 'edit' && isset($addCards) && isset($admins))
@csrf @method('PUT')
@endif