@php $tableID = isset($id) ? $id : "table_".rand(100,999) @endphp
| # | @lang("content.picture") | @lang("content.first_name") | @lang("content.last_name") | @lang("content.station") | @lang("content.department") | @lang("content.position") | @lang("content.work_type") | @foreach($last3years as $year){{ $year }} | @endforeach@lang("content.actions") | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Entitlement (days) |
@lang("content.leave_type") | Used (days) |
Pending (days) |
Balance (days) |
@endforeach
|||||||||
| {{ $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) }} | @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{{ $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 }} | {{ $days ? ($days - ($used ? $used : 0) - ($pending ? $pending : 0)) : "" }} | @endforeachid}/edit" }}" class="btn btn-warning btn-sm">@lang("content.edit") |