@extends('frontend.main_master') @section('title', 'Teacher Panel - Astro Wise') @section('body-class', 'teacher-panel-body') @section('content')
{{-- Hero Header --}}

Teacher Panel

Manage your live classes, synchronized chart sessions, and interactive annotations in one place.

@csrf
@if(session('teacher_panel_status'))
{{ session('teacher_panel_status') }}
@endif {{-- Statistics --}}
@foreach ([ ['Total Classes', $stats['total'], 'fa-chalkboard-user'], ['Active Classes', $stats['active'], 'fa-tower-broadcast'], ['Recorded Classes', $stats['recorded'], 'fa-clapperboard'], ['Recording Time (min)', $stats['recordedMinutes'], 'fa-clock'], ['Students', $stats['students'], 'fa-user-graduate'], ['Annotations', $stats['annotations'], 'fa-pen-nib'], ] as [$label, $value, $icon])
{{ $value }}
{{ $label }}
@endforeach
{{-- Active / Pending Sessions --}}

Active / Pending Live Classes

@if($activeSessions->isEmpty())

No active classes currently. Click "Start New Live Class" to open a room and invite your student.

@else
@foreach($activeSessions as $session) @php $joinUrl = route('panel.live.join', $session->room_id); @endphp
{{ $session->student_id ? 'LIVE' : 'Waiting for Student' }}
Student: {{ $session->student ? trim($session->student->name . ' ' . $session->student->last_name) : 'Not joined yet' }}
Created: {{ $session->created_at->format('M d, Y H:i') }} @if($session->started_at) · Started: {{ $session->started_at->format('H:i') }} @endif
Enter Class
@csrf
@endforeach
@endif
{{-- Past Classes --}}

Class History

All my recordings →
@if($pastSessions->isEmpty())

No completed classes yet.

@else
@foreach($pastSessions as $session) @endforeach
Date Student Duration Recording Actions
{{ optional($session->ended_at ?? $session->created_at)->format('M d, Y H:i') }} {{ $session->student ? trim($session->student->name . ' ' . $session->student->last_name) : '—' }} @if($session->started_at && $session->ended_at) {{ $session->started_at->diffForHumans($session->ended_at, true) }} @else — @endif @if($session->hasRecording()) Watch @else No recording @endif @if($session->hasRecording())
@csrf
@endif
{{ $pastSessions->links() }}
@endif
{{-- Saved Annotations --}}

Saved Whiteboard Annotations

@if($annotations->isEmpty())

No saved drawings yet. During live classes, freeze the screen, draw on the chart, and save with 💾.

@else
@foreach($annotations as $annotation)
@if($annotation->png_path) Annotation @else
No preview
@endif
{{ $annotation->created_at->format('M d, Y H:i') }}
{{ $annotation->liveSession->student ? trim($annotation->liveSession->student->name . ' ' . $annotation->liveSession->student->last_name) : '' }}
@csrf
@endforeach
@endif
@endsection