@extends('layouts.admin') @section('title', 'Attendance Details') @section('content')
Attendance Details
{{ $item->employee?->name }} | {{ optional($item->attendance_date)->format('d M Y') }} | {{ ucfirst($item->status) }} @foreach (['check_in' => 'Clock in', 'check_out' => 'Clock out'] as $event => $label) @endforeach
Time Where IP address
{{ $label }} {{ $item->{$event} ? \Illuminate\Support\Str::of($item->{$event})->substr(0, 5) : '—' }} @if ($item->{$event.'_outside'} === true) Outside @elseif ($item->{$event.'_outside'} === false) {{ $item->mapUrl($event) ? 'Office location' : 'Office WiFi' }} @else Not recorded @endif @if ($item->mapUrl($event)) {{ (float) $item->{$event.'_latitude'} }}, {{ (float) $item->{$event.'_longitude'} }} @if ($item->{$event.'_accuracy'} !== null) (±{{ $item->{$event.'_accuracy'} }} m) @endif @endif {{ $item->{$event.'_ip'} ?: '—' }}
@endsection