@extends('dashlayouts.app') @section('content')

Murid

@include('errors')
Maklumat Murid
@if($student->image_path) Student Image @else Student Image @endif
Nama Murid: {{ $student->student_name }}
ID Murid: {{ $student->student_id }}
Sekolah: {{ $student->nama_pusat }}
Serial Kad: {{ $student->serial_no }}
Status Kehadiran:

@if ($student->attendance_status == 0) Aktif @elseif ($student->attendance_status == 1) 1/3 @elseif ($student->attendance_status == 2) 2/3 @elseif ($student->attendance_status == 3) 3/3 - AMARAN @endif

@if( $flag_replacement == 1 ) @endif {{-- --}}
{{--
@if(session('logoPath')) School Logo @endif
--}}
Jadual Kelas Murid - 2025/{{ $student->kod_pusat}}/{{ $student->kelas}}
@if(session('subscription_type') == 'PREMIUM')
@foreach($weekdays as $day) @endforeach @php $startTime = \Carbon\Carbon::createFromTimeString('07:00'); $endTime = \Carbon\Carbon::createFromTimeString('18:30'); $currentTime = $startTime->copy(); @endphp @while ($currentTime->lte($endTime)) @php $nextTime = $currentTime->copy()->addMinutes(30); @endphp @foreach($weekdays as $day) @php $session = $class_sessions[$day]->filter(function ($session) use ($currentTime, $nextTime) { $start = \Carbon\Carbon::createFromFormat('H:i:s', $session->mula_kelas); $end = \Carbon\Carbon::createFromFormat('H:i:s', $session->tamat_kelas); return ($start->lt($nextTime) && $end->gt($currentTime)); })->first(); @endphp @if ($session) @php $color = $color_map[$session->code_sub] ?? '#ffffff'; // Default color if not found @endphp @else @endif @endforeach @php $currentTime = $nextTime; @endphp @endwhile
Waktu{{ $day }}
{{ $currentTime->format('H:i') }} - {{ $nextTime->format('H:i') }}
{{ $session->code_sub }}
{{--
{{ $session->subjek }}
--}}
{{ $session->teacher_id }}
@else
@foreach($weekdays as $day) @endforeach @php $startTime = \Carbon\Carbon::createFromTimeString('07:00'); $endTime = \Carbon\Carbon::createFromTimeString('18:30'); $currentTime = $startTime->copy(); @endphp @while ($currentTime->lte($endTime)) @php $nextTime = $currentTime->copy()->addMinutes(30); @endphp @foreach($weekdays as $day) @php $session = $class_sessions[$day]->filter(function ($session) use ($currentTime, $nextTime) { $start = \Carbon\Carbon::createFromFormat('H:i:s', $session->mula_kelas); $end = \Carbon\Carbon::createFromFormat('H:i:s', $session->tamat_kelas); return ($start->lt($nextTime) && $end->gt($currentTime)); })->first(); @endphp @if ($session) @php $color = $color_map[$session->code_sub] ?? '#ffffff'; // Default color if not found @endphp @else @endif @endforeach @php $currentTime = $nextTime; @endphp @endwhile
Waktu{{ $day }}
{{ $currentTime->format('H:i') }} - {{ $nextTime->format('H:i') }}
{{ $session->code_sub }}
{{--
{{ $session->subjek }}
--}}
{{ $session->teacher_id }}
Naiktaraf ke PREMIUM untuk konten penuh  Premium
@endif
Menu Utama | {{ $student->student_name }}
Rekod Kehadiran Harian Rekod Kehadiran Kelas {{-- Rekod Kehadiran Kokurikulum --}} @if(session('subscription_type') == 'PREMIUM') @else
@endif
@if(session('subscription_type') == 'PREMIUM')
Sesi Kelas Murid | Timeline
@if($class_session->isEmpty())

Tiada sesi kelas hari ini.

@else @foreach($class_session as $cs)
{{ \Carbon\Carbon::parse($cs->mula_kelas)->format('H:i') }} - {{ \Carbon\Carbon::parse($cs->tamat_kelas)->format('H:i') }}
@if(\Carbon\Carbon::parse(now())->format('h:i A') > $cs->mula_kelas) @else @endif
{{ $cs->subjek }}
@endforeach @endif
@else
Sesi Kelas Murid | Timeline
@if($class_session->isEmpty())

Tiada sesi kelas hari ini.

@else @foreach($class_session as $cs)
{{ \Carbon\Carbon::parse($cs->mula_kelas)->format('H:i') }} - {{ \Carbon\Carbon::parse($cs->tamat_kelas)->format('H:i') }}
@if(\Carbon\Carbon::parse(now())->format('h:i A') > $cs->mula_kelas) @else @endif
{{ $cs->subjek }}
@endforeach @endif
Naiktaraf ke PREMIUM  Premium
@endif
@if(session('subscription_type') == 'PREMIUM')
Aktiviti Korikulum Murid | Kalendar
@if($cc_session->isEmpty())

Tiada aktiviti kokurikulum

@else @foreach($cc_session as $cc)
{{ \Carbon\Carbon::parse($cc->start_date)->format('d-m-Y') }}
@if(\Carbon\Carbon::parse(now())->format('Y-m-d') > $cc->start_date) @else @endif
{{$cc->kod_sub }} - {{ $cc->desc_sub }}
@endforeach @endif
@else
Aktiviti Korikulum Murid | Kalendar
@if($cc_session->isEmpty())

Tiada aktiviti kokurikulum

@else @foreach($cc_session as $cc)
{{ \Carbon\Carbon::parse($cc->start_date)->format('d-m-Y') }}
@if(\Carbon\Carbon::parse(now())->format('Y-m-d') > $cc->start_date) @else @endif
{{$cc->kod_sub }} - {{ $cc->desc_sub }}
@endforeach @endif
Naiktaraf ke PREMIUM  Premium
@endif
@if (session('complaintmsg')) @endif
e-Aduan | Hantar Aduan ke Sekolah
@csrf
@endsection