@extends('layouts.admin') @section('title', 'Détails Étudiant - MentoraMind Admin') @section('description', 'Détails de l\'étudiant') @section('content')
{{ __('admin.students.detail.subtitle') }}
{{ $customer->user->full_name ?? '-' }}
{{ $customer->user->email ?? '-' }}
{{ $customer->user->phone_number ?? '-' }}
{{ strtoupper($customer->user->language ?? 'FR') }}
{{ $customer->schoolClass->name ?? '-' }}
@if($customer->user && $customer->user->subscriptions && $customer->user->subscriptions->isNotEmpty()) @php $subscription = $customer->user->subscriptions->sortByDesc('created_at')->first(); $planName = $subscription->subscriptionPlan->name ?? 'N/A'; $badgeClass = match(strtolower($planName)) { 'premium' => 'bg-primary', 'classic' => 'bg-warning text-dark', default => 'bg-secondary' }; @endphp {{ $planName }} @else - @endif
{{ $customer->user->created_at->format('d F Y') }}
{{ format_currency((float)$customer->current_balance) }}
@if($customer->user->referredBy) {{ $customer->user->referredBy->full_name }} @else {{ __('admin.students.detail.no_sponsor') }} @endif
@php $totalMinutes = ($customer->user && $customer->user->quizzes) ? $customer->user->quizzes->sum('duration') : 0; $hours = floor($totalMinutes / 60); $minutes = $totalMinutes % 60; @endphp {{ $hours }}h {{ $minutes }}min
@if($customer->user->last_login_at) {{ $customer->user->last_login_at->diffForHumans() }} @else - @endif
@php $lastQuiz = ($customer->user && $customer->user->quizzes) ? $customer->user->quizzes->sortByDesc('created_at')->first() : null; @endphp @if($lastQuiz) {{ $lastQuiz->created_at->format('d/m/Y H:i') }} @else - @endif
{{ $customer->user->referredBy->full_name }}
{{ $customer->user->referredBy->email }}{{ __('admin.students.detail.no_sponsor') }}
@endif{{ __('admin.students.detail.no_referrals') }}