@extends('layouts.app') @section('title', 'Attendance') @section('page-icon', 'calendar-check') @section('content') {{-- Google Fonts: Oswald (headings/labels) + Inter (body) --}} @php // $selectedDate should be passed from the controller as 'Y-m-d' (defaults to today). // Falls back to request('date') or today's date if the controller hasn't been updated yet. $selectedDate = $selectedDate ?? request('date', \Carbon\Carbon::now()->format('Y-m-d')); $isToday = $selectedDate === \Carbon\Carbon::now()->format('Y-m-d'); @endphp
| S.No | Member | Phone | Date | Check In | Check Out | Status | Action |
|---|---|---|---|---|---|---|---|
| {{ $key + 1 }} | {{ $user->name }} | {{ $user->phone ?? 'N/A' }} | {{ \Carbon\Carbon::parse($selectedDate)->format('d M Y') }} | @if($attendance && $attendance->check_in) {{ $attendance->check_in }} @else — @endif | @if($attendance && $attendance->check_out) {{ $attendance->check_out }} @else — @endif | @if($attendance) @if($attendance->check_out) Completed @else In Progress @endif @else Absent @endif |
@if(!$isToday)
{{-- Past dates are read-only: no editing history --}}
—
@elseif(!$attendance)
@elseif(!$attendance->check_out)
@else
Done
@endif
|
No members foundNo members are registered yet. |
|||||||