@extends('layouts.bk')
@section('title','Dashboard')
@section('page-title','Dashboard')
@section('page-sub','Selamat datang, pantau perkembangan siswa')
@push('styles')
@endpush
@section('content')
@php
$bulanLabel = $trenTes->map(fn($t) => \Carbon\Carbon::create($t->tahun, $t->bulan)->translatedFormat('M'));
$bulanData = $trenTes->pluck('total');
$maxRekap = $rekapJurusan->max('total') ?: 1;
$jurusanIkon = [
'Alat Berat' => '🚜', 'Otomotif' => '🚗', 'Motor' => '🏍️',
'Pemesinan' => '🔧', 'Mekatronika' => '🤖', 'Konstruksi' => '🏗️',
'Bangunan' => '🏗️', 'Listrik' => '⚡', 'Pembangkit' => '🔋',
'Audio' => '📺', 'Komputer' => '💻', 'Desain' => '🎨',
];
@endphp
👩🏫 Guru Bimbingan Konseling
Selamat Datang, {{ Auth::user()->nama }}!
Pantau perkembangan siswa dan kelola konten jurusan dari sini.
@foreach([
['🎓',$totalSiswa,'Total Siswa','Terdaftar di sistem','blue'],
['✅',$sudahTes,'Sudah Tes','Sudah mengerjakan','green'],
['⏳',$belumTes,'Belum Tes','Perlu tindak lanjut','gold'],
['⚠️',$minatBeda,'Minat ≠ Hasil','Perlu konseling','red'],
] as [$icon,$num,$label,$sub,$tone])
{{ $icon }}
{{ $num }}
{{ $label }}
{{ $sub }}
@endforeach
📈 Tren Tes Siswa
7 bulan terakhir
{{-- ✅ tutup dashboard-grid --}}
| Nama Siswa |
Sekolah Asal |
Rekomendasi |
Minat Awal |
Sesuai? |
Tanggal |
@forelse($tesTerbaru as $tes)
@php
$rek = $tes->rekomendasiTeratas?->jurusan?->nama_jurusan ?? '-';
$minat1 = $tes->minatJurusan1?->nama_jurusan ?? '-';
$sesuai = $tes->rekomendasiTeratas && $tes->rekomendasiTeratas->jurusan_id === $tes->minat_jurusan_1_id;
$iconRek = '🏫';
foreach($jurusanIkon as $kw => $ic) {
if(str_contains(strtolower($rek), strtolower($kw))) { $iconRek = $ic; break; }
}
$iconMinat = '🏫';
foreach($jurusanIkon as $kw => $ic) {
if(str_contains(strtolower($minat1), strtolower($kw))) { $iconMinat = $ic; break; }
}
@endphp
| {{ $tes->siswa->user->nama ?? '-' }} |
{{ $tes->siswa->sekolah_asal ?? '-' }} |
{{ $iconRek }} {{ $rek }} |
{{ $iconMinat }} {{ $minat1 }} |
@if($tes->rekomendasiTeratas)
{{ $sesuai ? '✅ Sesuai':'⚠ Beda' }}
@else
—
@endif
|
{{ $tes->created_at->translatedFormat('d M Y') }} |
@empty
| Belum ada data tes. |
@endforelse
{{-- ✅ FIX: penutup .card yang sebelumnya hilang --}}
@endsection
@push('scripts')
@endpush