@php $onTimeLoans = max(0, $activeLoans - $overdueLoans); $onTimeRate = $activeLoans > 0 ? (int) round(($onTimeLoans / $activeLoans) * 100) : 0; $overdueRate = $activeLoans > 0 ? 100 - $onTimeRate : 0; @endphp Add librarian

{{ now('Asia/Jakarta')->format('l, d F Y') }}

Library overview

{{ $activeLoans }} active {{ \Illuminate\Support\Str::plural('loan', $activeLoans) }}, {{ $overdueLoans }} overdue, and {{ $activeReservations }} {{ \Illuminate\Support\Str::plural('reservation', $activeReservations) }} to watch.

View reports

Recent loans

The latest borrowing activity in the library.

View report
@if ($recentLoans->isEmpty()) @else
@foreach ($recentLoans as $loan) @php($overdue = $loan->status === \App\Enums\LoanStatus::Borrowed && $loan->due_date->isBefore(today())) @endforeach
Book Member Borrowed Due Status

{{ $loan->book?->title ?? '—' }}

{{ $loan->book?->author }}

{{ $loan->member?->name ?? '—' }} {{ $loan->borrow_date?->format('d M Y') ?? '—' }} {{ $loan->due_date?->format('d M Y') ?? '—' }} @if ($loan->status === \App\Enums\LoanStatus::Returned) Returned @elseif ($overdue) Overdue @else Borrowed @endif
@endif