@extends('layouts.app') @section('content')
arrow_back

Staff Member Details

View complete profile and assigned subjects

{{ strtoupper(substr($staff->name, 0, 1)) }}

{{ $staff->name }}

{{ $staff->staff_id }}

{{ $staff->email }}

{{ \Carbon\Carbon::parse($staff->dob)->format('F d, Y') }}

@if($staff->subjectMainCategory) category {{ $staff->subjectMainCategory->name }} @else Not Assigned @endif

@if($staff->is_confirmed) check_circle Confirmed @else pending Pending Confirmation @endif

{{ $staff->created_at->format('F d, Y') }}

{{ $subjects->count() }} Subject{{ $subjects->count() !== 1 ? 's' : '' }}

Assigned Subjects

Subjects currently taught by this faculty member

{{ $subjects->count() }} Total
@if($subjects->count() > 0)
@foreach($subjects as $subject)
menu_book

{{ $subject['name'] }}

{{ $subject['code'] }}

{{ $subject['department'] }}

{{ $subject['semester'] }}

{{ $subject['credits'] }} Credits

{{ $subject['student_count'] }} / {{ $subject['student_limit'] }}

@php $percentage = $subject['student_limit'] > 0 ? ($subject['student_count'] / $subject['student_limit']) * 100 : 0; $colorClass = $percentage >= 90 ? 'bg-red-500' : ($percentage >= 70 ? 'bg-amber-500' : 'bg-green-500'); @endphp
@endforeach
@else
auto_stories

No Subjects Assigned

This staff member has not been assigned any subjects yet.

@endif
groups

Total Students

{{ $subjects->sum('student_count') }}

school

Total Credits

{{ $subjects->sum('credits') }}

analytics

Avg Class Size

{{ $subjects->count() > 0 ? round($subjects->sum('student_count') / $subjects->count(), 1) : 0 }}

@endsection