@php $tableID = isset($id) ? $id : "table_".rand(100,999) @endphp @php $curYear = date("Y") @endphp

@lang("content.list")

@foreach($last3years as $year) {{-- --}} @endforeach @foreach($last3years as $year) {{-- @if ($year == $curYear)--}} {{-- --}} {{-- @endif--}} @endforeach @foreach($list as $j => $user) @php $no = $j + 1 @endphp @php $picture = !is_null($user->thumb) ? '/storage/users/'.$user->thumb : '/assets/img/default-user-picture.png'; @endphp @foreach($last3years as $year) @php $search = $user->entitlements->where('year', intval($year)); @endphp @php $search = $search->count() ? $search->first() : null @endphp @php $pending = $days = $used = 0 @endphp {{-- @if ($year == $curYear)--}} {{-- --}} {{-- @endif--}} {{-- --}} @endforeach @endforeach
# @lang("content.picture") @lang("content.first_name") @lang("content.last_name") @lang("content.station") @lang("content.department") @lang("content.position") @lang("content.work_type"){{ $year }}{{ $year }}@lang("content.actions")
C/FEntitlement
(days)
@lang("content.leave_type") Used
(days)
Pending
(days)
Balance
(days)
{{ $no }} id}/edit") }}"> id}/edit") }}">{{ $user->first_name }} id}/edit") }}">{{ $user->last_name }} {{ $user->ap }} {{ count($user->department) ? $user->department[0]->name : "" }} {{ count($user->position) ? $user->position[0]->name : "" }} {{ workTypeSelected($user->work_type) }}{{ $search ? $search->cf : "" }} {{ $search && $search->entitlement ? $days = $search->entitlement : '0' }} {{ $search && $search->type ? $search->type : '0' }} {{ $search && $search->used ? $used = $search->used : '0' }} {{ $search ? $pending = $search->pending : null }} {{ getUserEntitlementTotalAvailable($search) }}{{ $days ? ($days - ($used ? $used : 0) - ($pending ? $pending : 0)) : "" }}