{{-- Staff Selector (for admins) --}} @if($canMarkOthers && count($staffList) > 0)
@else
{{ $this->staff ? $this->staff->first_name . ' ' . $this->staff->last_name : 'Unknown' }}
@endif {{-- Live Clock --}}
{{ now()->format('D, d M Y') }}
{{-- No Shift Warning --}} @if($this->effectiveStaffId && !$this->hasShift)
⚠️ No shift assigned!
Contact admin to assign a shift.
@endif {{-- Message --}} @if($message)
{{ $message }}
@endif {{-- Today's Summary --}} @if($this->todayLogs->isNotEmpty())
{{ $this->formattedWorkedTime }}
Worked
{{ $this->formattedBreakTime }}
Break
{{ $this->todayLogs->count() }}
Entries
{{-- Current Status --}} @if($this->isCurrentlyCheckedIn)
Currently working since {{ $this->currentSessionStart->format('h:i A') }}
@else
On break / Not working
@endif
{{-- Today's Log --}}
Today's Log
@php $logs = $this->todayLogs; $lastCheckIn = null; @endphp @foreach($logs as $index => $log) @php $time = \Carbon\Carbon::parse($log->action_time); $duration = ''; if ($log->action === 'check_in') { $lastCheckIn = $time; } elseif ($log->action === 'check_out' && $lastCheckIn) { $mins = $lastCheckIn->diffInMinutes($time); $duration = sprintf('%dh %02dm', floor($mins/60), $mins%60); $lastCheckIn = null; } @endphp
@if($log->action === 'check_in') @else @endif
{{ $time->format('h:i A') }} {{ $log->action === 'check_in' ? 'IN' : 'OUT' }}
@if($log->location)
📍 {{ Str::limit($log->location, 40) }}
@endif
@if($duration)
{{ $duration }}
@endif
@endforeach
@endif {{-- Location Status --}}
@if($latitude) 📍 {{ $locationText ?: $latitude . ', ' . $longitude }} @else 📍 Click "Get Location" to enable @endif
{{-- Get Location Button --}} @if(!$latitude)
@endif {{-- Action Buttons --}}