@extends('layouts.app') @section('title', 'Attendance Rule Details') @section('content') @php /* |-------------------------------------------------------------------------- | Safe Time Formatter |-------------------------------------------------------------------------- | | Your AttendanceRule model casts time fields as datetime, so normally | these values are Carbon instances. This helper also safely handles | string values if the cast is changed later. | */ $formatTime = function ($time) { if (blank($time)) { return '—'; } try { return $time instanceof \Carbon\CarbonInterface ? $time->format('h:i A') : \Carbon\Carbon::parse($time)->format('h:i A'); } catch (\Throwable $exception) { return (string) $time; } }; $schoolStart = $attendanceRule->school_start_time; $schoolEnd = $attendanceRule->school_end_time; $workingDuration = null; if ($schoolStart && $schoolEnd) { try { $start = $schoolStart instanceof \Carbon\CarbonInterface ? $schoolStart->copy() : \Carbon\Carbon::parse($schoolStart); $end = $schoolEnd instanceof \Carbon\CarbonInterface ? $schoolEnd->copy() : \Carbon\Carbon::parse($schoolEnd); $workingDuration = $start->diffInMinutes($end); } catch (\Throwable $exception) { $workingDuration = null; } } $workingHours = $workingDuration !== null ? floor($workingDuration / 60) : null; $workingMinutes = $workingDuration !== null ? $workingDuration % 60 : null; @endphp
Attendance timing, threshold and processing configuration.
Academic Year
{{ $attendanceRule->academicYear?->name ?? '—' }}
School Starts
{{ $formatTime($attendanceRule->school_start_time) }}
School Ends
{{ $formatTime($attendanceRule->school_end_time) }}
Grace Period
{{ number_format($attendanceRule->grace_minutes) }} min
General information and school timing configuration.
Quick overview of the configured school schedule.
Scheduled Duration
@if($workingDuration !== null) {{ $workingHours }}h {{ $workingMinutes }}m @else — @endif
Based on configured school start and end time.
Check-In Opens
{{ $formatTime($attendanceRule->check_in_start_time) }}
School Starts
{{ $formatTime($attendanceRule->school_start_time) }}
Check-Out Opens
{{ $formatTime($attendanceRule->check_out_start_time) }}
School Ends
{{ $formatTime($attendanceRule->school_end_time) }}
Time thresholds used when calculating attendance status.
Grace Period
{{ number_format($attendanceRule->grace_minutes) }} min
Late After
{{ number_format($attendanceRule->late_after_minutes) }} min
Half Day After
{{ number_format($attendanceRule->half_day_after_minutes) }} min
Minimum Working
{{ number_format($attendanceRule->minimum_working_minutes) }} min
Early Leave Before
{{ number_format($attendanceRule->early_leave_before_minutes) }} min
Behaviour enabled for attendance recording and correction.
Automatic Checkout
Automatically checkout students without a checkout punch.
Manual Attendance
Authorized users can record attendance manually.
Manual Correction
Authorized users can correct attendance records.
Multiple Punch
Allow multiple attendance punches during the same day.
Manage this attendance rule record.
Edit Attendance Rule
Update timing, thresholds and processing settings.