@extends('layouts.teacher.app') @section('content')

Dashboard

@if(session('error')) @endif @if(session('success')) @endif
{{-- removed as menu can only be access by admin --}} {{-- --}} @if(session('subscription_type') == 'PREMIUM')
Rekod Outing
@else
Outing Records
Upgrade to PREMIUM to access full content  Premium
@endif
Jadual 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
Period{{ $day }}
{{ $currentTime->format('H:i') }} - {{ $nextTime->format('H:i') }} {{--
{{ $session->code_sub }}
--}}
{{ $session->subjek }}
{{ $session->kelas }}
@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
Period{{ $day }}
{{ $currentTime->format('H:i') }} - {{ $nextTime->format('H:i') }} {{--
{{ $session->code_sub }}
--}}
{{ $session->subjek }}
{{ $session->kelas }}
Upgrade to PREMIUM to access full content  Premium
@endif
@if(session('subscription_type') == 'PREMIUM')
Sesi Kelas | Hari Ini
@if($class_session->isEmpty())

Tiada Kelas Untuk Hari Ini

@else @foreach($class_session as $cs)
{{ $cs->mula_kelas}}
@if($cs->mula_kelas < \Carbon\Carbon::parse(now())->format('h:i A') ) @else @endif
{{ $cs->subjek}} {{ $cs->kelas}}
@endforeach @endif
@else
Class Session | Today
@if($class_session->isEmpty())

No class scheduled for today

@else @foreach($class_session as $cs)
{{ $cs->mula_kelas}}
@if($cs->mula_kelas < \Carbon\Carbon::parse(now())->format('h:i A') ) @else @endif
{{ $cs->subjek}} {{ $cs->kelas}}
@endforeach @endif
Upgrade to PREMIUM to access full content  Premium
@endif @if(session('subscription_type') == 'PREMIUM')
Aktiviti Kokurikulum | Akan Datang
@if($cc_session->isEmpty())

Tiada aktiviti

@else @foreach($cc_session as $cc)
{{ \Carbon\Carbon::parse($cc->start_date)->format('l') }}
@if(\Carbon\Carbon::parse(now())->format('Y-m-d') > $cc->start_date) @else @endif
{{$cc->kod_sub }} - {{ $cc->desc_sub }}
@endforeach @endif
@else
Curriculum Activities | Incoming
@if($cc_session->isEmpty())

No curricular activities at this time

@else @foreach($cc_session as $cc)
{{ \Carbon\Carbon::parse($cc->start_date)->format('l') }}
@if(\Carbon\Carbon::parse(now())->format('Y-m-d') > $cc->start_date) @else @endif
{{$cc->kod_sub }} - {{ $cc->desc_sub }}
@endforeach @endif
Upgrade to PREMIUM to access full content  Premium
@endif {{--
e-Aduan | Received
@if($complaints->isEmpty())

No curricular activities at this time

@else @foreach($complaints as $cp)
  • {{ $cp->title }}

    {{ $cp->complaint }}

    at {{ \Carbon\Carbon::parse($cp->submitted_at)->format('H:i:s d/m/Y') }}
@endforeach @endif
--}}
@endsection