@extends('admin.layouts.app')
@section('title', 'Dashboard')
@section('content')
👥 Total Siswa
{{ $totalSiswa }}
🎯 Total Rekomendasi
{{ $totalRekomendasi }}
💬 Chat History
{{ $totalChatHistory }}
🎓 Jurusan Tersedia
{{ $totalJurusan }}
📊 Siswa per Kelompok
@foreach($kelompokStats as $stat)
{{ $stat->kelompok_asal ?? 'Tidak Ada' }}
@endforeach
🎯 Top Recommended Majors
@if($topMajors->isNotEmpty())
@foreach($topMajors as $major)
{{ $major->major_name }}
{{ $major->count }}
@endforeach
@else
Belum ada data rekomendasi
@endif
👥 Siswa Terbaru
@if($recentStudents->isNotEmpty())
| Nama |
NIS |
Kelompok |
Aksi |
@foreach($recentStudents as $student)
| {{ $student->name }} |
{{ $student->nis ?? '-' }} |
{{ $student->kelompok_asal ?? '-' }}
|
👁 Lihat
|
@endforeach
@else
Belum ada siswa terdaftar
@endif
🎯 Rekomendasi Terbaru
@if($recentRecommendations->isNotEmpty())
| Siswa |
Top Rekomendasi |
Skor |
Tanggal |
@foreach($recentRecommendations as $rec)
@php
$topJurusan = $rec->hasil_rekomendasi[0]['jurusan'] ?? '-';
$skorRaw = $rec->hasil_rekomendasi[0]['skor'] ?? 0;
$topSkor = round(($skorRaw > 1 ? $skorRaw : $skorRaw * 100), 1);
@endphp
| {{ $rec->user->name ?? 'Pengguna Dihapus' }} |
{{ $topJurusan }} |
{{ $topSkor }}%
|
{{ $rec->created_at->format('d M Y') }} |
@endforeach
@else
Belum ada rekomendasi
@endif
@endsection