{{-- DASHBOARD VERSION 2026-08-22-FIX --}} @extends('student.layouts.app') @section('content')
{{ $student->student_name ?? 'Student' }}

Welcome,

{{ $student->student_name ?? Session::get('user_name') }}!

{{ $student->seeking_class ?? 'N/A' }} Sec {{ $student->section ?? 'N/A' }}
Online

Today's Overview

{{-- Homework Count --}}

{{ $dashHwCount ?? 0 }}

Homework

@if(($dashHwCount ?? 0) > 0) @endif
{{-- Notices Count --}}

{{ $unreadNoticeCount ?? 0 }}

Notices

@if(($unreadNoticeCount ?? 0) > 0) @endif
{{-- Chats Count --}}

{{ $unreadCount ?? 0 }}

Chats

@if(($unreadCount ?? 0) > 0) @endif

Quick Actions

{{-- ROW 1: HOMEWORK | NOTICES | CHAT --}}
{{-- 1. Homework --}}

Homework

Assignments

@if(($dashHwCount ?? 0) > 0)
{{ $dashHwCount > 9 ? '9+' : $dashHwCount }}
@endif
{{-- 2. Notices --}}

Notices

Updates

@if(($unreadNoticeCount ?? 0) > 0)
{{ $unreadNoticeCount > 9 ? '9+' : $unreadNoticeCount }}
@endif
{{-- 3. Chat --}}

Chat

Teachers

@if(($unreadCount ?? 0) > 0)
{{ $unreadCount > 9 ? '9+' : $unreadCount }}
@endif
{{-- ROW 2: APPLICATIONS | ONLINE CLASSES | PROFILE --}}
{{-- 4. Applications --}}

Applications

Leave & Docs

@if(isset($unreadApplicationsCount) && $unreadApplicationsCount > 0) {{ $unreadApplicationsCount > 9 ? '9+' : $unreadApplicationsCount }} @endif
{{-- 5. Online Classes --}}

Online Class

Join Live

@if(count($upcomingClasses ?? []) > 0) {{ count($upcomingClasses) }} @endif
{{-- 6. Profile --}}

Profile

My Record

{{-- UPCOMING ONLINE CLASSES SECTION --}} @if(isset($upcomingClasses) && count($upcomingClasses) > 0)

Upcoming Classes

@foreach($upcomingClasses as $cls) @php $startTime = \Carbon\Carbon::parse($cls->start_time)->format('h:i A'); $dateStr = \Carbon\Carbon::parse($cls->class_date)->format('d M Y'); @endphp

{{ $cls->title }}

{{ $cls->subject }}

{{ $dateStr }} | {{ $startTime }}

@endforeach
@endif @if(isset($notices) && $notices->isNotEmpty())

Latest Notices

View All
@foreach($notices as $notice)

{{ $notice->title }}

@if(empty($notice->is_read)) New @endif @if($notice->is_pinned) Pinned @endif

{{ $notice->content }}

{{ \Carbon\Carbon::parse($notice->published_at)->format('d M, Y') }} {{ $notice->category }}
@endforeach
@endif {{-- URGENT POPUP NOTICE --}} @if(isset($popupNotice) && $popupNotice) @endif @endsection