General Information:

@php $profilePicture = null; foreach ($model->getMedia() as $item) { if ($item->name === 'profile_picture') { $profilePicture = $item; break; } } @endphp @if($profilePicture && in_array($profilePicture->mime_type, ['image/jpeg', 'image/png', 'image/gif', 'application/pdf'])) Profile Picture @else
@endif
exclude_from_expiry ? 'checked' : '' }}>
@lang('models/stafprofile.fields.name') {{ $profile->name }}
@lang('models/stafprofile.fields.last_name') {{ $profile->last_name }}
@lang('models/stafprofile.fields.mobile_no') {{ $profile->mobile_no }}
@lang('models/stafprofile.fields.home_mobile_no') {{ $profile->home_mobile_no }}
@lang('models/stafprofile.fields.staf_type') {{ $profile->staf_type }}
@lang('models/stafprofile.fields.nationality') {{ $profile->nationality }}
@lang('models/stafprofile.fields.gender') {{ $profile->gender }}
@lang('models/stafprofile.fields.joining_date') {{ $profile->joining_date }}
@lang('models/stafprofile.fields.total_leaves') {{ config('enum.total_staff_leaves') }}
@lang('models/stafprofile.fields.leaves_available') {{ $profile->remainingLeaveDays() }}

Expiry Dates:

@lang('models/stafprofile.fields.passport_expiry') {{ $profile->passport_expiry }}
@lang('models/stafprofile.fields.visa_expiry') {{ $profile->visa_expiry }}
@lang('models/stafprofile.fields.emirates_id_expiry') {{ $profile->emirates_id_expiry }}
@lang('models/stafprofile.fields.labor_card_expiry') {{ $profile->labor_card_expiry }}
@if($profile->staf_type == 'Driver')
@lang('models/stafprofile.fields.driver_permit_expiry') {{ $profile->driver_permit_expiry }}
@endif

More Info:

@lang('models/stafprofile.fields.last_vacation_start') {{ $profile->last_vacation_start }}
@lang('models/stafprofile.fields.last_increment') {{ $profile->last_increment }}
@lang('models/stafprofile.fields.last_vacation_days') {{ $profile->last_vacation_days }}
@lang('models/stafprofile.fields.last_increment_amount') {{ $profile->last_increment_amount }}
@lang('models/stafprofile.fields.joining_date_after_vacation') {{ $profile->last_vacation_end }}
@lang('models/stafprofile.fields.joining_date') {{ $profile->joining_date }}

Tickets:

@if($profile->tickets->isEmpty())

No tickets available for this staff member.

@else
@foreach($profile->tickets as $ticket) @endforeach
Ticket Date Agent Name Travel Type Travel Date Return Date Amount Total Value Payment Status View
{{ $ticket->ticket_date }} {{ $ticket->agent_name }} {{ $ticket->travel_type }} {{ $ticket->travel_date }} {{ $ticket->return_date ?: 'N/A' }} {{ number_format($ticket->amount, 2) }} {{ number_format($ticket->total_value, 2) }} {{ ucfirst($ticket->payment_status) }} View
@endif

Approved Absences:

@php $approvedAbsences = $profile->approvedAbsences()->get(); @endphp @if($approvedAbsences->isEmpty())

No approved absences recorded.

@else
Total Absences {{ $approvedAbsences->count() }}
This Month @php $thisMonth = $approvedAbsences->filter(function($item) { return $item->attendance_date->format('Y-m') === now()->format('Y-m'); })->count(); @endphp {{ $thisMonth }}
This Year @php $thisYear = $approvedAbsences->filter(function($item) { return $item->attendance_date->format('Y') === now()->format('Y'); })->count(); @endphp {{ $thisYear }}
Last Absence @php $lastAbsence = $approvedAbsences->first(); @endphp {{ $lastAbsence ? $lastAbsence->attendance_date->format('M d, Y') : 'N/A' }}
@foreach($approvedAbsences as $key => $absence) @endforeach
# Date Day Foreman Status Approved On
{{ $key + 1 }} {{ $absence->attendance_date->format('M d, Y') }} {{ $absence->attendance_date->format('l') }} {{ $absence->foreman->name ?? 'Unknown' }} Approved {{ $absence->updated_at->format('M d, Y H:i') }}
@endif

Letters:

Documents Uploaded

@include('components.model_files', ['model' => $profile])