@extends('admin.layouts.app') @section('title', 'Detail Siswa - ' . $student->name) @section('content')

👤 Detail Siswa

{{ $student->name }}

← Kembali
@if($student->foto) {{ $student->name }} @else
{{ strtoupper(substr($student->name, 0, 1)) }}
@endif

{{ $student->name }}

NIS

{{ $student->nis ?? '-' }}

Kelompok

@if($student->kelompok_asal) {{ $student->kelompok_asal }} @else

-

@endif

Email

{{ $student->email }}

Terdaftar

{{ $student->created_at->format('d M Y') }}

🎯 Riwayat Rekomendasi ({{ count($recommendations) }})

@if($recommendations->isNotEmpty())
@foreach($recommendations as $rec)

{{ $rec->created_at->format('d M Y H:i') }}

Rekomendasi #{{ $loop->index + 1 }}
@if($rec->hasil_rekomendasi && is_array($rec->hasil_rekomendasi))
@foreach(array_slice($rec->hasil_rekomendasi, 0, 3) as $idx => $hasil)
{{ $idx + 1 }} {{ $hasil['jurusan'] ?? 'N/A' }}
@php $skorVal = $hasil['skor'] ?? 0; @endphp {{ round(($skorVal > 1 ? $skorVal : $skorVal * 100), 1) }}%
@endforeach
@if(isset($rec->minat) || isset($rec->cita_cita))

📝 Minat: {{ $rec->minat ?? '-' }} | 🎓 Cita-cita: {{ $rec->cita_cita ?? '-' }}

@endif @endif
@endforeach
@else

Siswa belum melakukan rekomendasi

@endif

💬 Chat

{{ count($chatHistories) }}
@if($chatHistories->isNotEmpty())
@foreach($chatHistories->take(5) as $chat)

{{ $chat->created_at->format('d M Y') }}

Q: {{ \Illuminate\Support\Str::limit($chat->prompt, 80) }}

A: {{ \Illuminate\Support\Str::limit($chat->response, 80) }}

@endforeach
@if(count($chatHistories) > 5) Lihat Semua ({{ count($chatHistories) }}) → @endif @else

Belum ada chat

@endif
@endsection