@extends('layouts.admin') @section('title', 'Employee Details') @section('content')
@if($employee->profile_picture) @else {{ strtoupper(substr($employee->first_name, 0, 1)) }}{{ strtoupper(substr($employee->last_name, 0, 1)) }} @endif

{{ $employee->first_name }} {{ $employee->last_name }}

Admin View
{{ $employee->phone_number }} ID: {{ $employee->employee_id }} {{ $employee->jobRole->name ?? 'No Role' }}
{{ $employee->active ? 'Active Status' : 'Inactive Status' }} Company: {{ $employee->company->name ?? 'N/A' }} Employee ID: {{ $employee->employee_id }}
@if($employee->profile_picture) @else {{ strtoupper(substr($employee->first_name, 0, 1)) }}{{ strtoupper(substr($employee->last_name, 0, 1)) }} @endif

{{ $employee->first_name }} {{ $employee->last_name }}

{{ $employee->jobRole->name ?? 'No Role Assigned' }}

{{ $employee->email }}
{{ $employee->phone_number }}

General Information

BirthDate {{ $employee->dob }}
Gender {{ ucfirst($employee->gender) }}
Status {{ ucfirst($employee->marital_status) }}
Department {{ $employee->department->name ?? 'N/A' }}
Total Hrs Worked @php $totalMinutes = $employee->schedules() ->wherePivotNotNull('actual_start_at') ->wherePivotNotNull('actual_end_at') ->get() ->sum(function ($job) { $start = \Carbon\Carbon::parse($job->pivot->actual_start_at); $end = \Carbon\Carbon::parse($job->pivot->actual_end_at); return $start->diffInMinutes($end); }); @endphp {{ round($totalMinutes / 60, 1) }}h

Address Information

Permanent Address {{ $employee->permanent_address_line_1 }}
@if($employee->permanent_address_line_2){{ $employee->permanent_address_line_2 }}
@endif {{ $employee->permanent_city }}, {{ $employee->permanentState->name ?? '' }} {{ $employee->permanent_zip_code }}
{{ $employee->permanentCountry->name ?? '' }}
Corresponding Address {{ $employee->corresponding_address_line_1 ?: 'N/A' }}
@if($employee->corresponding_address_line_2){{ $employee->corresponding_address_line_2 }}
@endif @if($employee->corresponding_city) {{ $employee->corresponding_city }}, {{ $employee->correspondingState->name ?? '' }} {{ $employee->corresponding_zip_code }}
{{ $employee->correspondingCountry->name ?? '' }} @endif

Licence & Employment

License Number {{ $employee->license_number }}
License Expiry {{ $employee->license_expiry }}
Issuing Province {{ $employee->licence_issuing_province ?? 'N/A' }}
Hiring Date {{ $employee->employment_date }}
Manager {{ $employee->reporting_manager ?? 'N/A' }}
SIN Number {{ $employee->sin_number ?? 'N/A' }}

Skills & Force Capabilities

@forelse($employee->skills as $skill) {{ $skill->name }} @empty No specialized skills assigned to this operative. @endforelse

Employee Dossier (Documents)

@php $docs = [ ['label' => 'License File', 'path' => $employee->file_license], ['label' => 'Employment Contract', 'path' => $employee->file_contract], ['label' => 'Direct Deposit', 'path' => $employee->file_direct_deposit], ['label' => 'Profile Picture', 'path' => $employee->profile_picture] ]; @endphp @foreach($docs as $doc) @if($doc['path'])
{{ $doc['label'] }}
{{ basename($doc['path']) }}
@endif @endforeach @foreach($employee->identifications as $idFile)
ID Document
{{ basename($idFile->file_path) }}
@endforeach
@php $hasAnyDoc = $employee->file_license || $employee->file_contract || $employee->file_direct_deposit || $employee->profile_picture || $employee->identifications->isNotEmpty(); @endphp @if(!$hasAnyDoc)

No classified documents found in this dossier.

@endif

Active Bans

@if($employee->bannedSites->isEmpty())
This employee is not banned from any sites.
@else
@foreach($employee->bannedSites as $site)

{{ $site->name }}

{{ $site->site_id }}

Reason: {{ $site->pivot->reason ?? 'No reason provided' }}

Banned: {{ \Carbon\Carbon::parse($site->pivot->banned_at)->format('M d, Y') }}

@endforeach
@endif

Issued Uniforms

@if($employee->issuedUniforms->isEmpty())
No uniforms assigned to this employee.
@else
@foreach($employee->issuedUniforms as $issued) @endforeach
Uniform Item Variant Details Qty Issued On Notes
{{ $issued->variant->uniform->name }} @if($issued->variant->size) {{ $issued->variant->size }} @endif @if($issued->variant->color) {{ $issued->variant->color }} @endif {{ $issued->quantity }} {{ $issued->issued_at->format('M d, Y') }} {{ $issued->notes ?? '-' }}
@endif

Availability Settings

@csrf
@php $days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']; $unavailable = $employee->unavailable_days ?? []; @endphp @foreach($days as $day) @endforeach
@endsection