@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 === 'edit' && $user)
{{ strtoupper(substr($user->name ?? $user->msnv, 0, 1)) }}

{{ $user->name }}

{{ $user->mail }}

@if($user->role == config('constants.ROLE_ADMIN')) Admin @else Member @endif @if($user->status == config('constants.STATUS_ACTIVE')) Đang làm việc @else Đã nghỉ việc @endif
🎫
Số thẻ hiện có {{ $user->card }}
@if($administrations)

Lịch sử hoạt động

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