@extends('layouts.admin') @section('title', 'Daily Attendance Report') @php $time = fn ($value) => $value ? \Illuminate\Support\Str::of($value)->substr(0, 5) : null; @endphp @section('content')
@foreach ([['Clocked in', $summary['clocked_in'], 'success'], ['Clocked out', $summary['clocked_out'], 'primary'], ['Outside office', $summary['outside'], 'danger'], ['Not clocked in', $summary['not_clocked_in'], 'secondary']] as [$label, $value, $tone])
{{ $value }}
{{ $label }}
@endforeach
{{ $date->format('d M Y (l)') }}@if ($isToday) Today@endif
Outside marks a clock in or out made away from the office WiFi and outside the office range.
@if ($rows->isEmpty())

{{ $outsideOnly ? 'Nobody clocked in or out from outside the office on this day.' : 'No employees to show.' }}

@else
@foreach ($rows as ['employee' => $employee, 'attendance' => $attendance]) $attendance?->wasOutside()])> @foreach (['check_in', 'check_out'] as $event) @endforeach @endforeach
Employee Status Clock in Clock out Action
{{ $employee->name }} @if ($employee->branchOffice)
{{ $employee->branchOffice->name }} @endif
@if (! $attendance) Not clocked in @else {{ ucfirst($attendance->status) }} @endif @if ($attendance && $time($attendance->{$event})) {{ $time($attendance->{$event}) }} @if ($attendance->{$event.'_outside'} === true) Outside @elseif ($attendance->{$event.'_outside'} === false) {{ $attendance->mapUrl($event) ? 'Office location' : 'Office WiFi' }} @endif @if ($attendance->mapUrl($event))
View location @if ($attendance->{$event.'_accuracy'} !== null) (±{{ $attendance->{$event.'_accuracy'} }} m) @endif @endif @if ($attendance->{$event.'_ip'})
IP {{ $attendance->{$event.'_ip'} }} @endif @else — @endif
@if ($attendance) View @if (auth()->user()->hasRole('super-admin'))
@csrf @method('DELETE')
@endif @endif
@endif
Office WiFi & location
The public IP address of the office internet connection is checked first: staff on it clock in and out with one click. From anywhere else their location is taken and checked against the office range; outside it the entry is marked Outside.

You are connected from {{ $currentIp }} @if ($currentIpInOffice) Office WiFi @elseif ($officeAddresses) Outside @endif — open this page on the office WiFi to see the address to enter.

@if ($canEditNetwork)
@csrf @method('PUT') @error('office_ips')
{{ $message }}
@enderror
@error('office_latitude')
{{ $message }}
@enderror
@error('office_longitude')
{{ $message }}
@enderror
@error('office_radius')
{{ $message }}
@enderror
Leave the IP addresses and the location empty to switch the check off: everyone then clocks in and out with no location taken.
@else

@if ($officeAddresses) Office addresses: {{ implode(', ', $officeAddresses) }} @else No office WiFi has been set, so clock in and out does not check the network. @endif
@if ($officeLocation) Office location: {{ $officeLocation['latitude'] }}, {{ $officeLocation['longitude'] }} (within {{ $officeLocation['radius'] }} m) @else No office location has been set. @endif

@endif
@endsection @push('scripts') @endpush