@extends('parents.parent_dashboard') @section('customcss') @endsection @section('admin')
@if(session('success')) @endif @if(session('error')) @endif @if($students->isEmpty())
No Student Linked

No students are currently linked to your parent account.

@else @if($students->count() > 1) @endif @php $activeReg = $selectedStudent->classRegistration->first(); $todayFajr = old('fajr', $todayEntry ? $todayEntry->fajr : false); $todayDhuhr = old('dhuhr', $todayEntry ? $todayEntry->dhuhr : false); $todayAsr = old('asr', $todayEntry ? $todayEntry->asr : false); $todayMaghrib = old('maghrib', $todayEntry ? $todayEntry->maghrib : false); $todayIsha = old('isha', $todayEntry ? $todayEntry->isha : false); $todayRemarks = old('remarks', $todayEntry ? $todayEntry->remarks : ''); $todayTotal = ($todayFajr ? 1 : 0) + ($todayDhuhr ? 1 : 0) + ($todayAsr ? 1 : 0) + ($todayMaghrib ? 1 : 0) + ($todayIsha ? 1 : 0); @endphp
@php $photoPath = $selectedStudent->student_photo; $photoUrl = $photoPath ? (file_exists(public_path('storage/' . $photoPath)) ? asset('storage/' . $photoPath) : asset('storage/1.png')) : asset('storage/1.png'); @endphp Student
{{ $selectedStudent->student_name_english ?? $selectedStudent->student_name_bangla }}
Class: {{ $activeReg->class_model->name ?? $activeReg->class_model->class_name ?? 'N/A' }} Section: {{ $activeReg->section->name ?? $activeReg->section->section_name ?? 'N/A' }} Roll: {{ $activeReg->class_roll ?? $selectedStudent->admission_roll ?? 'N/A' }} Session: {{ $activeReg->session->name ?? $activeReg->session->session_name ?? 'N/A' }}
Daily Prayer Monitoring
Today's Waqts

{{ $todayTotal }} / 5 Waqts

This Month Total

{{ $monthlyTotalWaqt }} Waqts

5-Waqt Complete Days

{{ $monthlyAllFiveDays }} Days

All-Time Total Waqts

{{ $allTimeTotalWaqt }} Waqts

Daily Prayer Entry ({{ $todayDateStr }})
Select which prayers your child offered today and save the record.
Current Time: {{ $currentTimeStr }}
@if($cutoffPassed)
Today's Entry Deadline Expired!

Daily prayer records must be submitted before 11:00 PM. After 11:00 PM, entry for today or previous dates is closed.

@else
Submission Deadline Notice:

Entries must be completed by 11:00 PM today. Submissions for previous dates or after 11:00 PM are not permitted.

@endif
@csrf
🌅
Fajr
☀️
Dhuhr
🌤️
Asr
🌇
Maghrib
🌙
Isha
@if($todayEntry) Last updated: {{ $todayEntry->submitted_at ? $todayEntry->submitted_at->format('d M Y, h:i A') : $todayEntry->updated_at->format('d M Y, h:i A') }} @else No entry submitted yet today. @endif
@if(!$cutoffPassed) @else @endif
Recent Prayer Log (Last 30 Days)
Total Records: {{ $recentEntries->count() }} Days
@if($recentEntries->isEmpty())

No prayer records logged yet.

@else
@foreach($recentEntries as $entry) @endforeach
Date Fajr Dhuhr Asr Maghrib Isha Total Waqts Status Remarks
{{ $entry->entry_date->format('d M, Y') }}
{{ $entry->entry_date->format('l') }}
@if($entry->fajr) Fajr @else @endif @if($entry->dhuhr) Dhuhr @else @endif @if($entry->asr) Asr @else @endif @if($entry->maghrib) Maghrib @else @endif @if($entry->isha) Isha @else @endif {{ $entry->total_waqt }} / 5 @if($entry->is_all_five) All 5 Waqts @else {{ $entry->total_waqt }} Waqts @endif {{ $entry->remarks ?? '-' }}
@endif
@endif
@endsection