@extends('layouts.portal') @section('title', 'Attendance') @section('page-header')

Attendance

Attendance record for {{ $child->full_name }}.

@endsection @section('content')
{{-- Rate dial --}}
@php $rate = $attendance['rate']; $color = $rate >= 90 ? '#10b981' : ($rate >= 75 ? '#f59e0b' : '#f43f5e'); @endphp
{{ $rate }}% attendance

{{ $rate >= 75 ? 'Meeting requirement' : 'Below 75% requirement' }}

{{-- Recent records --}}
    @forelse ($attendance['recent'] as $record)
  • {{ $record->date->format('D') }}
    {{ $record->date->format('d') }}

    {{ $record->date->format('l, j M Y') }}

    @if ($record->remarks)

    {{ $record->remarks }}

    @endif
    @php $map = ['present' => 'emerald', 'absent' => 'rose', 'late' => 'amber', 'excused' => 'sky', 'sick' => 'sky']; @endphp {{ ucfirst($record->status) }}
  • @empty
  • @endforelse
@endsection