@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
{{ $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.
Checked in at {{ $local($today->check_in_at)->format('g:i A') }}
{{ $local($today->check_in_at)->format('g:i A') }}
–
{{ $local($today->check_out_at)->format('g:i A') }}
You've completed your check-in/out for today.
@endif