@extends('layouts.app') @section('title', 'Dashboard') @push('styles') @endpush @section('content')

{{ $settings['institute_name'] ?? 'Vidya' }} · Session {{ $settings['session_start'] ?? date('Y') }}–{{ $settings['session_end'] ?? (date('Y') + 1) }}

Dashboard

@if($todayAttendance)

{{ $todayAttendance['present'] }}/{{ $todayAttendance['total'] }}

Present today

@else Mark Today's Attendance @endif

{{ $totalStudents }}

Students

{{ $totalStaff }}

Staff

{{ $activeBatches }}

Active Batches

{{ $newInquiries }}

New Inquiries

{{ $pendingFollowUps }}

Pending Follow-ups

Batch Occupancy

Students per batch

@forelse ($batchOccupancy as $batch)
{{ $batch['name'] }} {{ $batch['students'] }} students
@php $maxOcc = $batchOccupancy->max('students') ?: 1; @endphp
@empty

No batch data yet.

@endforelse

Quick Actions

Common tasks

Mark Attendance Add Inquiry View Batches

Defaulters

Students with >3 absences

@if(count($defaulters) > 0)
@foreach ($defaulters as $d) @endforeach
Name Absences Batch
{{ $d['name'] }} {{ $d['absences'] }} {{ $d['batch'] }}
@else

No defaulters this month

@endif

Weekly Attendance Trend

Day-by-day this week

@forelse ($weeklyAttendance as $day)
{{ $day['date'] }}
@php $pct = $day['rate'] ?? 0; @endphp
{{ $pct }}%
@empty

No attendance data yet.

@endforelse
Total Batches: {{ $totalBatches }}
Total Students: {{ $totalStudents }}
Active Batches: {{ $activeBatches }}
Pending Follow-ups: {{ $pendingFollowUps }}
@endsection