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

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

Employee Profile
{{ $employee->phone_number }} ID: {{ $employee->employee_id }} {{ $employee->jobRole->name ?? 'No Role' }}
Active Status Employee ID: {{ $employee->employee_id }}
@if($employee->profile_picture) @else {{ substr($employee->first_name, 0, 1) }}{{ 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' }}

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 }}
Reporting Manager {{ $employee->reporting_manager ?? 'N/A' }}
SIN Number {{ $employee->sin_number ?? 'N/A' }}

Experience Details

@forelse($employee->experiences as $experience)
{{ $experience->company_name }} {{ $experience->start_date ? \Carbon\Carbon::parse($experience->start_date)->format('M Y') : 'N/A' }} - {{ $experience->end_date ? \Carbon\Carbon::parse($experience->end_date)->format('M Y') : 'Present' }}
@if($experience->proof_document) View Proof @endif
@if($experience->reason_for_leaving)
Reason for Leaving:

{{ $experience->reason_for_leaving }}

@endif
@empty
No experience details added.
@endforelse

Skills & Attributes

@forelse($employee->skills as $skill) {{ $skill->name }} @empty No skills or attributes assigned. @endforelse

Assign Uniform

@csrf

Issued Uniforms History

@forelse($employee->issuedUniforms as $issued) @empty @endforelse
Item Variant Qty Issued Date Notes
{{ $issued->variant->uniform->name }} {{ $issued->variant->size }} / {{ $issued->variant->color }} {{ $issued->quantity }} {{ $issued->issued_at->format('M d, Y') }} {{ $issued->notes ?? '-' }}
No uniforms issued to this employee yet.

Employee Documents

@if($employee->file_license)
License File
{{ basename($employee->file_license) }}
@endif @if($employee->file_contract)
Employment Contract
{{ basename($employee->file_contract) }}
@endif @if($employee->file_direct_deposit)
Direct Deposit
{{ basename($employee->file_direct_deposit) }}
@endif @if($employee->profile_picture)
Profile Picture
{{ basename($employee->profile_picture) }}
@endif @foreach($employee->identifications as $idFile)
ID Document
{{ basename($idFile->file_path) }}
@endforeach
@if(!$employee->license_file_path && !$employee->employment_contract_path && !$employee->direct_deposit_file_path && !$employee->profile_picture_path && $employee->identifications->isEmpty())
No documents found.
@endif

Add New Site Bans

@csrf
@php $availableSitesCount = 0; @endphp @foreach($sites as $site) @if(!$employee->bannedSites->contains($site->id)) @php $availableSitesCount++; @endphp @endif @endforeach @if($availableSitesCount === 0)
No sites available to ban (Employee may be banned from all sites).
@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') }}

@csrf @method('DELETE')
@endforeach
@endif

Availability Settings

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

Registered Devices (FCM Tokens)

@if($employee->fcmTokens->isEmpty())
No devices registered.
@else
@foreach($employee->fcmTokens as $token) @endforeach
Device ID Type Token (Truncated) Last Updated
{{ $token->device_id ?? 'N/A' }} {{ ucfirst($token->device_type ?? 'Unknown') }} {{ \Illuminate\Support\Str::limit($token->token, 50) }} {{ $token->updated_at->format('M d, Y H:i:s') }}
@endif
@endsection