@extends('layouts.portal') @section('title', 'Attendance') @section('subtitle', 'Mark registers quickly, then review or amend recent ones.') @section('actions')
@endsection @section('content') @php $lockDays = (int) config('infotics.attendance.trainer_edit_days', 7); @endphp
@if($pending->isEmpty())
@else
{{ $pending->count() }} register{{ $pending->count() === 1 ? '' : 's' }} to complete. Open a class, tap Present for everyone and change only the exceptions. It takes about 20 seconds.
@foreach($pending as $s)
{{ $s->starts_at->format('d') }}{{ $s->starts_at->format('M') }}
{{ $s->batch->course->title }}
{{ $s->displayTitle() }}@if($s->topic) · {{ $s->topic }}@endif
{{ $s->starts_at->format('D g:i A') }} {{ $s->batch->batch_code }}{{ $s->starts_at->isFuture() ? 'Starts '.$s->starts_at->diffForHumans() : 'Held '.$s->starts_at->diffForHumans() }}
@endforeach
@endif
@if($taken->isEmpty())
@else
@foreach($taken as $s) @php $locked = $s->taken_at->lte(now()->subDays($lockDays)); @endphp @endforeach
ClassBatchAttendedTaken
{{ $s->starts_at->format('D, d M Y') }}
{{ $s->displayTitle() }} · {{ $s->starts_at->format('g:i A') }}
{{ $s->batch->course->title }}
{{ $s->batch->batch_code }}
{{ $s->present_count }} / {{ $s->total_count }}
{{ $s->taken_at->diffForHumans() }} @if($locked) Locked View@else Edit register@endif

Registers can be edited for {{ $lockDays }} days after they are taken. After that only an administrator can amend them.

@endif
@endsection