@extends('layouts.dashboard') @section('title', 'All Employees Tracking') @section('content')

All Employees Tracking

Total Employees

{{ $employees->count() }}

Active Now

0

With Location

0

@foreach($employees as $employee) @php $currentVisit = $employee->currentVisit; $isActive = $currentVisit && $currentVisit->status == 'in_progress'; @endphp @endforeach
Employee Department Current Status Last Location Last Update Actions
@if($employee->profile_picture) {{ $employee->name }} @else @endif
{{ $employee->name }}
{{ $employee->employee_id }}
{{ $employee->phone }}
@if($employee->department)
{{ $employee->department->name }}
@else N/A @endif
@if($isActive) Active
{{ $currentVisit->client->name ?? 'On Visit' }}
@else Not Active @endif
@if($currentVisit && $currentVisit->current_address) {{ Str::limit($currentVisit->current_address, 30) }} @else Not available @endif
@if($currentVisit) {{ $currentVisit->updated_at->diffForHumans() }} @else N/A @endif
@if($isActive) @endif
@endsection