@props(['today', 'staffShift' => null, 'role' => 'Teacher', 'personName' => null, 'checkInAction' => null, 'checkOutAction' => null]) @php $statusColors = ['present' => 'green', 'late' => 'amber', 'absent' => 'red']; $personName ??= auth()->user()->name; $checkInAction ??= route('tenant.teacher.my-attendance.check-in'); $checkOutAction ??= route('tenant.teacher.my-attendance.check-out'); $tenantTimezone = \App\Support\Facades\Tenancy::get()->timezone ?? config('app.timezone'); $local = fn ($carbon) => $carbon?->copy()->setTimezone($tenantTimezone); @endphp

{{ today()->format('l, M j') }}

@if($staffShift)

{{ $staffShift->name }} · Check in by {{ \Illuminate\Support\Carbon::parse($staffShift->check_in_by)->format('g:i A') }}

@endif @if(! $today || ! $today->check_in_at)

You haven't checked in today.

@elseif(! $today->check_out_at)

Checked in at {{ $local($today->check_in_at)->format('g:i A') }} {{ $today->statusLabel() }}

@if($today->checkInMapUrl()) View check-in location @endif @else

{{ $local($today->check_in_at)->format('g:i A') }} – {{ $local($today->check_out_at)->format('g:i A') }} {{ $today->statusLabel() }}

@if($today->checkInMapUrl()) Check-in location @endif @if($today->checkOutMapUrl()) Check-out location @endif

You've completed your check-in/out for today.

@endif